Problem statement
Design the pipeline that produces still images for uploaded videos: a poster frame, a set of thumbnail resolutions for catalog and player UI, and a scrub-preview sprite sheet used when a viewer hovers or drags the seek bar. It runs whenever a new video is available and must be reliable, idempotent, and cheap at scale.
Operating context. Hundreds of thousands of videos land each day, from short clips to multi-hour films. For each, the pipeline extracts frames at a fixed sampling policy, generates several image sizes plus a sprite sheet with a WebVTT index, stores them, and exposes stable URLs. Triggers can be delivered more than once, videos can be re-encoded and re-processed, and workers can fail; none of that may create duplicate images or leave a video stuck.
Out of scope. The video transcode itself, ML-based ranking to pick the most engaging thumbnail (assume a fixed sampling policy), the image CDN's cache configuration, and the upload service. Assume separate teams own those.
What to produce. A high-level architecture covering: how the pipeline is triggered, frame extraction and the sampling policy, generation of multiple resolutions and the sprite sheet, how work is made idempotent and de-duplicated, storage and serving of the images, and how retries, dead-lettering, and per-video status are tracked. Sketch the components and the flow for one video; we will probe specifics during checkpoints.
Functional requirements
- On completion of a video upload or re-encode, extract frames per a defined sampling policy plus a poster frame.
- Generate multiple thumbnail resolutions and a scrub-preview sprite sheet with a WebVTT index.
- Store the generated images and expose stable URLs for the player and catalog UI.
- Reprocess a video's thumbnails on demand without duplicating work already completed.
- Report per-video pipeline status: pending, processing, ready, or failed.
Non-functional requirements
- Ingest 500,000 newly available videos/day with bursts to 30 videos/sec.
- Poster thumbnail ready within 60 seconds p95 of the video becoming available.
- Full sprite sheet ready within 5 minutes p95 for a 2-hour video.
- Idempotent: a re-delivered trigger produces no duplicate stored images.
- 99.9% of videos reach a terminal state (ready or failed) without manual intervention.
- Store roughly 20 image objects per video, averaging 2 MB in total per video.
Topics
- System Design HLD
- Media Thumbnails
- Media Pipeline
- Patterns Event-Driven
- Scaling Batch