MediaSource的API和MP4 [英] MediaSource API and mp4

查看:232
本文介绍了MediaSource的API和MP4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我跟着此内容从HTML5ROCKS例子.COM,正在使用MediaSource的API和一个.webm视频。我想这个例子与其他.webm视频和它的工作,但是当我.mp4格式的视频试过没有奏效。是否有可能以某种方式?

I followed this example from Html5Rocks.com, that is using the MediaSource API and a .webm video. I tried the example with another .webm video and it was working, but when I tried with .mp4 video it didn't work. Is it possible somehow?

推荐答案

更​​新: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.

这篇关于MediaSource的API和MP4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