bvibber / ogv.js

JavaScript media player using Ogg/Vorbis/Theora/Opus/WebM libs compiled with Emscripten
https://brooke.vibber.net/misc/ogv.js/demo/
Other
1.19k stars 99 forks source link

MP4 container muxer/demuxer #191

Open bvibber opened 9 years ago

Marc477 commented 9 years ago

This would be really great, since broadway.js does not support streaming and does not support audio channel.

jseward311 commented 5 years ago

I have a need for this. Can we start up the discussion?

bvibber commented 5 years ago

Sure! I'm wanting this since we might end up standardizing on MP4 container for AV1 anyway, so good to make sure it gets done. :D Mainly we need an MP4 demuxer, either something in JS that can be plugged in or something that's in C/C++ that can easily be wrapped with emscripten like the other demuxers. Needs to grok the various codecs and report them correctly, handle indexed seeking, and detect keyframes.

It's probably possible to grab an existing JS MP4 parser from various projects that use them for doing MSE manipulation or other tricks, though I don't know if that's the easiest option. If using existing code, we'll want something MIT-licensed or 2-clause BSD licensed for compatibility -- ogv.js is meant to be reusable without restriction so I've been avoiding GPL or LGPL libraries which are a little trickier to integrate.

(For H.264 and AAC video/audio codecs I'm leery of shipping them in the main distribution because of the patents, but would be happy to work with folks on making a drop-in plugin for those.)