A two-hour film would hold one worker for hours. So cut it up.
transcript
A creator uploads a two-hour film. One worker would take hours to transcode it. And its first viewer waits for every single rendition.
It gets worse. A crash at 95 percent starts the whole video over. One corrupt frame crashes the worker. On every retry. And a burst of evening uploads queues behind a few long films.
So cut the video. At closed GOP boundaries, where a chunk decodes without its neighbours. About 4 seconds each. Every chunk becomes its own job.
A 12-minute video becomes 180 chunks. Tier 1, 144p to 480p, runs at high priority, in its own queue. A worker per chunk. So the tier takes about as long as one chunk. HD follows. 4K and newer codecs only for videos watched enough.
Every output gets a fixed key. Video, chunk, tier, encoder version. A retry overwrites the same object. A crash costs one chunk, not one video. And a poison chunk goes to a dead-letter queue. Not round and round.
Now a three-hour 4K concert. 2,700 chunks. Tier 1 on 2,000 workers: 27 seconds. Watchable about a minute after the last byte. The slow step? The upload. About 40 minutes, on a 200 megabit uplink.
One video becomes thousands of small jobs you can retry. Ship the cheap version first. Let compute follow watch time.
Full breakdown in the lecture.