News for hackers. Stuff that matters.
Re:Writing an MP4 Muxer for Fun and Profit by Retr0id on Thursday July 18, 2024 @06:34PM (#41000380)
> It kind of hurts that several days of work and research can be summed up in a couple paragraphs, but that's what the "pain" part in the subtitle is for.

Having recently written my own fragmented-MP4 remuxing library, I felt this pain too, and my soon-to-be-published writeup has very similar things to say about the ISO's paywalling practices.

I think one of the hardest parts of ISO-BMFF, aside from spec availability, is that it's pretty hard to implement "cleanly", making existing code confusing to use as reference. (My own implementation is certainly not clean either)

Re:Writing an MP4 Muxer for Fun and Profit by Lammy on Thursday July 18, 2024 @07:00PM (#41000543)
I feel zero shame for torrenting ISO standards PDFs.
Re:Writing an MP4 Muxer for Fun and Profit by Retr0id on Thursday July 18, 2024 @07:01PM (#41000556)
Me neither, but I couldn't actually find any torrents for the mp4-related specs (I did find what I needed with some google-fu, though)
Re:Writing an MP4 Muxer for Fun and Profit by der_rod on Thursday July 18, 2024 @08:41PM (#41001092)
> Having recently written my own fragmented-MP4 remuxing library, I felt this pain too, and my soon-to-be-published writeup has very similar things to say about the ISO's paywalling practices.

Would be curious to hear what goals you had with writing a muxer yourself as well, given that most people just use LibAV/GStreamer/GPAC and call it a day.

> I think one of the hardest parts of ISO-BMFF, aside from spec availability, is that it's pretty hard to implement "cleanly", making existing code confusing to use as reference. (My own implementation is certainly not clean either)

I certainly wouldn't call the OBS implementation "clean" either. It's very much inspired by the FFmpeg/LibAV implementation since that one is fairly straightforward (not a lot of abstraction), and gets the job done (and also is GPL/LGPL so not a huge concern looking at it).

Re:Writing an MP4 Muxer for Fun and Profit by Retr0id on Thursday July 18, 2024 @09:06PM (#41001242)
The short answer is, it's for an exploit. It involves some slightly less-well-trodden boxes, and adding specially crafted metadata to live-generated videos in real-time, which existing libraries couldn't help me with much (and I did spend some time fighting a few libraries, but couldn't make them do precisely what I wanted).

"Library" is perhaps an overstatement, it does the things I need and not much more.

Re:Writing an MP4 Muxer for Fun and Profit by der_rod on Thursday July 18, 2024 @09:25PM (#41001338)
A hah, that sounds cool, looking forward to the writeup!