Introduction to Adaptive Bitrate Streaming (ABR)
Adaptive Bitrate Streaming (ABR) optimizes the viewer experience by automatically adjusting video quality in real time based on network conditions and device capabilities. Ant Media Server supports ABR across WebRTC, HLS, and CMAF/DASH, ensuring minimal buffering and high engagement.
The Evolution of Streaming
In the early days of online video, streaming relied on a fixed bitrate—a single-quality version of the video that assumed all viewers had similar network conditions. If a viewer’s internet connection couldn't handle that bitrate, the result was constant buffering, long load times, or playback failure. There was no flexibility or fallback.
ABR changed this landscape by dynamically adjusting video quality in real time based on each viewer’s available bandwidth, CPU load, and network conditions. This technology allows seamless video playback across a wide range of environments, from point-to-point WebRTC conferencing to live OTT broadcasts and on-demand content across mobile, desktop, and smart TVs.
Why ABR Matters
- Universal Coverage: Seamlessly serves viewers on broadband, LTE, or public Wi‑Fi without manual intervention.
- Buffer Reduction: Automatic profile switching prevents stalls and buffering.
- Mobile-First Experience: Delivers smooth playback on smartphones and tablets.
How Did ABR Emerge?
Initially, streaming used the Real-Time Messaging Protocol (RTMP), which sent a continuous stream of data at a fixed bitrate. As the industry shifted to HTML5 specifications like WebRTC, streaming adopted progressive downloads, where content could be cached on local servers and was less affected by firewalls. However, this method was not optimized for varying screen sizes or network quality.
The solution: Adaptive Bitrate Streaming. Content creators began encoding streams into multiple bitrates and breaking them into small chunks. These chunks are indexed in a manifest file and delivered to the player, allowing for seamless switching between qualities and almost no buffering.
How Does Adaptive Bitrate Streaming Work?
Ant Media Server enables the best possible video quality and viewer experience by using WebRTC and Adaptive Bitrate technologies together.
Key Concepts
- Traditional Streaming: Delivered content at a fixed bitrate, causing stutter or buffering if the connection was insufficient.
- ABR: Encodes the source stream into multiple renditions with different resolutions and bitrates. The client device or server monitors bandwidth and device performance to select the best rendition dynamically.
- Transcoding: Creating alternate versions of a video stream.
- Transrating: Adjusting bitrate (e.g., 16 Mbps → 5 Mbps).
- Transsizing: Adjusting resolution (e.g., 2560×1440 → 1280×720).
- Manifest File: A playlist (like .m3u8 for HLS or .mpd for DASH) that lists all available renditions and guides the player.
- Profile: A defined combination of resolution and bitrate for a specific quality tier.
ABR Architecture in Ant Media Server
- WebRTC: The server dynamically analyzes real-time network conditions for each viewer and adjusts stream quality on-the-fly, ensuring minimal latency and seamless transitions.
- HLS / CMAF / DASH: The video player fetches a manifest file containing multiple renditions. Based on current network performance and device capacity, the player requests video chunks from the most appropriate rendition.
This layered approach ensures optimized playback for both low-latency scenarios (like video conferencing) and scalable delivery (OTT platforms).
Dashboard Setup
- Navigate to Applications → Settings → Adaptive Bitrate.
- Toggle Enable ABR to ON.
- Click Add Profile, then specify resolution and bitrates:
- Height: 240, Video: 500 kbps, Audio: 32 kbps
- Height: 720, Video: 2 Mbps, Audio: 128 kbps
- Height: 1080, Video: 3 Mbps, Audio: 256 kbps
- Save settings and restart the live stream.
REST API Configuration
You can use the REST endpoint to tailor ABR per broadcast—ideal for automation pipelines.
- height: Frame height in pixels.
- videoBitrate/audioBitrate: In bits per second.
- forceEncode: Ensures transcoding even if the source matches the profile.
curl --location 'https://YOUR_DOMAIN:5443/live/rest/v2/broadcasts/create' \
--header 'Content-Type: application/json' \
--data '{
"name": "LiveDemo",
"streamId": "demo123",
"encoderSettingsList": [
{ "height": 240, "videoBitrate": 500000, "audioBitrate": 32000, "forceEncode": true },
{ "height": 720, "videoBitrate": 2000000, "audioBitrate": 128000, "forceEncode": true },
{ "height": 1080, "videoBitrate": 3000000, "audioBitrate": 256000, "forceEncode": true }
]
}'
Stats-Based ABR Switching
Ant Media’s stats-based switching collects client-side metrics (latency, packet loss) and automatically transitions between profiles. This is enabled by default with settings.statsBasedABREnabled = true;
.
Use-Case Scenarios
Scenario | Challenge | ABR Benefit |
---|---|---|
Corporate Webinar | Variable attendee bandwidth | Smooth transition during Q&A sections |
Live Sports | Sudden spikes in viewership | Prevents buffering during critical moments |
Remote Education | Diverse student devices | Ensures clear video for all device types |
Best Practices
- Offer 3–5 profiles for optimal fallbacks.
- Leverage GPU acceleration for high-concurrency transcoding.
- Monitor metrics in the Ant Media dashboard to refine bitrate thresholds.
- Use .webp for overlays and diagrams to reduce load times.
- Periodically test under simulated low-bandwidth conditions.
How Does ABR Help?
- Widening access: Viewers with slower connections or certain devices can still watch videos.
- Improving user experience: Decreases buffering, leading to happier viewers.
- Enabling mobile viewing: Optimizes for mobile streaming, which is increasingly important.
How to Stop Buffering When Streaming
With multiple bitrates on the server, Ant Media Server measures each viewer’s internet speed and sends the best quality accordingly. ABR allows for dynamic upgrading and downgrading of stream quality:
- If internet speed is above 1500kbps, send 480p.
- If between 800kbps and 1500kbps, or less than 800kbps, send 360p.
This process is automatic and real-time, ensuring high-quality streams for users with high bandwidth and accommodating those with lower speeds.
FAQs
- Is ABR free to use with AMS?
Yes, ABR is included in both Community and Enterprise editions. Advanced features like stats-based switching are available only in the Enterprise version. - How can we enable ABR?
Enable ABR in the dashboard under Applications → Settings → Adaptive Bitrate. Toggle the switch and configure your desired resolutions and bitrates. - How to force encoding for specific profiles?
Use theforceEncode
flag in your REST API request or ABR profile settings. When set to true, Ant Media Server always transcodes to match the specified profile. - What’s the ideal number of ABR profiles?
3–5 profiles are recommended. - How do I include custom bitrates?
Use the REST API’sencoderSettings
array to define any valid bitrate/resolution.
Estimate Your Streaming Costs
Use our free Cost Calculator to find out how much you can save with Ant Media Server based on your usage.
Open Cost Calculator