# What is a WebM file? Everything you need to know about the WebM format

A **WebM file** is an open multimedia container designed for web video and audio. WebM commonly contains VP8, VP9, or AV1 video with Vorbis or Opus audio. It is based on a restricted profile of the Matroska container and was designed around royalty-free media technologies.

## How does WebM work?

WebM interleaves encoded video, audio, subtitle, cue, and metadata elements in a container that supports seeking and streaming. Like MP4, WebM is not a codec. Playback depends on whether the client supports both the container and the tracks inside it.

VP9 is a common WebM video codec for efficient HD and 4K delivery. AV1 can improve compression further at the cost of more encoding work. Opus provides efficient speech and music audio.

## Benefits of WebM

* **Open format:** built around openly specified media technologies.
* **Efficient codecs:** VP9, AV1, and Opus perform well for web delivery.
* **Browser integration:** supported by current major browsers.
* **Transparency support:** some WebM codec and browser combinations can carry alpha video.
* **Useful fallback strategy:** can complement MP4 sources in an HTML `<video>` element.

## Limitations of WebM

Some video editors, enterprise systems, older Apple devices, and consumer hardware have stronger MP4 workflows. Encoding VP9 or AV1 can also take longer than common H.264 presets. As with every container, compatibility depends on the exact codecs and settings.

## WebM compared with MP4

|Format|Best fit|Common video codecs|Main tradeoff|
|-|-|-|-|
|WebM|Open, efficient browser delivery|VP8, VP9, AV1|Less universal in legacy production tools|
|MP4|Broad device and platform delivery|H.264, HEVC, AV1|Some codec combinations have licensing constraints|

Many products generate both and let the browser choose a supported source.

## How to encode WebM with Transloadit

Use [🤖/video/encode](/docs/robots/video-encode.md) with a WebM preset:

```json
{
  "steps": {
    ":original": { "robot": "/upload/handle" },
    "webm": {
      "use": ":original",
      "robot": "/video/encode",
      "preset": "web/webm/1080p"
    }
  }
}

```

See the [video codecs reference](/docs/supported-formats/video-codecs.md) and[audio/video formats reference](/docs/supported-formats/audio-video-formats.md) when comparing stack capabilities.

## WebM FAQ

### Is WebM a codec?

No. WebM is a container that commonly carries VP8, VP9, or AV1 video and Vorbis or Opus audio.

### Can Safari play WebM?

Current Safari versions support common WebM configurations, but older Apple systems may not. Keep an MP4 fallback when those clients matter.

### WebM or MP4: which should I choose?

Use MP4/H.264 for the broadest baseline. Add WebM when open codecs, efficient VP9/AV1 delivery, or specific browser capabilities benefit your audience.

## Related demos

* [Encode video into WebM](/demos/video-encoding/encode-into-webm/)
* [Convert WebM to MP4](/demos/video-encoding/webm-to-mp4/)
* [Encode video for browsers](/demos/video-encoding/encode-for-browsers/)
