Tutorials Developer

How Livestream Bitrate Ladders and Adaptive Streaming Work

By Infinite Creation · Advanced · ~14 min
A 1960s mid-century comic book style editorial illustration showing two engineers at terminals in a machine room, with a keyframe graph editor visible in the frame.

Overview

A livestream doesn't send one single video quality to every viewer. It's typically encoded simultaneously into a 'bitrate ladder' of several quality levels, and each viewer's player automatically and continuously chooses the best level for their current connection, switching in real time as conditions change.

Steps

1

The simple version: multiple quality versions are made available, and the player picks

At the simplest level, a streaming platform creates several different quality versions of the same live video simultaneously, and each viewer's video player automatically selects and plays whichever version best matches their current internet connection, without the viewer needing to manually choose.

2

What's really happening: encoding a bitrate ladder in real time

The streaming platform's encoding infrastructure takes the incoming live video and simultaneously produces several separate encoded versions at different resolutions and bitrates (commonly called a bitrate ladder, ranging from a low-bandwidth low-resolution version up to the highest-quality version), all in real time as the stream is happening, not after the fact.

3

What's really happening: the player continuously measures and adapts

A viewer's video player continuously measures how quickly it's able to download each small segment of video, and if segments are arriving slower than needed to keep the stream playing smoothly, it automatically switches down to a lower-bitrate version from the ladder for the next segment (and switches back up when conditions improve). This happens automatically, often within seconds, without the viewer noticing anything beyond a brief quality change.

4

Why this matters for how you configure your own stream

Understanding that your platform is likely generating a full bitrate ladder from your single source stream explains why your own upload settings (resolution, bitrate, keyframe interval) matter. A higher-quality, well-configured source stream gives the platform's bitrate ladder more information to work with at every level, generally producing better results across all quality tiers than a poorly-configured source.

Tested: keyframes, segments and the cost of switching

We tested Pro Tip 1 and steps 2 and 3 on 2026-09-28 with FFmpeg 8.1.2 (x264) on an Apple M1 Max Mac running macOS 26.6.2. The video was a minute of computer-generated 1080p footage at 25 frames a second, panning across detailed pictures, with 12 hard cuts at irregular times. We encoded it as a streamer's upload would be sent (x264 veryfast at 6 Mb/s) with four keyframe settings. Then we packaged each upload into HLS segments without re-encoding it, as a platform does when it passes your own quality straight through, and asked for 2-second segments every time.

Keyframes in the uploadSegments in 60 sShortest segmentLongest segment
Every 2 s302.0 s2.0 s
Every 4 s154.0 s4.0 s
Every 10 s610.0 s10.0 s
x264 defaults (at each cut, at most 10 s apart)132.2 s7.4 s

Pro Tip 1 holds, and the table shows the reason. A segment can only start on a keyframe, so the packager ignored the 2 seconds we asked for and followed the upload. With a keyframe every 10 seconds, every segment was 10 seconds long. A player changes quality at the start of a segment (step 3), so on a passed-through stream a viewer's player waits up to that long for its next chance to switch. With x264's defaults the keyframes fell on the cuts, and the segments ran from 2.2 to 7.4 seconds, of uneven length. When a platform re-encodes your stream into its ladder, it sets its own keyframes, and this limit applies to its encoder rather than to yours.

A player moving between rungs expects each to be cut at the same points, so that the next segment it fetches starts where the last one ended. We encoded four rungs one at a time, from 1080p at 6 Mb/s down to 360p at 0.6 Mb/s. With a fixed 2-second interval they lined up exactly. With x264's defaults they also lined up, at the same 12 cuts, but only because every cut in our video is a hard one that the encoder detects the same way at every size. Fades and gradual changes were not tested. A fixed interval does not depend on that.

