且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MediaSource的API和MP4

更新时间:2022-02-20 22:44:43

更​​新:MP4(或者更正式ISO BMFF)支持是Chrome浏览器开发/加那利。你需要生成一个符合媒体来源规范的方式你的MP4文件。幸运的是,媒体来源的设计充分考虑MPEG-DASH写的,所以任何兼容DASH-文件将与媒体来源的工作。 GPAC / MP4Box是一个很好的工具:

Update: MP4 (or more formally ISO BMFF) support is in Chrome Dev/Canary. You'll need to generate your MP4 files in a way that conforms to the Media Source spec. Fortunately, Media Source was written with MPEG-DASH in mind, so any DASH-compliant files will work with Media Source. GPAC/MP4Box is a great tool for this:

MP4Box -dash 5000 -frag 5000 -rap some_file.mp4

...将打造some_file_dash.mp4,这应该是与媒体来源兼容。有在MP4Box早期发布的版本的一些bug,所以我建议从SVN建设了。

...will create 'some_file_dash.mp4', which should be compatible with Media Source. There are some bugs in earlier released versions of MP4Box, so I recommend building from SVN for now.