WEBM vs MKV
Both are Matroska underneath: WebM is a restricted form of MKV made for browsers. Use WebM for video on a web page, and MKV for everything else, especially files with several audio or subtitle tracks.
Last updated
Choose WEBM when
- Video embedded on a web page, which every current browser plays.
- Short clips with a transparent background, which VP9 in WebM supports.
Choose MKV when
- Films and series with several audio languages and subtitles.
- Archiving rips without re-encoding, whatever the codec.
- Media servers and players such as VLC, Plex and Kodi.
What WEBM actually is
WEBM is a deliberately narrow subset of Matroska: VP8 or VP9 video with Vorbis or Opus audio, all of it free to use. It exists so browsers could ship video without patent licensing, and it is what most browser screen recorders produce.
A browser screen recording is usually a WEBM with a broken duration, so players show it as zero seconds or refuse to seek. Converting it to MP4 rewrites the header and fixes the seeking.
What MKV actually is
Matroska will hold essentially any combination of video, audio and subtitle streams, in any codec, in unlimited numbers, with chapters and attachments alongside. That is why it is the format of choice for archived films with several language tracks and subtitle sets.
MKV and WEBM share a signature because WEBM is a restricted Matroska, so tools sometimes report one as the other. What matters is the codecs inside.
WEBM and MKV side by side
| WEBM | MKV | |
|---|---|---|
| Extension | .webm | .mkv |
| Media type | video/webm | video/x-matroska |
| Inside the file | VP8 video with Vorbis sound | H.264 video with AAC sound |
| Compression | Lossy | Lossy |
| Carries sound | Yes | Yes |
| Plays on | every modern browser and Android, but not QuickTime or older iPhones | VLC, Plex, most smart TVs and Android, but not the iPhone Photos app or QuickTime |
| We can write it | Yes | Yes |
Questions
Can I rename a WebM to MKV?
Yes, it will play, because WebM is a subset of Matroska. The reverse only works if the MKV happens to hold VP8 or VP9 video with Vorbis or Opus audio.
Which one is smaller?
Neither, as containers. The size comes from the codec inside; the same VP9 video is the same size in either.