Video Streaming, Buffering, DASH, and CDNs
Video Streaming
Video displays a sequence of images at a rate such as 24 or 30 frames per second. An uncompressed digital image is an array of pixels whose bits represent brightness and color.
Compression lets bitrate trade off with quality. Different compression algorithms produce different rates, taking advantage of redundant information. Within a frame, repeated colors or correlated regions can be represented more compactly instead of sending every repeated value. Across consecutive frames, unchanged regions can be reused while changes are encoded.
Reference frame
Next frame
Repeated colors illustrate spatial redundancy; one changed pixel illustrates temporal redundancy.
Edit a frame and measure a toy delta encoding
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
DASH (Dynamic Adaptive Streaming over HTTP)
With a single HTTP video file at one URL, clients receive the same encoding regardless of bandwidth. DASH provides several versions at different bitrates and URLs, allowing a client to select an appropriate representation and change it as conditions change.
Adaptive streaming divides content into segments. A manifest describes available representations and segments; the client chooses a representation for its next segment. The playback buffer holds received but unplayed content. Slow downloads can drain it and cause rebuffering. Decisions depend on buffer state as well as measured bandwidth.
This simplified calculation assumes a sustained delivery rate and ignores overhead. Video bitrate, network throughput, and buffered playback seconds are different quantities.
Choose segment quality without emptying the buffer
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
KNOWLEDGE QUIZ
CDN (Content Distribution Network)
Servers occupy physical locations. Long paths can increase delay; limited bandwidth and high demand can slow a small site's server. A server failure can make its content unavailable.
A CDN resembles regional warehouses. Initially, a retailer ships everything from one warehouse, taking perhaps 3–10 days. By placing copies in regional warehouses, it can ship from a nearby location and reduce delivery time.
CDNs manage geographically distributed servers, store copies of video and other web content, and direct requests toward locations expected to provide a good experience.
Place an available copy near the viewer
Unlock the complete interactive lab, deeper explanations, and curated reference answers.
Selection also depends on content availability, load, failures, and actual network paths, not only geographic distance. A CDN does not eliminate every outage, and copies must respect update and access-control rules.
KNOWLEDGE QUIZ
Budget a video segment against the buffer
A segment plays for 4 seconds. The two representations are 3 Mbps and 1 Mbps; delivery is 2 Mbps and the initial buffer is 3 seconds. For each independent choice, compute segment bits, download time, stall time, and buffered playback immediately after the complete segment arrives. Ignore overhead and assume playback consumes buffer throughout downloading until empty.