Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need both WebM and ogv formats when using HTML5 video?

From videojs.com's documentation, I had the impression that I needed to include both ogv and webm file formats (in addition to mp4).

Then I read http://www.htmlgoodies.com/html5/client/how-to-embed-video-using-html5.html#fbid=erNepglDbZl, from which it seems I just need mp4 and (ogv or webm).

What is correct? Do I need all three?

like image 562
nitech Avatar asked Jun 25 '12 10:06

nitech


People also ask

Is WebM the same as HTML5?

WebM and Ogg are two much newer file types related to HTML5 video. Ogg uses Theora encoding which is based on the open-source standard audio file format. These can be saved with a . ogg or .

Which video format is not allowed by HTML?

wmv" video files are not supported by any browser. That is the only way for WMV video files.

What is the difference between WebM and MP4?

WebM vs MP4: File Size and Quality But since WebM is specially designed for Internet, the compression ratio of WebM is generally higher than MP4 in theory, which leads to more original quality loss than MP4. And the file size of WebM is a little bit smaller than MP4.


2 Answers

For those coming to this old question: only mp4 is required nowadays!

http://caniuse.com/#feat=mpeg4

like image 102
Bart Burg Avatar answered Sep 22 '22 09:09

Bart Burg


As per Dive Into HTML5:

  • Firefox 3.5+, Opera 10.5+ and Chrome 3+ support ogv
  • Firefox 4+, Opera 10.6+ and Chrome 6+ support WebM (and ogv, assuming they don’t drop support in future)

So ogv is required for for:

  • Firefox 3.5 & 3.6
  • Opera 10.5
  • Chrome 3, 4, & 5

If you’re happy with those versions getting video via Flash (I presume that’s what VideoJS would do for them in the absence of an Ogg version), or no video at all if they don’t have Flash installed, then you don’t need the Ogg version.

Personally, I’d be very tempted to skip Ogg, just because converting video to three formats instead of two would (presumably) take 50% longer. I don’t have much experience with video though, so I don’t know what the pros and cons of each format are.

like image 32
Paul D. Waite Avatar answered Sep 20 '22 09:09

Paul D. Waite