How Streaming Works

A video is loaded in short pieces, a little ahead of what you are watching. Change the connection speed and compare two videos, one with automatic quality switching (ABR) and one without. Which one stops less?

Automatic quality (ABR)

Loaded ahead: 0 s Loading

Next piece: Low (0.5 Mbps)

Stops 0 · time stopped 0 s · played 0 s

Fixed quality

Loaded ahead: 0 s Loading

Next piece: High (3 Mbps)

Stops 0 · time stopped 0 s · played 0 s

A simplified teaching model. The 4 s segments, quality ladder and seconds are made-up model values.

How to play

Your goal is to find which video is less likely to stop. Press "Start" and two copies of the video play over the same connection. The top one picks its quality automatically (ABR); the bottom one keeps a fixed quality. Move the connection speed slider and watch how far ahead each one has loaded. When that reaches 0 seconds, the video stops. Mbps is how much data flows per second. "Auto" plays a story: fast connection, a sudden slowdown, then recovery.

Learn more

Video delivery cuts a video into short "segments" of a few seconds and fetches them in order. The player loads a little ahead of the playback position and keeps it in a "buffer", so small wobbles in the connection do not stop the video. When the buffer runs empty, playback stops (a stall) and resumes once enough has accumulated. Higher quality (bitrate = data per second) looks better but needs more data, and the connection may not keep up. So "ABR" (adaptive bitrate) chooses the quality of the next segment from the connection speed and the buffer level. The rule on this screen is a simplified teaching rule: it estimates the speed from the previous segment and picks the highest quality at or below 0.8 times that estimate. It goes down at once, up one step at a time, and does not go up while the buffer is low. Real players use many different methods, not necessarily this one. Methods that send short pieces over HTTP include HLS (described in RFC 8216, which is an informational document, not a standard) and MPEG-DASH (ISO/IEC 23009-1, first edition 2012). With HTTP, delivery can use the same routes as ordinary web pages. The segment length (4 s), the quality ladder (0.5, 1.5, 3, 6 Mbps) and the limit on how much is loaded ahead are all made-up model values. Only a slow connection is modelled as a cause of stalls. A simplified teaching model.

Read more about it: Behind the web: cookies, DNS, video and text generation →