HTML5 视频:我应该支持多少种视频格式?
我正在开发一个网站,用户可以在其中上传视频。我试图走“最佳实践”路线并支持使用 元素播放这些视频,但是似乎与此相关的存储开销巨大。
我已阅读“深入了解 HTML5”的视频部分(以及其他网络资源),并且似乎为了确保跨平台播放,必须以多种格式存储视频:
- Ogg(Firefox 3.5+、Opera 10.5+ 以及 6.0 之前的所有 Chrome 版本)
- WebM(Firefox 4+、Opera 10.6+、Chrome 6.0+,不是必需的,因为所有支持它的浏览器也支持 Ogg,但由于硬件加速支持而比 Ogg 更好)
- MP4(Safari 3.0+、Internet Explorer 9(以及我计划为其创建应用程序的移动设备,如果网站取得了一定的成功,因此我们将忽略这些))
- Flash(所有版本的浏览器与较低的数量比上面多)
我很好奇实际执行此操作的网站数量。这是很大的存储开销(在我看来),特别是当涉及以不同质量存储视频的主题时。我正在考虑只支持 WebM 和 Flash,但这会给相当一部分用户留下这样的印象:我的网站不支持“HTML5 视频”,而实际上它是支持的。
有人对我应该支持多少种格式有建议吗?全部?一些(哪个)?只是闪光吗?
I'm developing a site where users can upload their videos. I'm trying to go the "best practices" route and support playing back these videos using the <video>
element, however it seems that there is an immense storage overhead associated with this.
I've read the video portion of "Diving in to HTML5" (along with other web resources), and it seems that in order to ensure cross-platform playback, one has to store the video in several formats:
- Ogg (Firefox 3.5+, Opera 10.5+ & all Chrome versions before 6.0)
- WebM (Firefox 4+, Opera 10.6+, Chrome 6.0+, not essential because all browsers that support it also support Ogg, but better than Ogg because of hardware acceleration support)
- MP4 (Safari 3.0+, Internet Explorer 9, (and mobile devices which I plan on creating apps for if the site is moderately successful, so we'll leave those out))
- Flash (all versions of browsers with lower numbers than above)
I'm curious about the number of sites that actually do this. That's a lot of storage overhead (imo), especially when the topic of storing the video in different qualities comes in to play. I'm thinking of just supporting WebM and Flash, but that would leave a sizeable portion of users under the impression that my site doesn't support "HTML5 video", when it reality it does.
Does anyone have suggestions on how many formats I should support? All? Some (which)? Just flash?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在网络上的 HTML5 视频环境得到改善之前,您应该使用所有这些。事实证明,有很多网站都在这样做,所以现在,您也应该这么做。
Until the HTML5 video enviroment on the web improves, you should use all of them. Turns out, there are quite a few sites doing this, so for now, you should too.