86 seconds of CPU, or 0.36? Instagram's video trick
transcript
Instagram was spending over 80 percent of its video compute on basic versions. Not the fancy ones. The plain ones every phone can play.
Every video upload gets minimum-functionality encodings. Versions that every phone can play. Advanced encodings use newer compression. They come later. Only once a video is watched enough.
Meta wrote about this in 2022. Basic versions ate over 80 percent of video compute. Advanced encodings covered only 15 percent of watch time. So where's the waste? Think about it.
Here's the twist. The basic ladder was being encoded separately. But the frames already existed, in progressive files made for old app versions. So don't encode them again. Repackage them.
One 720p encode took 86 CPU-seconds. Repackaging those frames into an adaptive structure? Zero point three six seconds.
The cost of basic encodings fell 94 percent. And the freed compute went to advanced encodings. Their coverage grew 33 percent.
The biggest saving wasn't a faster encoder. It was not encoding at all.
Full breakdown in the lecture.