WEBM is a close relative of MKV
WEBM was built on top of Matroska, the same technology as MKV. It is a restricted version that allows only web-friendly codecs: VP8, VP9 or AV1 for video and Vorbis or Opus for sound. Browsers play WEBM natively, while they do not officially support MKV. So if you want to show an MKV video on a web page, converting MKV to WEBM is a natural step.
Copy or encode
Whether the conversion is instant depends on the tracks inside your MKV:
| Inside the MKV | What happens |
|---|---|
| VP9 or AV1 video, Opus or Vorbis sound | Copied into WEBM, almost instant and lossless |
| VP9 or AV1 video, AAC or AC-3 sound | Sound converted to Opus |
| H.264 or HEVC video | Video encoded to VP9, VP8 or AV1 |
Most MKV files from films and OBS recordings contain H.264, so they need a full encode. That takes longer, especially in AV1, because your computer does all the work in the browser.
Which codec for the web
- VP9: the recommended choice. Good compression and supported by all current browsers.
- VP8: larger files but works in very old browsers.
- AV1: the smallest files, supported by recent browsers. Slow to encode; offered only when your browser supports it.
For a background video or a product clip on a page, 720p and a medium quality are usually enough and keep loading fast. Very long MKV films are better hosted on a video platform than embedded as a single WEBM file.
Things to keep in mind
WEBM can technically carry subtitle tracks, but web players use separate subtitle files, so do not expect MKV subtitles in the result. Only one audio track is useful in a web player, so check that the preview has the language you want. Safari supports WEBM only in recent versions, so many sites add an MP4 fallback: MKV to MP4 makes it. To shrink a finished file, use the WEBM compressor. For the reverse direction, see WEBM to MKV. Your files are processed locally and never uploaded.