开发者

< video > with h264/ogg/webm and flash with h264 fallback, or just < video > with h264 and flash with h264 fallback?

开发者 https://www.devze.com 2023-02-07 12:37 出处:网络
This excellent article explains how to do fully compatible video on the web. http://diveintohtml5.ep.io/video.html However, I\'m bothered that it 开发者_开发知识库requires the video to be encoded and

This excellent article explains how to do fully compatible video on the web. http://diveintohtml5.ep.io/video.html However, I'm bothered that it 开发者_开发知识库requires the video to be encoded and stored three times.

What is the advantage of using < video > h264/ogg/webm + flash h264 vs doing browser detection for h264 compatible browsers and rendering a < video > tag, otherwise rendering a flash player to play the same h264 video? In this case Safari, Chrome, Andoid, and iOS would use the video tag, while IE, FireFox, and Opera would use Flash.

Advantages for encoding as h264, ogg, and webm:

  • This would catch the case of Firefox and Opera users who did not have Flash installed (should not be an issue with my user base)
  • Use < video > more frequently (although I don't see this as an actual advantage to end users)

Advantages for encoding only in h264 and playing in either < video > or Flash player

  • Only encode once, not three times
  • Only store once, not three times (save money on CDNs)


See this post: http://dev.innovationfactory.eu/2011/05/31/html5-video-for-all-browsers-including-ie-9/

We use the h.264 format for now, although we'd much rather see MS and Apple support WebM.

File sizes for our demo file:

  • .webm: 2.5 MB
  • .theora.ogv: 4.4 MB
  • .mp4: 5.8 MB

File converted using the Miro video converter.

0

精彩评论

暂无评论...
验证码 换一张
取 消