What Formats are Needed to Publish HTML5 Videos

What Formats are Needed to Publish HTML5 Videos

Are you planning on self-hosting and publishing HTML5 videos? If you are then you need to make sure they’re in the right format, otherwise some viewers may have difficulty watching them.

Deciding on a format for your HTML5 videos is a bit more involved than you might think. Technically speaking there is no official standardized HTML5 format and browsers are free to support (or not support) any formats they see fit.

As things stand however there are three formats in general that browsers do support for HTML5 videos – and so you should use one of them:

MP4

The most universally supported format is the MP4 container – using a H.264 video codec and either an AAC or MP3 audio codec. It is supported natively on all major browsers except Chromium, which requires to use of FFmpeg to playback MP4 with H.264 videos.

Because of how widely-supported it is, MP4 has become the ‘safe’ choice for HTML5 videos and at minimum you need to use it to guarantee that your video can be watched by most viewers.

WebM

The WebM format uses either a VP8 or VP9 video codec and Vorbis or Opus audio codec. It is supported by most current browsers, except for Safari and Internet Explorer. It also has limited support on Microsoft Edge and requires the Web Media Extension package to be viewed.

While the VP9 video codec provides better compression than VP8, it isn’t supported by older versions of many browsers due to the fact that it is newer.

Ogg

The Ogg format uses the Theora video codec and Vorbis audio codec. Just like WebM it is supported by most current browsers except for Safari and Internet Explorer, and requires the Web Media Extension package for it to be supported on Microsoft Edge.

In general WebM is preferred over Ogg due to the fact that it provides better compression options. However Ogg is supported by slightly older browser versions than WebM, and is sometimes used as a fallback option for them.

Based on the browser support that is available, it should be clear that MP4 with H.264 is necessary if you want to ensure your video can be viewed. However in some cases you may want to provide it as a fallback option, and use WebM or Ogg on browsers that support it to reduce the bandwidth requirement of the videos.

Keep in mind that if you opt to use more than one format, you will need to convert multiple versions of your video content. For example you would have to convert AVCHD to MP4 using Online Video Converter, as well as WebM or Ogg depending on the option that you choose.

All said and done you should have a good grasp of which video formats are needed to publish HTML5 videos, and why you may want to use each one. At the end of the day it is up to you to determine whether you just want to publish the video as MP4 or use WebM and Ogg as well.