Design a video-sharing service that supports uploading a video and playing it at different resolutions. Explain the upload, transcoding, storage, and playback paths, including how a client changes quality during playback.
### Constraints & Assumptions
The required differentiator is support for multiple video resolutions. Traffic, latency targets, codecs, and content-retention rules are unspecified; describe how they affect choices without inventing requirements.
### Clarifying Questions to Ask
- Must playback begin before every resolution has finished processing?
- Does quality selection need to be automatic, manual, or both?
- Which source formats and target devices must be supported?
```hint Separate the media lifecycle
Uploading the original, generating playable variants, and serving viewers have different failure and scaling characteristics.
```
### What a Strong Answer Covers
- Durable original storage and asynchronous, retryable transcoding jobs.
- A manifest referencing aligned segments at multiple resolutions.
- Client quality selection, CDN delivery, and metadata readiness states.
- Recovery from partial transcode failures without publishing broken variants.
### Follow-up Questions
- How would a newly generated resolution become visible to existing viewers?
- What would you do if a popular video's highest-resolution rendition repeatedly fails to transcode?
Overview: Design multi-resolution video playback with reliable uploads, asynchronous transcoding, aligned media segments, adaptive quality, and CDN delivery.
Design a video-sharing service that supports uploading a video and playing it at different resolutions. Explain the upload, transcoding, storage, and playback paths, including how a client changes quality during playback.
Constraints & Assumptions
The required differentiator is support for multiple video resolutions. Traffic, latency targets, codecs, and content-retention rules are unspecified; describe how they affect choices without inventing requirements.
Clarifying Questions to Ask Guidance
Must playback begin before every resolution has finished processing?
Does quality selection need to be automatic, manual, or both?
Which source formats and target devices must be supported?
What a Strong Answer Covers Guidance
Durable original storage and asynchronous, retryable transcoding jobs.
A manifest referencing aligned segments at multiple resolutions.
Client quality selection, CDN delivery, and metadata readiness states.
Recovery from partial transcode failures without publishing broken variants.
Follow-up Questions Guidance
How would a newly generated resolution become visible to existing viewers?
What would you do if a popular video's highest-resolution rendition repeatedly fails to transcode?