What Formats Work Best for HTML5 Videos

11:32 PM RAWAT 0 Comments

As you may be aware there are a number of formats that are used for HTML5 videos. Different browsers support a different range of formats however, which means that some of the HTML5 formats may not be able to be viewed on certain browsers.

If you want to know exactly which formats work best for HTML5 videos, there are a few that should be at the top of your list:

  • MP4 with H.264
Essentially MP4 with H.264 is the only format that is supported by the latest version of almost all browsers. Because other formats offer better compression than the H.264 codec, versions of the same video are sometimes encoded in them – with MP4 with H.264 playing the role of a fallback to guarantee the video can be viewed.

  • WebM with VP8 or VP9
All the latest versions of browsers except for Internet Explorer, Safari, and Microsoft Edge support WebM with VP8 and VP9. On Microsoft Edge support can be added usingvarious extensions.

Because the VP9 codec is newer, older versions of many browsers do not support it, and VP8 remains more popular. However VP9 does provide significantly better compression rates and is growing in popularity.

  • Ogg Theora
All browsers except for Internet Explorer and Safari support Ogg Theora, and it was a popular alternative for some time. However WebM with VP8 provides better compression, and so it is not used as frequently anymore – but is still a viable option.

  • MP4 with H.265 (HEVC)
Despite its excellent compression rates, HEVC has not been widely adopted by browsers. As things stand only Safari and the native Android browser provide support for HEVC in HTML5 video.

  • AV1
Although new, support for AV1 on browsers has been rolled out steadily, and it is possibly to view it on the latest versions of Chromium, Google Chrome, Mozilla Firefox, and Opera. It can be enabled on Microsoft Edge as well with AV1 extensions, but is not supported on Safari or Internet Explorer.

The current decoders in browsers that support AV1 are all beta versions however, so some issues may be present. In short it is not a fully viable option for HTML5 video just yet, but is showing signs of getting there.

Based on that list it should be easy to see why the most common options in use right now are MP4 with H.264 and WebM with VP8 or VP9 respectively.

Overall those are the formats that work best, and they are the ones that you should convert your video to using a video converter for Mac or PC is you wish to publish them as HTML5 videos. The use of MP4 with H.264 is practically compulsory, and WebM with VP8 or VP9 can be used as an alternative to conserve bandwidth.

It may be worth keeping tabs on AV1 and monitoring its support on browsers. Should it become more universally-supported, it could very well end up supplanting most of the other HTML5 video formats in the not too distant future.