HTML5 video formats - compatibility

Flock Dawson picture Flock Dawson · Jan 31, 2013 · Viewed 23.8k times · Source

So, I'm building a website on which users can upload an watch videos. I'm using the standard HTML5 video player (<video...> <src>...) Currently, I use multiple sources: MP4, OGG and WEBM, for cross-browser compatibility

Due to the fact that maintaining three formats is both CPU intensive (converting) as well as eating away precious disk space, I started searching the need to find out whether it's really needed to support this three formats

According to the chart I found on Wikipedia (http://en.wikipedia.org/wiki/HTML5_video), OGG and MP4 should be sufficient, as all browsers seem to be supporting at least one of these formats

... or am I missing something?

Answer

GrokSrc picture GrokSrc · Jan 31, 2013

For a comprehensive answer see: http://diveintohtml5.info/video.html There's a compatibility matrix toward the bottom that is beginning to be outdated, but was authoritative at the time the article was written.

  • Firefox 3.5+ supports Theora video and Vorbis audio in an Ogg container. Firefox 4+ also supports WebM.
  • Opera 10.5+ supports Theora video and Vorbis audio in an Ogg container. Opera 10.60 (and later) also supports WebM.
  • Chrome 3.0+ supports H.264, Theora video and Vorbis audio in an Ogg container. Chrome 6.0+ also supports WebM.
  • Safari on Macs and Windows PCs 3.0+ will support anything that QuickTime supports. In theory, you could require your users to install third-party QuickTime plugins. In practice, few users are going to do that. So you’re left with the formats that QuickTime supports “out of the box.” This is a long list, but it does not include WebM, Theora, Vorbis, or the Ogg container. However, QuickTime does ship with support for H.264 video (main profile) and AAC audio in an MP4 container.
  • Mobile phones like Apple’s iPhone and Google Android phones support H.264 video (baseline profile) and AAC audio (“low complexity” profile) in an MP4 container.
  • Adobe Flash (9.0.60.184 and later) supports H.264 video (all profiles) and AAC audio (all profiles) in an MP4 container.
  • Internet Explorer 9+ supports all profiles of H.264 video and either AAC or MP3 audio in an MP4 container. It will also play WebM video if you install a third-party codec, which is not installed by default on any version of Windows. IE does not support other third-party codecs (unlike Safari, which will play anything QuickTime can play).
  • Internet Explorer 8 has no HTML5 video support at all, but virtually all Internet Explorer users will have the Adobe Flash plugin. Later in this chapter, I’ll show you how you can use HTML5 video but gracefully fall back to Flash.