Guide

No single bitrate fits every viewer. A phone on a weak connection needs a small rendition, and a TV on fiber can take 4K. Adaptive bitrate (ABR) streaming solves this by storing each segment in several qualities. The player switches quality at segment boundaries as conditions change.

Concept

Before you start

  • Bitrate: how many bits per second a video uses. More bits means more detail and more bandwidth.
  • Buffer: the seconds of video already downloaded and waiting to play. A healthy buffer is the player's safety margin.

The big idea

Think of a driver who picks a lane at each junction, based on the traffic seen so far. The driver cannot see the traffic ahead, only the cars already passed.

The picture breaks for the same reason. The player only knows the bandwidth it measured on past segments. A sudden drop shows up only after a download has started, which is why the buffer matters.

Walking through it

A typical ladder for on-demand video looks like this. The numbers are the targets from the design:

RenditionResolutionVideo bitrateAudio
240p426 × 240400 kbps64 kbps
360p640 × 360800 kbps96 kbps
480p854 × 4801.2 Mbps128 kbps
720p1280 × 7202.5 Mbps128 kbps
1080p1920 × 10804.5 Mbps160 kbps

The rule is simple: pick the highest rung that the measured bandwidth can carry, with some headroom. Here is how it plays out:

Measured throughput ≈ 3 Mbps
  720p needs 2.5 Mbps video + 0.13 Mbps audio ≈ 2.6 Mbps
  2.6 fits under 3 with headroom → pick 720p

Throughput drops to about 1 Mbps mid-session
  720p no longer fits
  480p needs 1.2 Mbps + 0.13 Mbps ≈ 1.3 Mbps, still too much
  360p needs 0.8 Mbps + 0.1 Mbps ≈ 0.9 Mbps, fits → pick 360p

The rule has to check the audio as well as the video, which is why the second step falls to 360p, not 480p.

Startup works the same way. A player that starts at 4K can miss the two-second target. Starting on a middle rung and switching up once the buffer fills gives a fast first frame:

DNS and TLS:           100–200 ms
Manifest fetch:         ~50 ms
First segment:      500–1500 ms
Decode:                 ~50 ms
Total:                  under 2 s, when the first rung is modest

Common mistakes

  • Starting at the top rung. The first segment is the largest, so the first frame is the slowest.
  • Switching on one measurement. A single noisy sample makes quality bounce. Smooth the estimate over several segments.
  • Ignoring the buffer. A healthy buffer can afford a risky upswitch. A nearly empty buffer should downshift at once.
  • Choosing rungs that are too close together. Two nearly identical rungs waste storage and bounce the player back and forth.

Check yourself

1. Using the ladder above, which rendition suits a steady 3 Mbps link, and why?

Answer: 720p. It needs about 2.6 Mbps including audio, which leaves some headroom under 3 Mbps.

2. Why does ABR switch only at segment boundaries?

Answer: Each segment is a complete unit that can be decoded on its own, so the player can change quality without reloading the file.

Key takeaways

  • ABR picks each segment's quality from measured bandwidth and buffer.
  • Start on a middle rung for a fast first frame, then switch up.
  • Keep headroom below the measured bandwidth, not right at it.
  • Aligned segments make quality switches seamless.

Further learning

Return to the video streaming case study for upload, CDN and cost.