gpac / mp4box.js

JavaScript version of GPAC's MP4Box tool
https://gpac.github.io/mp4box.js/
BSD 3-Clause "New" or "Revised" License
1.96k stars 332 forks source link

Write as well as read. #43

Open gliese1337 opened 9 years ago

gliese1337 commented 9 years ago

Is it possible to write raw video / audio streams to an MP4 container, as well as parsing them out? If not, is adding that functionality within the realm of possibility?

cconcolato commented 9 years ago

What do you mean by "raw video" and "raw audio" streams? Uncompressed? Not sure.

gliese1337 commented 9 years ago

"Raw" as in "not already packaged together in a container format". For my particular use case, I have H.264 video and AAC audio- exactly the stuff that would go in an mdat box.

cconcolato commented 9 years ago

In that case, the answer is yes. MP4Box (not the JS version) does it.

MP4Box -add file.264 file.mp4 

or

MP4Box -add file.aac file.mp4

or

MP4Box -raw 1 file.mp4

In JS, it's feasible too. It would need to be coded though, not sure when. I'll add it to the feature request.