Sub topic 7
Choosing a Bitrate Ladder
This chapter assumes you know what bitrate, codec and resolution mean, and that you have seen the transcoding pipeline from the previous chapter.
What a ladder is
A bitrate ladder is the set of renditions you produce from one source video. Each rendition (also called a rung) has a resolution, a target bitrate and a codec. The player later picks one rung at a time based on network conditions. The ladder you choose sets the quality range viewers can reach, and it also sets your storage, transcoding and delivery costs.
Choosing the rungs
Start from the audience, not the source. Work through these questions in order:
- Top rung. Never go above the source resolution. Also stop where your devices stop benefiting. Few phone viewers gain from 4K.
- Bottom rung. Choose a rung small enough for your weakest realistic network, often 300 to 800 kbps. A video that plays at low quality beats one that stalls.
- Spacing. Keep neighbouring bitrates roughly 1.5x to 2x apart. Wider gaps make quality jump visibly on a switch. Narrower gaps add storage cost without a noticeable gain.
- Codec. H.264 plays almost everywhere. Newer codecs such as HEVC or AV1 save bitrate but cost more to encode and need device support, so they are often added only as extra rungs for popular titles.
A starting ladder for H.264 might look like this:
| Rung | Resolution | Video bitrate | Typical use |
|---|---|---|---|
| 1 | 640x360 | 800 kbps | Weak mobile networks |
| 2 | 1280x720 | 3 Mbps | Most laptops and phones |
| 3 | 1920x1080 | 6 Mbps | Large screens, good networks |
Publishing the ladder
The master playlist advertises every rung. BANDWIDTH is the peak bitrate of the stream in bits per second, including audio.
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=800000,RESOLUTION=640x360,CODECS="avc1.4d401e,mp4a.40.2"
360p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3000000,RESOLUTION=1280x720,CODECS="avc1.4d401f,mp4a.40.2"
720p/index.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6000000,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2"
1080p/index.m3u8Fixed ladders and per-title ladders
A fixed ladder applies the same rungs to every video. It is simple, but it wastes bits on easy content such as a slideshow and starves hard content such as sports. A per-title ladder analyses each video, often with trial encodes, and picks rungs that fit its complexity. It saves storage and bandwidth at the price of extra encoding compute. Many platforms use a fixed ladder first and add per-title encoding for their most-watched content.
Common errors
- Misaligned keyframes. Every rung must place keyframes at the same timestamps. Otherwise switching between rungs causes glitches. Use the same
-gand-sc_threshold 0settings on all rungs. - Understated
BANDWIDTH. If you declare the average instead of the peak, the player overestimates what fits and stalls. - Too many rungs. Each rung multiplies storage and CDN cache footprint. Add one only when it fills a real gap.
- Ignoring audio. Audio usually stays at one or two bitrates shared across rungs, but its bitrate still counts toward
BANDWIDTH.
Exercise
Your ladder has rungs at 800 kbps, 1.2 Mbps, 1.5 Mbps and 6 Mbps. Name two problems and one fix.
Show answer
The first three rungs are too close together, so they add storage and encoding cost with little visible difference. The jump from 1.5 Mbps to 6 Mbps is too large, so quality changes sharply and viewers on 3 to 5 Mbps connections get a poor rung. Fix it by dropping the 1.2 Mbps rung and adding a rung near 3 Mbps.