Home/Blog/What is adaptive bitrate streaming (ABR) and how to use it

What is adaptive bitrate streaming (ABR) and how to use it

Adaptive bitrate streaming (ABR) can help you provide a smooth, playback streaming experience when delivering video content through web platforms and applications. This article will explain adaptive bitrate streaming, how it works, and why you should consider using it for your video delivery needs.

What is adaptive bitrate streaming (ABR)?

Adaptive bitrate streaming (ABR) is a video delivery technique that automatically adjusts video quality in real time based on your users’ network conditions and device capabilities. Instead of serving a fixed quality to everyone, ABR ensures each user gets the best experience possible — whether on a fast Wi-Fi connection or a patchy mobile data connection.

So, what’s the big deal? ABR is vital in keeping playback smooth and high-quality, even when the network conditions fluctuate.

ABR ensures smooth playbacks by dynamically switching the video quality levels. For example, say a user starts playing a video at 480p quality, and then the network conditions get better. The video player will automatically switch to 720p quality without stopping the video. Then, the user walks into an elevator, which causes the network conditions to drop. The player will then switch to a 360p video quality level to ensure smooth playback and reduce video buffering.

Difference between ABR and traditional streaming

Traditional streaming (also known as progressive streaming) usually serves a single video file at a fixed bitrate and resolution, such as 1080p, from start to finish. If your connection is poor, the player will attempt to load the video based on the current network conditions. Although this won’t affect the quality of the video being served, it would create a lot of buffering for the user and an unpleasant experience of a video loading forever.

In contrast, ABR serves videos in small segments encoded at various quality levels and then serves the best based on the user’s current network conditions.

To better understand the difference between ABR and traditional streaming, let’s break it down using a table:

FeatureAdaptive bitrate streamingProgressive streaming
Video qualityAdjusts dynamicallyFixed
Buffering riskLowHigh
Network adaptabilityHighNone
Device optimizationYesNo
Implementation complexityModerateSimple

In summary, use ABR when you want a professional-grade experience for viewers on different networks. Use progressive when you’re delivering short, simple clips with a stable audience bandwidth.

How ABR works

ABR is like a smart waiter at a buffet, constantly checking in to see if you need more or less food. Here’s how it works.

Encoding and segmenting

To use adaptive bitrate streaming (ABR), you first need to prepare the video in multiple versions, each tailored to different network conditions and device capabilities.

The encoding process requires tools such as FFmpeg or AWS MediaConvert to prepare the video.

The encoding process functions similarly to building a buffet with various video qualities. The system prepares different video versions, ranging from basic snacks (low-resolution versions) to complete meals (in HD or 4K), to provide viewers with content that matches their device capabilities and internet speeds.

Say you upload a video file with 1080p resolution. The encoding process would result in four different resolution and bitrate combinations:

ResolutionBitrate (approx.)Ideal for
240p~400 kbpsVery slow mobile networks
360p~800 kbpsslow mobile networks, slower Wi-Fi
480p~1.5 mbpsLow-end devices, slower Wi-Fi
720p~4 mbpsStandard definition on mobile
1080p~6 mbpsHigh-speed broadband, desktops

Once encoded, the video is divided into small segments, typically lasting 2–10 seconds. Each segment is saved in a format that enables rapid retrieval and playback.

A master playlist file is then generated, containing links to the video’s different resolutions.

Every resolution will have a unique variant playlist that points to specific video segments.

Consider this playlist like a menu for the video player, indicating which options are available to provide

M3U8 playlistM3U8 playlist

The master playlist file is a .m3u8 file that contains links to the variant playlists, which are also .m3u8 files.

Each variant playlist contains links to the specific video segments in the form of .ts or .m4s files.

A standard .m3u8 master playlist file would look something like this:

#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=5000000,RESOLUTION=1920x1080
1080p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3000000,RESOLUTION=1280x720
720p.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=1500000,RESOLUTION=854x480
480p.m3u8

Adaptive algorithms

Once the video is chopped into segments and multiple-quality versions are created, it is sent to the client side for playback. When a user clicks “play” using a video player (such as a native player, Video.js, Shaka Player, or hls.js), the player fetches the master playlist file and starts playing the video. The player usually starts with the lowest quality version of the video (e.g., 240p) to ensure a quick startup time. While the video begins playing, the adaptive algorithm gets to work.

The adaptive algorithm constantly monitors what’s happening on the viewer’s side, assessing several key factors in real-time to choose the best possible segment for playback:

  • Current bandwidth: How fast is the user’s internet connection? Is the user on a fast Wi-Fi connection or struggling with 3G? The algorithm checks the current bandwidth to determine how much data can be sent without causing buffering.

  • CPU load: Is the user’s device struggling to keep up with the video processing? The algorithm checks the CPU load to ensure the device can handle the video quality being requested.

  • Network conditions: In addition to bandwidth, the algorithm also checks for jitter, packet loss, or sudden spikes in latency that could affect playback.

  • Buffer health: How much of the video is already buffered? If the buffer is running low, the algorithm might choose a lower bitrate to ensure smooth playback.

  • Device capabilities: Is the user on a mobile device or a high-end smart TV? The algorithm considers the device’s resolution and processing power to select the best quality.

How does the algorithm choose the next segment to play? On the first load with the most suitable resolution selected, it fetches several segments ahead while the video is playing.

Every few seconds (usually at the end of each segment), the algorithm rechecks the key factors and selects the next best resolution segments to fetch and buffer based on the live stats it gathers.

