Streaming, Gaming & Smart Devices
How Video Streaming Works
Follow a show from the studio file to your screen: encoding, segments, content delivery networks, buffering and playback.
Key takeaways
- A streaming service converts each title into many compressed versions at different resolutions and bitrates before you ever press play.
- Video is delivered as a series of short segments, usually a few seconds each, listed in a manifest file the player reads first.
- Content delivery networks keep copies of popular segments close to viewers, which shortens the trip and spreads the load.
- The player measures your connection and buffer continuously and picks the quality of each segment as it goes.
Video streaming works by cutting a video into short pieces, storing several quality versions of each piece on servers near you, and letting your player download them one after another while you watch. Your device always tries to stay a little ahead of what's on screen. That reserve is called the buffer.
Nothing about this requires a special kind of internet connection. Most on-demand services deliver video over ordinary web protocols, the same ones that load a web page. The clever parts are in how the files are prepared, where they're stored and how the player decides what to ask for next.
Why the original file is never what you get
A finished movie or episode arrives at the streaming service as a very large, high-quality master file. Sending that to your living room would take far more bandwidth than almost any home connection offers, and most screens couldn't show the difference.
So the service encodes it. Encoding means compressing the video with a codec, a method for describing pictures with much less data. A codec keeps what your eye notices and discards or approximates what it mostly doesn't. It also takes advantage of the fact that one frame usually looks a lot like the one before it, so it can store the changes instead of the whole picture.
Different codecs get different results from the same number of bits, and not every device supports every codec. Our guide to H.264, HEVC, VP9 and AV1 covers how they compare.
Audio is compressed separately, often in several languages and channel layouts, and subtitles are stored as their own small text or image tracks. Your player combines the right video, audio and text at playback time.
The ladder of versions
Services don't make one compressed copy. They make a set, often called an encoding ladder. Each rung is the same title at a different resolution and bitrate. Bitrate is the amount of data used per second of video, measured in megabits per second (Mbps) or kilobits per second (kbps).
A simplified ladder might look like this. The figures are illustrative; real services choose their own and often tune them per title.
| Rung | Resolution | Example bitrate | Typical use |
|---|---|---|---|
| Low | 640 x 360 | 0.8 Mbps | Weak mobile signal |
| Medium | 1280 x 720 | 3 Mbps | Phones and small screens |
| High | 1920 x 1080 | 6 Mbps | Most TVs and laptops |
| Top | 3840 x 2160 | 16 Mbps | 4K TVs on fast lines |
A quiet talking-head scene needs far fewer bits than confetti, rain or a handheld chase. Many services analyze each title, or each scene, and spend bits where the picture is hardest to compress.
Segments and manifests
Each version of the video is divided into segments, commonly somewhere between two and ten seconds long. Alongside the segments sits a manifest: a small text file that lists the available versions and where to find each piece.
The two widespread formats are HLS (HTTP Live Streaming), which Apple created and documented in RFC 8216, and MPEG-DASH, an international standard from ISO. HLS manifests are plain text playlists ending in .m3u8. DASH manifests are XML files, usually ending in .mpd. A shared container format called CMAF lets one set of media files serve both, which saves storage.
A trimmed HLS master playlist looks like this.
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=3000000,RESOLUTION=1280x720
720p/playlist.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6000000,RESOLUTION=1920x1080
1080p/playlist.m3u8 Segments matter because they create natural switching points. After finishing one, the player is free to fetch the next from a higher or lower rung. They also let a player jump to minute 40 without downloading minutes 1 through 39.
How the video gets close to you
If every viewer fetched every segment from one data center, distant viewers would suffer and the links near that building would clog. Instead, services use a content delivery network (CDN), a large set of servers placed in many cities and often inside or beside internet providers' own networks.
When you request a segment, you're directed to a nearby server. If it already holds a copy, it sends it straight away. If it doesn't, it fetches the segment from farther back, keeps a copy and passes it on, so the next viewer gets it faster. Popular new releases can be pushed out in advance during quiet hours. The article on how a CDN speeds up a website explains the caching mechanics, which are the same for video.
The path still ends with your provider's network and your home Wi-Fi. A CDN server a few miles away can't help if the signal in your bedroom is poor.
What happens when you press play
Pressing play starts a quick conversation. Your app first talks to the service itself to confirm your account and what you're allowed to watch. It receives the address of a manifest and, for protected titles, a way to request a decryption license. Then it turns to the CDN for the media.
The player usually starts at a cautious quality so the picture appears quickly, then climbs once it has measured how fast segments arrive. That's why the first few seconds of a show sometimes look soft.
The encryption and license step is digital rights management. It also explains why some devices get a lower resolution than others on the same account.
The buffer and the quality decision
Your player downloads faster than it plays whenever it can. The extra goes into the buffer, which might hold anywhere from a few seconds to a few minutes of video depending on the device and service. A full buffer rides out a brief dip in speed without you noticing.
After each segment, the player looks at two things: how quickly the data arrived and how much video is waiting. If both look healthy, it asks for a better rung. If downloads slow and the buffer drains, it steps down. The goal is to avoid the spinning circle, even at the price of a blurrier picture. Adaptive bitrate streaming is the name for this behavior.
When the buffer empties completely, playback stops until enough data arrives. If that happens to you often, work through the usual causes of buffering.
Why TCP and QUIC, and where live differs
On-demand video typically travels over HTTP, carried by TCP or by QUIC, the transport underneath HTTP/3. Both retransmit lost data, so what arrives is complete. A short delay for a resend is harmless when you have seconds of video in reserve.
Video calls face the opposite situation. They can't wait, so they usually send media over UDP and tolerate small gaps. The difference is explained in TCP vs. UDP.
Live streaming sits in between. The video is encoded while the event happens, the manifest keeps growing as new segments appear, and the player can't build a large buffer because the future doesn't exist yet. That trade-off between delay and smoothness is the subject of how live streaming works.
What your device does with the data
Receiving the bytes is only half the job. The player takes each segment, decrypts it if necessary, separates the video and audio tracks and hands the video to a decoder. Most phones, TVs and streaming boxes have dedicated circuits for this, which is why a small stick can play high-resolution video without much power.
The decoder rebuilds full frames from the compressed instructions, and the player shows them at the right moments in step with the sound. If decoding can't keep up, you see dropped frames or stutter even though the network is fine. Old hardware and software-only decoding are the usual reasons.
The player also handles the extras. It switches audio languages by fetching a different audio track, draws subtitles on top of the picture and remembers your position. That position is sent back to the service, so you can stop on the TV and continue on your phone.
What the service sees while you watch
A streaming app reports back as it plays. Typical reports include startup time, stalls, quality changes, errors and the type of device and network. The service uses them to spot a failing delivery server, tune its encoding ladder and fix app bugs.
It also records viewing activity: what you started, how far you got and what you searched for. That feeds recommendations and, on ad-supported plans, advertising. Account settings often let you remove items from your history or limit some uses. The choices differ between services, so look at the privacy section of each one.
On a smart TV, the television itself may collect information separately from the apps, which is a reason to review its settings too.
How much data it uses
Data use follows bitrate directly. Divide the bitrate in megabits per second by eight to get megabytes per second, then multiply by the length. A 5 Mbps stream moves 0.625 megabytes each second, or about 2.25 gigabytes per hour. A 16 Mbps stream comes to about 7.2 gigabytes per hour.
If your plan has a monthly limit, the quality setting in each app is the lever that matters. You can try different speeds and file sizes in the data rate and transfer time planner.
Downloads for offline viewing
Many apps let you download titles. The mechanism reuses much of the same machinery: the app saves the segments for one chosen quality to your device, still encrypted, along with a license that allows playback for a limited period. That's why a downloaded episode can expire, or refuse to play until you reconnect, and why you can't simply copy the file to another device.
Downloading ahead of a flight or a commute is also the most reliable fix for a weak connection, since the network is only involved once and at a time you choose.