abema / go-mp4

Go library for reading and writing MP4 file
https://dev.to/sunfishshogi/go-mp4-golang-library-and-cli-tool-for-mp4-52o1
MIT License
464 stars 30 forks source link

Dynamic interleaving to stream MP4 #144

Closed biorisk closed 1 year ago

biorisk commented 1 year ago

I have a simple open source Go server for files, httpfolder. I would like to add the ability to stream MP4 files that have the moov box at the end, which confuses some browsers. I know that I could use something like MP4Box to do this.

However, would this package would allow me to do dynamically interleave the moov box without modifying the file on disk? The dynamic equivalent of "mp4box -inter 500 input.mp4"? Thanks for any pointers you can give me!

sunfish-shogi commented 1 year ago

@biorisk go-mp4 has only low-level support for parsing/writing. So, if you are expert in MP4's data structure, you can implement any conversions. However, in this use case, it is hard and I do not recommend.

biorisk commented 1 year ago

@sunfish-shogi, thank you for the feedback. I expected that it would be too hard, but wanted to check.