ENES

Video streaming

Watching a video while it arrives in small pieces, instead of downloading it all first.

A video is cut into short segments stored at three quality levels; the player fills a buffer and switches between high and low quality as the connection changes

Video streaming is how Netflix, YouTube or a live match reach your screen: the video starts playing after a moment, while the rest is still on its way. Behind the scenes, the video has been compressed with a codec such as H.264 or AV1, which shrinks it by storing only what changes from one frame to the next, and then cut into short segments of a few seconds each.

Each video is also prepared in several versions, from low resolution to 4K, each with a different bitrate: how many bits per second it needs. A small text file, the manifest, lists all the versions and segments. Your player reads it and requests the segments one after another over ordinary HTTP, usually from a CDN server near you, keeping a few seconds or minutes stored ahead in a buffer.

The clever part is adaptive bitrate streaming. The player constantly measures how fast segments are arriving. If your Wi-Fi slows down, it asks for the next segments in a lower quality, so the picture gets blurrier for a while but keeps moving; when the connection improves, it climbs back up. The spinning wheel of buffering appears only when the buffer runs empty faster than it can be refilled. HLS and MPEG-DASH are the two common formats for this, and live streams work the same way, with segments created on the fly a few seconds behind real time.

Keep in mind

Go deeper

Related terms

More in Networks