Code RoomAnimated preview generation
MediumPrep Room Coding #3615

Animated preview generation

System designDistributed systemsMid–Senior~35 min

Design the animated-preview / short-loop generation pipeline for a short-video feed where, as a user scrolls, each video tile plays a tiny silent looping preview (a few seconds, low-res, autoplaying) before they tap in — generated for every uploaded video so the feed feels alive. You must pick the most engaging few-second segment of each video, produce a tiny fast-loading looping asset (animated WebP/short MP4) at feed scale (hundreds of millions of videos), and serve it cheaply since most previews are never even watched to completion.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts (data model, bottlenecks, consistency, failure modes) and name the trade-offs you are making.

Clarify4:00 left
Estimate4:00 planned
Design11:30 planned
Deep dive9:30 planned
Failure6:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.