Video Streaming Concepts

When you watch video on YouTube or Netflix, you're not downloading a single file. Instead, the video streams to you in chunks, with quality adjusting automatically based on your connection speed. This is adaptive bitrate streaming, and it's how video works at scale.

Streaming vs. Progressive Download

Progressive download fetches a video file from start to finish. You can start watching before it completes, but you're downloading one file at one quality level. If your connection slows, playback buffers.

Streaming delivers video in small segments, typically 2-10 seconds each. The player requests segments as needed, and the server can provide different quality versions. This enables adaptive behavior impossible with progressive download.

Adaptive Bitrate Streaming (ABR)

ABR encodes video at multiple quality levels — perhaps 360p, 720p, 1080p, and 4K. Each quality level is split into segments of equal duration.

The player monitors download speed and buffer levels. When bandwidth is high, it requests higher quality segments. When bandwidth drops, it switches to lower quality to prevent buffering. Users see quality adjust smoothly rather than playback stopping.

User starts video → Player requests 720p
Connection slows → Player switches to 480p
Connection improves → Player switches to 1080p

This happens automatically, often without users noticing.

Streaming Protocols

HLS (HTTP Live Streaming) was developed by Apple and is now widely supported. It uses .m3u8 playlist files and .ts video segments.

DASH (Dynamic Adaptive Streaming over HTTP) is an open standard with growing support. It uses .mpd manifest files and can use various segment formats.

Both work over standard HTTP, making them compatible with existing web infrastructure and CDNs.

HLS Structure

video/
├── master.m3u8          # Lists available qualities
├── 720p/
│   ├── playlist.m3u8    # Lists segments for 720p
│   ├── segment001.ts
│   └── segment002.ts
└── 480p/
    ├── playlist.m3u8
    ├── segment001.ts
    └── segment002.ts

The master playlist tells the player what quality options exist. Quality-specific playlists list the actual video segments.

Video Streaming Services

Building streaming infrastructure is complex. Services like Mux, Cloudflare Stream, and AWS MediaConvert handle encoding, storage, delivery, and player integration. For most applications, using a service beats building your own.

See More

Further Reading

You need to be signed in to leave a comment and join the discussion