Do I need both WebM and ogv formats when using HTML5 video?
Solution 1
For those coming to this old question: only mp4 is required nowadays!
http://caniuse.com/#feat=mpeg4
Solution 2
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.
Solution 3
Check here not all browsers support all formats native (without additional plugins)
IE9 plays only MP4, firefox 4 WebM and OGV, Chrome plays all (but there are some rumours that they won t support MP4 for newer versions, if i m right), Safari plays MP4, Opera WebM and OGG
So if you check the codecs, you should either take MP4 and WebM or MP4 and OGG to match all current browser.
nitech
Updated on January 10, 2020Comments
-
nitech over 4 years
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?