Mux: video that plays before it is processed
A video API that starts playback seconds after upload by transcoding segments on demand instead of the whole file up front.
The idea
The usual video pipeline transcodes every rendition before anyone can watch: queue a job, wait, publish. Mux reversed the order. An upload is cut into short segments, and a segment is transcoded when a viewer first asks for it, streamed out as it is produced. A long file can play within seconds, and renditions nobody watches are never made.
That moves work out of a batch queue and into the request path, which changes what can go wrong. Mux's write-up of a 22-day storage incident shows it well: corrupted segments came from a cancelled read that affected other readers of the same file, a race between deleting and replicating, and incomplete writes treated as complete files, all made worse by a scaling change that slowed object storage during bursts. None of these is exotic. Each is a small assumption that held until the load changed.
Read them next to the video pipeline investigation, which builds the conventional queue-and-workers design. Just-in-time transcoding is the alternative when time to first play matters more than predictable batch cost.
Read the originals
Written by the engineers who built it.
- What we learned from a 22-Day storage bug (and how we fixed it)
Drew Rodman and Constantin Britcov · Post, Mar 2026
A candid incident report. Three small races in a segment store, exposed when a scaling change slowed object storage, and why it took weeks to connect the symptoms to the cause.
- How to transcode video 100x faster; or, a Gordian knot cut
Jon Dahl · Post, Apr 2023
Why transcoding everything before publishing is slow, and the alternative: split the upload into segments and transcode each one the first time someone watches it.
Practise it
Make the decisions yourself, then compare.