WebM Format: Basic Facts, Compatibility, and WebM vs. MP4

WebM Format

What Is WebM Format?

WebM is a royalty-free, open-source media file format for storing audio and video content. It was created in 2010 by Google and is based on the Matroska format. WebM is designed for use in modern web environments and is suitable for both commercial and non-commercial applications.

Audio-compression technologies, such as Opus and Vorbis, and video-compression technologies, such as VP8 and VP9, are integrated into WebM digital streams.

You can play WebM files in:

  • Major web browsers, such as Chrome, Opera, and Firefox..
  • Browsers like Safari and Internet Explorer, but they require third-party plugins.
  • The YouTube HTML5 Player uses WebM files to stream videos.
  • Later versions of Android also support WebM..
  • Microsoft Windows Media Player 2022.
  • Video players such as VLC, Kodi, and Winamp.

WebM is an alternative to the patented MPEG4 and H. 264 standards. WebM files are smaller than MP4 files, but MP4 is more compatible across platforms and devices. MP4 is also supported by most video players.

This is part of our series of articles about video formats.

This article answers these questions:

WebM Format

Why Is WebM Important?

As its name suggests, WebM is intended for the web. WebM has been successful in part due to the openness and freedom of deployment afforded by its core technologies, including HTTP, HTML, and TCP/IP. Video is crucial for an engaging web experience, but the open and free video formats are inferior to paid options. The WebM Project seeks to solve that issue by developing a web-media format through the open-source community.

The VP8 and VP9 compression technologies have regulated processing conditions, delivering high-quality videos effectively. Since different devices have different communication standards, you can reduce costs by opting for high bandwidth and reducing memory pressure. VP8 and VP9 are simple, and you can easily integrate them into existing environments with only a minor adjustment of the encoder.

What Advantages Does WebM Offer?

WebM offers the following advantages:

  • Reduced webpage size — It is important for optimized webpages to open quickly. The speed of the opening process is affected by the size of the page. For instance, a page that weighs 3 or 4 MB is considered too slow for many sectors. With WebM, you can reduce the size of pages that contain heavy files like videos.
  • HTML 5 standards — By adopting HTML 5 standards, you can reach viewers with potentially problematic browsers like Opera and Explorer. Also, you can activate WebM—just like the WebP image format—for different browsers.
  • Easy conversion — Given the many tools that support WebM, you can easily convert media content to that format. For the procedure, search for phrases like “MP4 to WebM” online.
  • Web optimization — Streaming videos requires video formats that differ from those for traditional offline broadcasting and playback. While most video formats are suitable for offline environments, WebM addresses the special requirements of internet-based video services by enabling real-time, high-quality video delivery to numerous devices and browsers.


What Are WebM’s File-Format Specifications?

WebM is structured according to a subset of the Matroska file format (.mkv files). WebM files use VP8 or VP9 to compress video streams with a VP8 or VP9 codec, and audio streams with a Vorbis or Opus codec. All those codecs were developed by Xiph and are royalty free so you can use them at no charge.

Here is a summary of the WebM file format specifications:

  • MIME-type: video/webm
  • Audio-only MIME-type: audio/webm
  • Uniform type identifier: org.webmproject.webm
  • Video codec name: VP8 or VP9
  • Audio codec name: Opus or Vorbis

As a subset of Matroska, WebM supports the following Matroska functionalities:

  • EBML: The Extensible Binary Meta Language (EBML) characteristics of the data. All EBML documents must start with this information.
  • EBMLVersion: The version of the EBML parser with which the file was created.
  • EBMLReadVersion: The oldest version supported by the EBML parser, i.e., only this version and later ones can be read.
  • EBMLMaxIDLength: The maximum length of the IDs in the file (up to four in Matroska).
  • EBMLMaxSizeLength: The maximum length of the sizes in the file (up to eight in Matroska). This value is separate from the element size specified at the start of an element and does not override it. If the element size exceeds the maximum size-length allowed, the element is considered invalid.
  • DocType: The type of document following the EBML header, i.e., webm or mkv.
  • DocTypeVersion: The version of the DocType interpreter with which the file was created.
  • DocTypeReadVersion: The oldest version supported by the DocType interpreter—a prerequisite for the file to be read.

How Can You Play WebM Files?

Most major web browsers—Chrome, Chromium, Firefox, Opera—support WebM without additional installations. You need a plugin to play WebM-formatted files in Microsoft Edge. You can upgrade the desktop version of Apple Safari to support WebM. For the mobile version of Apple Safari on devices like iPhones and iPads, you must install additional software to play WebM videos.

Available for iOS devices, VLC media player is probably the most popular player for WebM files. You can also play WebM files on Kodi and Winamp. Even though Windows Media Player 12 supports WebM, you must install the WebM Media Foundation components before being able to play WebM videos in Internet Explorer.

How Do WebM and MP4 Differ?

Like WebM, the MPEG-4 Part 14 (MP4) container format complies with the ISO/IEC standard but with greater compatibility. MP4 files can hold images, video, audio, subtitles, and multimedia components, such as user interactivity and menus.

WebM and MP4 differ in the following ways:

  • Compatibility: MP4 is compatible with a larger range of desktop and mobile devices, as well as web browsers. Video sites like YouTube are increasingly supporting MP4 HEVC video uploads, but keep in mind that HEVC compression is less compatible with devices. WebM is compatible with fewer common devices and tools. For example, Apple’s ecosystem, including the Safari browser, iPhones, and iPads, does not support WebM playback.
  • Royalties: While both WebM and MP4 offer high-quality streaming, WebM (VP8) is royalty free. MP4 (H.264) is patented.
  • Quality and file size: Since it’s optimized for the internet, WebM theoretically offers a higher compression ratio than MP4. WebM files are, therefore, smaller, but that’s at the expense of the original quality.
  • VP8 versus H.264: You can compress HTML5 video with either of those codecs. Even though Google Chrome stopped supporting H.264 in 2011, that codec remains ubiquitous for mobile and web.

Which format should I choose?” you wonder? That depends on the use cases for your video. For streaming and uploading videos, WebM is the better option because it’s highly compatible with modern browsers and popular for HTML5. For higher-quality playback and compatibility with more devices, MP4 might be more appropriate.

How Do You Convert GIFs to MP4 Or WebM Format With Cloudinary?

Instead of resizing and cropping uploaded animated GIFs to videos, which incurs substantial bandwidth and server resources, do that on Cloudinary with much less bandwidth for the same visual quality, faster loading, and an enhanced user experience. Cloudinary performs the task in the cloud through automation in three steps:

  1. Convert animated GIFs to MP4s and WebMs through dynamic URLs.
  2. Resize, crop, and transform the videos generated in step 1.
  3. Optimize the transformed videos through a fast content delivery network (CDN).

The conversion capability is available in all Cloudinary plans, including the free tier. Do check it out.