Adaptive Streaming - System Design
Machine-readable: Markdown · JSON API · Site index
Описание видео
Adaptive streaming allows video platforms like YouTube to deliver smooth playback regardless of network speed or device type.
When a creator uploads a video the system immediately kicks off a background process called transcoding.
Transcoding compresses the original massive raw video file into a highly optimized digital format.
The system does not just create one optimized file it duplicates the video into multiple different resolutions.
It generates separate versions for 144p 360p 720p 1080p and even 4K quality levels.
Each of these resolution versions is then sliced up into tiny video segments that are only a few seconds long.
A manifest file is created to act as an index map for all these different resolutions and segments.
When a user watches a video the video player reads this manifest file to understand what streams are available.
The player constantly monitors the user's live network bandwidth and device CPU usage.
If the internet speed is fast the player requests the high-resolution 1080p segments.
If the internet connection suddenly drops the player automatically switches to fetch the lower-resolution 480p segments instead.
This seamless switching prevents the video from buffering and ensures the playback never freezes for the user.
Common protocols used to manage this adaptive switching include HLS by Apple and MPEG-DASH.