AlgoViz

How Video Streaming Works

easy 45 min

A film is far too large to send as plain pictures, so a codec keeps only what is new in each frame.

Where it shows up

The same pattern appears across everyday software.

  • A school play for the parents

    Our example: one upload, four rungs, 4-second segments. Parents on trains get 540p, tablets 720p, TVs 1080p, and the CDN answers 97% of requests at the edge.

  • Video sites with uploads by everybody

    Every upload goes through inspect, split, parallel encoding and packaging. YouTube built its own encoding chips, VCU, for this work and described them in 2021.

  • A film catalogue known in advance

    Netflix places appliances inside internet providers and fills them during off-peak windows with what members are expected to watch.

  • Live streams and chat

    Partial segments or CMAF chunks keep viewers a few seconds behind the camera instead of a dozen, at the price of a thin buffer.

  • Lectures behind a login

    Signed cookies let the edge check every segment request without a call to the school's servers, and they expire after a set time.

  • Paid films with DRM

    Segments are encrypted once in CMAF. The licence server decides per viewer, and a protected module in the device decrypts.

  • A small company website

    One MP4 with its index at the front and byte ranges is enough for a short clip. A ladder pays off when people watch longer on mixed networks.