WebM
WebM is a Matroska subset defined for the web. It carries VP8, VP9 or AV1 video with Vorbis or Opus audio, and it is the format browsers reach for when they record or stream natively.
At a glance
- MIME type
- video/webm
- Extensions
- .webm
- Kind
- Video
- Compression
- Container format
- Type
- Container (holds encoded streams)
- Transparency
- Supported
- Bit depth
- 8 or 10-bit video
File structure
WebM uses EBML, a binary tagged structure also used by MKV. Because it is streamable by design, the header stays small and playback can begin with the first cluster of frames.
How the data is compressed
VP9 and AV1 inside WebM compress noticeably better than H.264 at the same quality, which is why video platforms store WebM copies. The cost is encoding time and less hardware decoding on older devices.
Where it is accepted
Chrome, Firefox, Edge and Android support it broadly. Safari support exists from version 14.1 but is narrower, and hardware decoding of VP9/AV1 is uneven on older phones.
Strengths
- Better compression than H.264 at equal quality.
- Native format for browser recording (MediaRecorder).
- Royalty-free codecs, well suited to open-source pipelines.
Weaknesses
- Not accepted by many editors and consumer devices.
- Hardware decoding is less universal than H.264.
- Audio in WebM is usually Opus, which some legacy players cannot decode.
Typical uses
- Web video where file size matters more than universal playback.
- Screen recordings produced directly in a browser.
- Archiving with an open, royalty-free codec.
Common problems
- Uploading WebM to a platform that expects MP4 fails regardless of quality.
- VP9 encoding is slow on CPU-only machines, especially at 1080p and above.
- WebM with alpha exists but almost no consumer player renders it.