Back to home

How to Extract Audio from MKV Files Using FFmpeg

5 min read

Just finished a mentoring call. Got this 2GB MKV file sitting on my desktop with an hour of salary negotiation advice I need to transcribe and send back tonight. Problem is, I can't do anything with a video file. Need the audio.

I've done this probably fifty times now. Here's what works.

Why extract audio

Used to just keep the video files. Never opened them. Too big, can't transcribe them, can't share them. Basically useless.

Now I extract audio from everything. Throw it into Whisper or Otter, get a transcript, pull out the good parts with timestamps. Today's call has this moment at 23 minutes where my mentee had a breakthrough about salary—I want to send him that specific part with some research tonight.

The command

ffmpeg -i input.mkv -vn -acodec mp3 output.mp3

The -vn means skip video, -acodec mp3 means output as MP3. That's it.

Files with spaces? Use quotes:

ffmpeg -i "Mentoring Session.mkv" -vn -acodec mp3 "Audio.mp3"

Better quality

For tough audio (accents, background noise, technical jargon):

ffmpeg -i "Mentoring Session.mkv" -vn -acodec mp3 -q:a 2 "Audio.mp3"

The -q:a 2 sets quality. Range is 0 (best) to 9 (worst). I use 2.

Want zero quality loss? Copy the audio without re-encoding:

ffmpeg -i input.mkv -vn -acodec copy output.aac

Check first if you have multiple audio tracks

Once recorded a three-hour tutorial. Extracted audio, sent it for transcription. Got back nothing but game sounds—no voice. The file had mic and system audio as separate tracks. I grabbed the wrong one.

Now I always check first:

ffmpeg -i input.mkv

Look for lines like "Stream #0:1(eng): Audio" to see what tracks exist.

What you actually get

Audio file is 200MB instead of 2GB. Easy to transcribe, share, edit.

But the real win is making the content usable. I transcribe these, pull out the best parts, send follow-ups with timestamps. With tonight's call, I'll extract that salary breakthrough moment, add research, and send it before my mentee makes his decision. That's the point.