← Lessons

quiz vs the machine

Gold1430

System Design

Image and Video Transcoding Pipelines

Turning one uploaded master into many sizes, formats, and qualities.

6 min read · core · beat Gold to climb

One Upload, Many Outputs

Users upload a single high quality master, but devices need many variants: different resolutions, formats, and bitrates. A transcoding pipeline generates these outputs automatically.

Pipeline Stages

  • Ingest receives the upload and validates it
  • Queue holds jobs so workers process at their own pace
  • Transcode workers produce each variant, often in parallel
  • Store writes outputs to object storage
  • Publish makes them available through the CDN

Why Asynchronous

Transcoding video is slow and CPU heavy. Doing it inline would block the upload response. Instead the upload returns immediately, a message queue decouples ingest from processing, and a worker pool scales with backlog.

Practical Concerns

  • Idempotency so a retried job does not duplicate work
  • Progressive availability by publishing a low resolution variant first
  • Cost control since transcoding is the most expensive step

Key idea

A transcoding pipeline decouples upload from processing with a queue and worker pool, turning one master into many device variants asynchronously while controlling cost and enabling progressive availability.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is transcoding usually done asynchronously through a queue?

2. Why does the pipeline produce multiple variants from one master?

3. Why should transcoding jobs be idempotent?