WebM to MKV Converter

Generate a ready-to-run FFmpeg command to convert WebM video files to MKV format — remux or re-encode, with audio and quality options.

FFmpeg Command Builder

Fill in the fields and click Build Command to get a ready-to-run FFmpeg command.

Generated Command

ffmpeg -i video.webm -c copy video.mkv

Remuxes the WebM container into MKV without re-encoding. All streams are copied as-is — lossless and very fast.

WebM vs MKV — Format Comparison

Feature WebM MKV
Released 2010 (Google) 2002 (Open source)
Based on Matroska subset Matroska (full)
Video codecs VP8, VP9, AV1 only All codecs (H.264, H.265, AV1, VP9...)
Audio codecs Opus, Vorbis only All codecs (AAC, AC3, FLAC, MP3...)
Multiple audio tracks Limited Unlimited
Subtitle tracks WebVTT only Unlimited (SRT, ASS, PGS...)
Chapter support Limited Full
HDR / metadata Partial Full

Quick FFmpeg Reference

Remux (lossless, fastest)
ffmpeg -i input.webm -c copy output.mkv
Re-encode to H.264 + AAC
ffmpeg -i input.webm -c:v libx264 -crf 23 -c:a aac output.mkv
Re-encode to H.265 + AAC
ffmpeg -i input.webm -c:v libx265 -crf 28 -c:a aac output.mkv
Add external subtitle file
ffmpeg -i input.webm -i subs.srt -c copy -c:s srt output.mkv
Batch convert (Linux/macOS)
for f in *.webm; do ffmpeg -i "$f" -c copy "${f%.webm}.mkv"; done
Batch convert (Windows CMD)
for %f in (*.webm) do ffmpeg -i "%f" -c copy "%~nf.mkv"
Copied!

Summary

Generate a ready-to-run FFmpeg command to convert WebM video files to MKV format — remux or re-encode, with audio and quality options.

How it works

  1. WebM files store VP8/VP9/AV1 video and Opus/Vorbis audio in a restricted subset of the Matroska container.
  2. MKV uses the same underlying Matroska format but with no codec restrictions and full metadata support.
  3. Because both formats share Matroska roots, FFmpeg can remux WebM to MKV in seconds by simply relabeling the container — no re-encoding needed.
  4. Choose a conversion mode in the builder below (remux or re-encode), set your filenames, then click Build Command.
  5. Copy the generated command and run it in your terminal where FFmpeg is installed.
  6. For batch conversion, use the shell loop examples in the Quick Reference section.

Use cases

  • Remux WebM files to MKV to unlock multi-track audio and subtitle support.
  • Preserve VP9 or AV1 video quality while gaining the flexibility of the MKV container.
  • Add external subtitle files (.srt, .ass) to a WebM video by converting it to MKV.
  • Improve compatibility with media players and NAS devices that handle MKV better than WebM.
  • Archive WebM recordings in the future-proof, widely supported MKV format.
  • Re-encode WebM to H.264 inside MKV for maximum player compatibility on older devices.
  • Batch-convert a folder of WebM downloads to MKV with a single FFmpeg loop.
  • Enable chapter markers and cover art not supported in the WebM format.

Frequently Asked Questions

Last updated: 2026-06-11 · Reviewed by Nham Vu