▶ Video & streaming

Bitrate ladders: designing quality levels for streaming

How to choose the resolution and bitrate of each adaptive streaming level, why a fixed ladder wastes bandwidth, and what per-title encoding actually means.

In adaptive streaming the player can only choose among the qualities the server makes available. The set of these qualities, each with its own resolution and bitrate, is called the bitrate ladder. It is a design decision with a direct impact on three things: how well viewers see, how much bandwidth is consumed and how much it costs to encode and store content. A poorly built ladder produces either grainy video on good connections or buffering on average ones.

What a ladder looks like

Each rung of the ladder has at least four parameters: resolution, video bitrate, codec and profile. A classic H.264 ladder might look like this:

Rung Resolution Indicative video bitrate
1 416×234 300 kbps
2 640×360 700 kbps
3 854×480 1200 kbps
4 1280×720 2500 kbps
5 1920×1080 5000 kbps

The values are only a starting example: the right ladder depends on content, codec and audience.

The principles of a good ladder

Spacing between rungs

The steps from one rung to the next should be neither too small nor too large. A practical rule often used is that each rung has a bitrate between 1.5 and 2 times the previous one.

  • Rungs too close together: encodes multiply without real visual benefit, and the player tends to oscillate.
  • Rungs too far apart: when bandwidth dips slightly, the player is forced into a glaring quality drop.

The lowest rung

The first rung must be light enough to work even on poor mobile connections. It matters mostly at start-up and in moments of trouble: a modest picture is better than a frozen video. Many services also include an audio-only version for the worst situations.

The highest rung

The top rung should be the one that is truly worth delivering. Raising the bitrate beyond a certain threshold brings no visible improvement: the quality-bitrate curve flattens, and the extra bits only consume bandwidth.

Resolution and bitrate must be chosen together

At the same bitrate, a lower resolution can look better than a higher one. If you squeeze too few bits into too many pixels, blocks and smearing appear; with a lower resolution the encoder has more bits per pixel and the player then scales the picture up. For each bitrate there is therefore an optimal resolution, which depends on the content.

To find it, you encode the same video at several resolutions and bitrates, measure each version's quality against the original with a metric such as VMAF, and plot a quality-bitrate curve for each resolution. The point where the curves cross shows where it pays to move to the next resolution. The upper envelope of these curves, called the convex hull, is the ideal ladder for that content.

Per-title encoding

A fixed ladder, the same for every video, is simple to manage but inefficient:

  • a cartoon with flat colour areas reaches excellent quality with few bits;
  • a concert with strobe lights and confetti needs many more.

With a fixed ladder the first wastes bandwidth and the second looks degraded. Per-title encoding builds a different ladder for each video, or even for each scene, starting from the analysis described above. The approach was popularised by the big streaming services, but its principles can be applied on a small scale too: just encode a few representative excerpts and compare the results.

Different codecs, different ladders

A more efficient codec lets you lower the bitrate of each rung or raise the resolution at the same bitrate. When you offer several codecs, for example H.264 for compatibility and AV1 for recent devices, you need two separate ladders: copying H.264 bitrates for AV1 means giving up the modern codec's advantage.

Practical constraints not to forget

  • Device screens: a smartphone held upright gains nothing from 4K; the rungs offered can be limited by device.
  • Encoding and storage cost: each rung multiplies work and space; for content with few views a short ladder may make more sense.
  • Aligned keyframes: all rungs must have keyframes at the same instants.
  • Consistent audio: the audio track should be the same, or at least compatible, across all rungs.

A simple procedure

  1. Pick 3-4 excerpts representative of your content.
  2. Encode them at 3-4 resolutions and 5-6 bitrates each.
  3. Measure quality against the original.
  4. For each bitrate band, choose the resolution with the best score.
  5. Drop rungs that bring no perceptible improvement over the previous one.

In short

  • The bitrate ladder defines the qualities the player can choose from.
  • Rungs should be 1.5 to 2 times apart in bitrate.
  • At low bitrates a smaller resolution often looks better.
  • Per-title encoding adapts the ladder to each video's complexity.
  • Every codec needs its own ladder.
MM
Marco Marzaduri

Marco Marzaduri works in cybersecurity, digital forensics and web development. A computer science graduate, he combines rigorous technical analysis with attention to the people who use technology.

Read also