Get the latest tech news

Writing an MP4 Muxer for Fun and Profit


(Except there is no profit, only pain) In OBS 30.2 I introduced the new

This allows for a hierarchical structure of the file and makes it easy to extend the format by introducing new boxes containing additional information without breaking backwards compatibility with existing software. There are two things here that create the main problem we have with MP4: The moov sits at the end and is written when finalising the file, and it is required to be able to make sense of the data contained in the mdat box. The process of building this implementation took me down quite a few rabbit holes, as it required me to learn a lot of low-level details about how audio and video data is stored in files, and sometimes left me wondering why my results were different from the references I was using.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fun

Fun

Photo of profit

profit

Photo of mp4 muxer

mp4 muxer

Related news:

News photo

My 4 favorite iOS 18 features make iPhone a lot better, and more fun

News photo

Optimizing a bignum library for fun

News photo

With the latest iOS 18 developer beta, Apple makes flashlight UI more fun