Design Clip Creation From a Live Stream
Last updated: November 29, 2026
Quick Overview
Design the service that lets any viewer create a clip of the last 30 to 60 seconds of a live stream with one click, edit the start and end, and share a playable link within seconds, including when thousands of viewers clip the same moment.
Twitch
November 29, 20260
0
0 solved
Design the service that lets any viewer create a clip of the last 30 to 60 seconds of a live stream with one click, edit the start and end, and share a playable link within seconds, including when thousands of viewers clip the same moment.
Clips are how Twitch moments spread outside the platform, and the hard part is that the video must already be captured when the viewer clicks. Interviewers look for a design that reuses the HLS segments the video system already produces, handles thundering herds on big moments, and keeps storage costs sane.
What the Interviewer Expects
- Reuses already-transcoded HLS segments from a rolling buffer instead of re-recording
- Separates clip metadata creation from rendering
- Dedupes or shares work when many users clip the same moment
- Gives a clear path from draft clip to published, playable link
- Addresses storage tiers and retention
- Mentions moderation and DMCA checks on published clips
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- Ten thousand viewers clip the same play in five seconds. What do you do differently?
- How do you support frame-accurate trims when segments are two seconds long?
- How would you rank clips for a channel's 'top clips this week' page?
- What happens if the stream ends right after someone clicks?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: create a clip from the recent past of a live stream, adjust bounds within the buffer, title it, publish, play anywhere via link and embed. Non-functional: draft playable within about 5 sec...
High-Level Design
The transcoder already emits short HLS segments per rendition. Keep a rolling buffer of the last about 90 seconds of segments per channel (in memory on origin plus a short-lived object store copy). A ...