← Lessons

quiz vs the machine

Platinum1780

System Design

The Live Streaming Pipeline

From camera ingest to packaged segments delivered through a CDN.

6 min read · advanced · beat Platinum to climb

The stages

A live pipeline turns a camera feed into cacheable segments viewers can play. The stages are ingest, transcode, package, and deliver, with a control loop watching latency and quality.

Ingest and transcode

The encoder pushes a contribution feed over a protocol like rtmp or srt to an ingest service. A transcoder then produces the ladder of renditions, encoding the source into several bitrates with aligned segment boundaries so players can switch cleanly.

Package and deliver

  • Packager wraps renditions into HLS or DASH segments and writes manifests.
  • Origin stores the rolling window of recent segments.
  • CDN caches segments at the edge and fans out to many viewers.

Latency and scale tradeoffs

Latency comes from segment length, buffering, and propagation. Low latency modes use shorter segments and chunked transfer to shave seconds, at the cost of more requests. The CDN is what lets one stream reach millions, since each segment is a cacheable file shared across viewers.

Key idea

A live pipeline ingests, transcodes a ladder, packages segments, and lets the CDN fan out cacheable segments to millions, trading segment length against latency.

Check yourself

Answer to earn rating on the learn ladder.

1. Why must rendition segment boundaries be aligned in a live ladder?

2. How does a CDN let one live stream reach millions?

3. What is the tradeoff of low latency live modes?