Short intervals cost picture quality, because a keyframe is coded without reference to the frames before it and takes far more bits. At a constant 3 Mb/s at 720p, the same bits for each, a keyframe every 4 seconds gave 36.6 dB PSNR and every 10 seconds 37.8 dB. Every 2 seconds gave 35.0 dB, and every second 34.8 dB, a difference within what separate runs of the same encode varied by. So 2 seconds is a trade: faster switching and regular segments, paid for in quality at a fixed upload rate. Going shorter than 2 seconds cost little more in this test.

Step 2 says the ladder is encoded in real time. One FFmpeg process made all four rungs from the 1080p source, and the 60-second video took 19 seconds, including decoding the lossless source, on a Mac that was busy with other work at the time. A platform does this on servers for every live channel at once, which this test does not measure.

To send a keyframe every 2 seconds, and at no other time, from FFmpeg at 30 frames a second: ffmpeg -i input -c:v libx264 -preset veryfast -b:v 6M -maxrate 6M -bufsize 12M -g 60 -keyint_min 60 -sc_threshold 0 -f flv rtmp://server/app/key

Validated. Measured 2026-09-28 with FFmpeg 8.1.2 (x264 and its HLS muxer) and numpy on an Apple M1 Max Mac running macOS 26.6.2. The video is computer-generated, with hard cuts only. We packaged the segments ourselves with FFmpeg. We did not test any platform's ladder or packager, or a player choosing between rungs over a real connection. Times are from a Mac running other software and will differ on other machines. x264's constant-bitrate encodes vary by about 0.1 dB PSNR from run to run.

Pro Tips

  • Configure your own stream's keyframe interval according to your platform's recommendation. YouTube recommends 2 seconds and no more than 4, and Twitch gives 2 seconds in every configuration it recommends. This directly affects how quickly the platform's bitrate ladder segments can be created and how smoothly viewers' players can switch between quality levels.
  • Send the highest-quality, well-configured source stream your upload bandwidth reliably supports. The platform's bitrate ladder is generated from your source, so a better source generally improves results across every quality tier viewers might see.
  • Don't assume all your viewers are seeing your stream at your uploaded quality. Most are automatically receiving whichever ladder level best matches their own connection, which is normal, expected behavior, not a sign of a problem.

What You'll Learn

Livestreaming platforms generate a bitrate ladder of several quality versions from your single source stream in real time, and each viewer's player continuously measures their own connection and automatically switches between ladder levels, understanding this explains both normal viewer experience variation and why your own stream configuration matters.

The Plain-English Version

Your stream isn't seen identically by everyone. The platform automatically creates several versions at different quality levels from what you send, and each viewer's device picks whichever version it can reliably keep up with, switching automatically as their connection changes, the same way a smart thermostat continuously adjusts rather than picking one setting and leaving it.

The Misunderstanding This Clears Up

People sometimes assume all viewers see their stream at the exact quality they uploaded, and are confused when some viewers report a lower-quality experience. That's the adaptive bitrate system working as intended for viewers with more limited connections, not a sign your stream itself is broken.

Where This Fits

The bitrate ladder happens on the platform, and OBS Studio for Beginners covers the encoder settings you control in OBS.

FAQ

Q: Why do some of my viewers see lower quality than others during the same livestream?
A: This is normal, expected adaptive bitrate streaming behavior. The platform generates several quality versions from your source stream, and each viewer's player automatically selects and switches between them based on their own current connection speed, so viewers with more limited connections will see a lower quality tier by design.

Q: Does my own stream upload quality matter if the platform re-encodes it into multiple versions anyway?
A: Yes. The platform's entire bitrate ladder is generated from your single source stream, so a higher-quality, well-configured source (correct keyframe interval, adequate bitrate and resolution) gives the platform more information to work with, generally improving results across every quality tier viewers might receive, not just the top one.

Sources

Read 28 September 2026. The keyframe figures in the first Pro Tip come from these two pages. The measurements in the Tested section are our own.

Translate this page

Machine translation provided by Google Translate, on Google’s servers. We do not check these translations and they will get technical terms wrong. The English page is the authoritative one. Following a link sends this page’s address to Google. Your browser may also offer to translate this page itself, which keeps the request on your device.