跨浏览器和网页中的跨平台视频,无 Flash
我有一个 .mov 视频文件,需要在网页中查看它。必须在 Windows、Mac、iPhone 和以下浏览器列表中查看:IE7、IE8、IE9、Firefox、Chrome、Opera、Safari。 我可以使用 HTML5,但是在版本 9 以下的 IE 中将无法查看它:( 没有flash怎么解决呢? 附言。观看的视频文件也可以是其他格式,而不仅仅是mov。
I have a .mov video file and need to view it in a web page. It must be viewed on Windows, Mac, iPhone and this list of browsers: IE7, IE8, IE9, Firefox, Chrome, Opera, Safari.
I could use HTML5, but then it wont be viewable in IE less than version 9 :(
How could it be solved without flash?
PS. the viewed video file can be another format too, not mov only.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,你想要的并不简单。 QuickTime (.mov) 文件中有哪些音频/视频编解码器?要在没有 Flash 的情况下访问所有主要平台和浏览器,您需要多次对文件进行编码(并且仍应使用 Flash 作为旧浏览器的后备)。跨平台视频播放的一个很好的介绍是:
http://diveintohtml5.ep.io/video.html< /a>
总结一下,主要的视频/音频编解码器选项是 VP8 + Vorbis、H.264 基线 + AAC 和 Theora + Vorbis。不幸的是,如果您想访问所有主要浏览器的所有最新版本,则必须提供以所有这三种格式编码的文件(您可以在 HTML5 标记中列出多个版本)。如果您愿意使用 Flash,您可以将其减少为单个 H.264 基线 + AAC 文件(在 .mp4 容器中),该文件可以由 Flash 在任何地方播放,但在 iPhone 上则可以在标签中播放。
很抱歉没有给出简单的答案,但它很复杂。 FFmpeg 是用于将文件重新编码为这些不同格式的工具。
Unfortunately, what you want is not simple. What audio/video codecs are in your QuickTime (.mov) file? To reach all major platforms and browsers without Flash, you'll need to encode the file multiple times (and should still use Flash as a fallback for old browsers). A good introduction to cross-platform video playback is:
http://diveintohtml5.ep.io/video.html
To summarize what it says, the main video/audio codec options are VP8 + Vorbis, H.264 baseline + AAC and Theora + Vorbis. Unfortunately, if you want to reach all recent versions of all major browsers, you'll have to provide the file encoded in all three of these formats (you can list multiple version in an HTML5 tag). If you're willing to use Flash, you can reduce that to a single H.264 baseline + AAC file (in .mp4 container) played by Flash everywhere but on the iPhone, where it would play in a tag.
Sorry for not giving a simple answer, but it's complicated. FFmpeg is the tool to use to re-encode your file into these different formats.
欢迎来到非标准化的视频世界(至少在 html5 之前):)
为了更具建设性,我认为您最终会设置一个矩阵,为每个浏览器版本和每个视频格式定义正确的 html 输出以正确显示视频。
如果可以的话,依靠 HTML5 功能,如果您想支持 IE <= V8,请放置正确的对象插件,可以是:
.. . 或者欢迎 IE <=8 用户并留言告诉他们 IE9 很棒。你会让 MS 家伙高兴的
welcome in the unstandardized world of video (at least before html5) :)
To be more constructive, I think you will end up in setting a matrix which defines for each browser version and for each video format the correct html output to display properly the video.
If you can, rely on HTML5 features, and if you want to support IE <= V8, put the correct object plugin, which can be :
... or welcome IE <=8 users with a message telling them IE9 is great. You'll make MS guy happy