If things are going well, it will move to a higher resolution or keep playing at that resolution. If conditions get shaky, it’ll gracefully scale down to a lower bitrate, avoiding the dreaded spinning wheel.

Think of the algorithm as a personal assistant who knows when to serve you a light salad or a hearty steak.

Streaming protocols that support ABR

ABR relies on specific streaming protocols to deliver the video segments. These protocols define how the video data is packaged, transmitted, and played back. Two of the most popular ABR protocols are:

  • HLS (HTTP Live Streaming): Apple developed HLS and is now widely supported across various devices and platforms, including iOS, Android, and most web browsers. It uses the M3U8 playlist format to manage video segments and quality levels and supports video codecs like H.264 (AVC), H.265 (HEVC), and AV1.

  • MPEG-DASH (Dynamic Adaptive Streaming over HTTP): MPEG-DASH is an open standard that works similarly to HLS but is more flexible and can be used with various codecs and formats. It uses the MPD (Media Presentation Description) file format to manage video segments.

Both protocols rely on standard HTTP, making them CDN-friendly and easy to implement.

Benefits of adaptive bitrate streaming

There are a couple of benefits that come with ABR:

  • Less buffering and smoother playback: ABR ensures that the video always plays smoothly, even when network conditions change. If the network is slow, the video quality is automatically adjusted to a lower level so that you can still watch the video smoothly. This reduces buffering and enhances the smoothness of video playback.

  • Optimized quality per device and connection: The video quality is always optimized for the user’s current network conditions. If you are on a slow network, which makes it hard to watch high-quality videos smoothly, the video quality is automatically adjusted to a lower quality so the video can still be watched smoothly. If you are on a fast network, the video quality is automatically adjusted to a higher quality.

  • Better user experience overall: The user experience is always smooth, and the video quality is optimized for the user’s current network conditions. Better quality = longer watch times and happier viewers.

  • CDN and cost-efficiency: ABR uses standard HTTP and caches video segments at multiple qualities, which reduces the load on the server and speeds up delivery. This means you can deliver high-quality video content to your users without breaking the bank, as you do not need a special server to serve your video content.

How Uploadcare uses adaptive bitrate streaming

Uploadcare’s video CDN supports Adaptive bitrate streaming out of the box.

When you upload a video to Uploadcare, you get a direct URL to the video file.

Behind the scenes, when a video is requested, it is automatically encoded into multiple resolutions and bitrate using modern codecs like H.264 or AV1. The video is then segmented into small chunks to support fast, adaptive delivery.

The video is then served using the HTTP Live Streaming (HLS) protocol, which is widely supported across various devices and platforms.

Uploadcare adaptive video deliveryUploadcare adaptive video delivery

To enable the adaptive streaming feature, go to your Uploadcare account’s settings page and, under the Delivery tab, enable the Adaptive Bitrate Streaming option.

Uploadcare adaptive video deliveryUploadcare adaptive video delivery

Once enabled, Uploadcare will automatically create multiple versions of your video in different resolutions and bitrate.

You can then request the video to be served in an adaptive format using a simple URL transformation:

https://ucarecdn.com/YOUR_VIDEO_UUID/adaptive_video/

To use the video in your application, you can use the Uploadcare video player or any other HLS-compatible player like video.js.

Challenges and considerations when using ABR

ABR is not a silver bullet. Here are some challenges to keep in mind:

  • Latency: Live streaming with ABR can introduce a few seconds of lag when switching between bitrates, which can be a problem for real-time events.

  • Bandwidth Prediction: Estimating available bandwidth accurately is tricky and can lead to unnecessary quality shifts.

  • Cost: More resolutions = more storage + more processing.

  • DRM: Ensure your ABR setup plays nice with content protection standards like Widevine or FairPlay.

Best practices to follow when implementing adaptive bitrate streaming

  • Encode your videos in at least two or more different bitrate to cover diverse networks
  • Start with a lower bitrate to ensure instant playback, then scale up as the connection allows
  • Use a CDN to cache and deliver video segments efficiently
  • Prioritize mobile-first design since most viewers are on mobile devices
  • Track performance with analytics to spot drop-offs and optimize delivery
  • Have a fallback (e.g., lower resolution or a static thumbnail) if playback fails or the user’s device doesn’t support ABR

Use cases for adaptive bitrate streaming

Adaptive bitrate streaming is used in various industries and applications, including:

  • Social media: Platforms like TikTok use ABR to keep users engaged with smooth playback on any device.

  • E-learning: To keep students engaged even on poor connections.

  • Over-the-Top (OTT) & Video-on-Demand (VOD) services: Platforms like Netflix and Amazon Prime Video use ABR to deliver video content that doesn’t freeze mid-drama.

  • Live sports/events: ABR is also used to stream live events, such as sports, webinars, and conferences, e.g., YouTube Live, even with thousands of viewers tuning in to ensure a smooth playback experience.

  • Gaming: Game streaming platforms like Twitch use ABR to deliver high-quality streams to viewers, even on slower connections.

Conclusion

Adaptive Bitrate Streaming (ABR) is an effective technique for delivering high-quality video experiences across various devices and network conditions. By dynamically adjusting video quality in real time, ABR ensures smooth playback, reduces buffering, and optimizes the viewing experience for every user. Whether you’re a content creator, a developer, or a business looking to enhance your video delivery, ABR is a must-have in your streaming toolkit.

Want to see ABR in action? Try out Uploadcare’s video CDN and start serving high-quality video content to your users today.

Build file handling in minutesStart for free

Ready to get started?

Join developers who use Uploadcare to build file handling quickly and reliably.

Sign up for free