alfg / mp4-rust

MP4 reader + writer library in Rust! 🎥🦀
https://crates.io/crates/mp4
MIT License
292 stars 80 forks source link

feat(opus and fragments): add support for opus and writing fragmented mp4 files #114

Open sdwoodbury opened 1 year ago

sdwoodbury commented 1 year ago

In this repository I made a tool that managed to write a fragmented mp4 file. This was accomplished by fixing a bunch of bugs in this repository (wrong reported box sizes and not writing all the needed boxes) and by exposing the boxes so that I could create the file programmatically.

Eventually it would be nice to have something like Mp4Writer but I also think it makes this library more useful if the boxes aren't all private.

I added a box for Opus and dOps per this guide: https://opus-codec.org/docs/opus_in_isobmff.html

One last thing - the mvex box was changed to contain a list of trex boxes, which is necessary if an mp4 file will contain multiple tracks.

sdwoodbury commented 1 year ago

it might be helpful to combine some other PRs with this one: #109 #108 #106