MKV to MP3 Guide: Extract Audio from Matroska Video with FFmpeg

Extract audio tracks from Matroska (.mkv) and WebM (.webm) EBML containers to MP3. Use the browser converter below for single-track WebM/Ogg files or the FFmpeg commands below for multi-gigabyte desktop .mkv videos.

Browser converter limits: one Opus or Vorbis audio stream in a WebM or Ogg container (.webm, .ogg, .oga, .opus), mono or stereo, up to 100 MiB and 45 minutes.

Load .webm audio file

Drag file here or click to browse · Max file size: 100 MiB

Files processed locally · 0 bytes uploaded
No WebM file? Try in-browser audio test signals:
Keyboard shortcuts:
U Pick fileEsc CancelD Download MP3

Local Conversion History

0 files

Saved in IndexedDB. History can remain after closing this tab.

0 B stored
Saved locally across visits. Up to 20 files / 256 MiB; oldest removed on save. Remove files or use Clear.
0 Bytes Uploaded

100% Local Privacy

Audio never leaves your browser. Zero upload bandwidth, no remote telemetry.

Opus Preflight Engine

Parses EBML container headers, channel layouts, and fixes live MediaRecorder duration tags.

MPEG Frame Verifier

Checks MPEG Layer III headers and complete frame boundaries; reports the frame timeline, not decoded audio quality.

How to extract MP3 audio from an .mkv file

  1. Matroska (.mkv) and WebM share the same EBML magic bytes (1A 45 DF A3), which you can inspect in the EBML container checker.
  2. Select the first audio stream (-map 0:a:0), strip video frames (-vn), and encode CBR MP3 with libmp3lame:
ffmpeg -i input.mkv -map 0:a:0 -vn -c:a libmp3lame -b:a 192k output.mp3

Read more in the extract audio from WebM video guide and the FFmpeg and VLC guide.

Interactive calculator

Opus to MP3 bitrate, file size and device calculator

Pick a duration, source stream and destination to compare estimated MP3 sizes and get a matching FFmpeg command. Estimates are constant-bitrate payload sizes; tags, headers and VBR change real files.

Duration

3:00

Source stream

Source audio at ~128 kbps for 3:00 is about 2.7 MiB. This browser converter accepts WebM input; use FFmpeg for standalone .opus files.

Destination

Estimated output size for 3:00

  • 64 kbps MP3
    1.4 MiB
  • 128 kbps MP3
    2.7 MiB
  • 192 kbps MP3 (Recommended for WebM/Opus)
    4.1 MiB
    Suggested for this use
  • 320 kbps MP3
    6.9 MiB
  • Uncompressed WAV (1,411 kbps)
    30.3 MiB

Suggested: 192 kbps MP3 for Music & Headphones

192 kbps CBR MP3 gives headroom for a ~128 kbps Opus source: MP3 is less efficient than Opus, so matching the source bitrate can add audible artifacts, while going higher mostly adds size. A higher bitrate cannot restore detail the lossy source never kept — compare the sound and size yourself.

ffmpeg -i input.webm -vn -c:a libmp3lame -b:a 192k output.mp3

Typical playback support by device

Typical behavior, not a certification. Firmware, app and OS versions vary — test a short file on your device.
Device.webm (Opus/Vorbis).opus.ogg.mp3 (CBR)
Car Stereo USB (FAT32)UnlikelyUnlikelyVariesUsually plays
Apple iPhone / iPad (Files & Music)VariesVariesVariesUsually plays
Pioneer Rekordbox / Serato DJUnlikelyUnlikelyVariesUsually plays
Android Default PlayerUsually playsUsually playsUsually playsUsually plays
Podcast RSS Hosting (Spotify / Apple)UnlikelyUnlikelyUnlikelyUsually plays
Web Browser Audio (<audio>)Usually playsVariesVariesUsually plays

Apple iPhone / iPad (Files & Music): Files and Safari may preview newer WebM/Ogg audio depending on iOS version; the Music app library expects formats such as MP3 or AAC.

Learn more in the Opus to MP3 guide, the FFmpeg and VLC desktop guide and the WebM video audio-track guide.

mkv to mp3

Extracting Audio Tracks from Matroska (.mkv) Video Recordings to MP3

OBS Studio recordings, archival films, and multi-track webinar captures are frequently saved as Matroska (.mkv) files because MKV will not corrupt the entire recording if an application crashes mid-stream. While both MKV and WebM share the Extensible Binary Meta Language (EBML, magic bytes 1A 45 DF A3) structure, MKV containers declare the 'matroska' DocType and can hold AC-3, DTS, FLAC, AAC, Opus, or Vorbis audio alongside multiple subtitle tracks.

The in-browser converter on this site enforces a strict WebM ('webm' DocType) and Ogg ('OggS') input policy—one Opus or Vorbis audio stream, mono or stereo, up to 100 MiB and 45 minutes—and does not accept .mkv files. To convert MKV to MP3, run the desktop FFmpeg commands on this page (`ffmpeg -i input.mkv -map 0:a:0 -vn -c:a libmp3lame -b:a 192k output.mp3`), which skip video decoding (`-vn`) and let you select specific language tracks (`-map 0:a:1`) or downmix 5.1 surround (`-ac 2`).

Use the desktop FFmpeg MKV to MP3 commands above for Matroska files, or use the browser converter on this page if your recording is a supported .webm, .ogg, .oga or .opus file.

Quick Answers

Does the browser converter on this page accept .mkv files directly?

No. The browser preflight inspector requires the 'webm' EBML DocType or 'OggS' capture pattern (one Opus or Vorbis track, mono/stereo, up to 100 MiB and 45 minutes) and rejects 'matroska' (.mkv) files. Use the FFmpeg commands on this page to extract MP3 audio from .mkv files on desktop.

What if my MKV video has multiple language audio tracks or 5.1 surround sound?

Use FFmpeg on desktop with `-map 0:a:0` (or `-map 0:a:1` for the second audio stream) and `-ac 2` to downmix 5.1 surround sound to stereo while encoding with `libmp3lame`.

Back to the WebM to MP3 converter