Skip to the tool workspace
Browser 123

How-to Video and audio

How to get the audio out of a video

Save the sound from an MP4, MOV, MKV or WebM as its own file. Check what the audio already is, copy it out untouched in under a second, and re-encode only when you need MP3 or WAV.

The sound in a video is already a finished audio file, packed in next to the picture. Getting it out is a matter of copying that stream into a file of its own. You don't need to convert anything unless you want a different format, and copying is instant and loses nothing.

Extract Audio from Video after a run: Audio Quality Settings at Medium Quality (192 kbps), clip.mp4 (215.35 KB, to MP3) under Videos to Process, and clip.mp3 at 189.33 KB with a Download button under Extracted Audio Files

The sound from an MP4, saved as an MP3 in the browser.

The direct wayffmpegmacOS · Linux · Windows

First ask what the audio is:

ffprobe -v error -select_streams a -show_entries stream=codec_name,sample_rate,channels -of default=noprint_wrappers=1 video.mp4
codec_name=aac
sample_rate=44100
channels=2

Then copy it into a file that holds that codec. AAC goes in .m4a:

ffmpeg -i video.mp4 -vn -c:a copy audio.m4a

-vn drops the video, and -c:a copy keeps the audio bytes as they are. On an 8-second clip it took 0.02 seconds, and the result decodes to exactly the same samples as the audio in the video.

Install it with brew install ffmpeg on a Mac, apt install ffmpeg on Debian and Ubuntu, or from ffmpeg.org on Windows.

Pick the file type from the codec

Copying changes only the wrapper, so the wrapper has to accept the audio that is already there. This is what FFmpeg 8.1.2 did with -vn -c:a copy on our test files:

ffprobe says Copy into Result
aac (most MP4, MOV and phone video) .m4a Works, identical audio
aac .mp3 Fails: "Exactly one MP3 audio stream is required"
aac .aac Works, but plays 23 ms of encoder padding first
opus (most WebM, many downloads) .opus Works, identical audio
opus .m4a Fails: "codec not currently supported in container"
mp3 .mp3 Works
mp3 .m4a Fails
ac3 (some MKV and DVD rips) .ac3 Works
anything .mka Works: Matroska audio takes any codec

The .aac row is a quiet one. An MP4 carries a note telling the player to skip the encoder's 1,024 samples of start-up padding, and a bare .aac file has nowhere to keep it. The copy is still lossless, but it starts 23 ms late, which matters if you line it up with anything. Use .m4a.

A failed copy leaves an empty file

When the codec doesn't fit, ffmpeg stops with "Could not write header" but has already created the output file, at 0 bytes. Delete it before you try again, or you will find a silent audio.mp3 in the folder later.

Already on a Mac: QuickTime Player

Open the video in QuickTime Player and choose File › Export As › Audio Only. Apple's export guide describes the result as an MPEG-4 audio file with an AAC track, so you get an .m4a.

We didn't click through the menu for this guide. We did run avconvert, the command-line exporter that ships with macOS, with its Apple M4A preset on macOS 26.5.1. For the AAC clip it kept the audio as it was: the .m4a decoded to the same samples as the ffmpeg copy. It couldn't open the WebM at all, so expect the same of QuickTime for a WebM with Opus audio: use ffmpeg or the browser tool.

When you want MP3 or WAV

Sometimes the copy isn't what you need: an old car stereo wants MP3, or an editor or transcription app wants WAV. Then re-encode, from the video itself rather than from a copy you already compressed:

ffmpeg -i video.mp4 -vn -c:a libmp3lame -q:a 2 audio.mp3   # MP3, variable bitrate
ffmpeg -i video.mp4 -vn -c:a pcm_s16le audio.wav           # WAV, 16-bit
ffmpeg -i video.mp4 -vn -c:a flac audio.flac               # FLAC, lossless

The same 8-second clip, whose audio is 131 kbps AAC, came out like this:

Output Size Audio
-c:a copy to .m4a 133 KB The original AAC, untouched
MP3, -q:a 2 123 KB Compressed a second time
MP3, 192 kbps (the browser tool's default settings) 194 KB Compressed a second time
FLAC 1.0 MB Lossless copy of the decoded sound
WAV 1.4 MB Lossless, uncompressed

A higher bitrate can't restore what the first compression threw away, so a 192 kbps MP3 of 131 kbps audio is bigger without being better. WAV and FLAC keep everything that is left, at eight to ten times the size. Which format to pick for which job is in How to convert audio and video formats.

More than one audio track

A film or a recording from a game capture can carry several tracks: languages, a commentary, the microphone on its own. ffprobe lists them in order. Pick one with -map 0:a:N, counting from 0:

ffmpeg -i film.mkv -map 0:a:1 -c copy commentary.opus

Without -map, ffmpeg takes the one it thinks is best (usually the one with the most channels) and ignores the rest. The browser tool does the same, and has no way to pick another.

If there is no audio at all

If ffprobe prints nothing, the video has no sound to extract. Screen recordings are the usual case: the recorder had system audio and the microphone switched off. ffmpeg says "Output file does not contain any stream". The browser tool currently reports only "Something went wrong while extracting the audio" for such a file, and Try again won't help. Record it again with sound on.

In the browser

Extract Audio from Video with one video loaded: the six format tiles MP3, WAV, FLAC, AAC, OGG and M4A with M4A selected, and Audio Quality Settings showing Quality, Bitrate (kbps) and Sample Rate

The six output formats. Bitrate disappears for WAV and FLAC, which don't use one.

  1. Open Extract Audio from Video and drop in one or more videos (MP4, MOV, MKV, WebM, AVI and others).
  2. Under Select Output Audio Format, pick MP3 for anything that has to play everywhere, M4A for Apple devices, or WAV or FLAC to keep the full quality.
  3. Leave Quality at Medium Quality (192 kbps), or set a Bitrate (kbps) of your own. Sample Rate stays at Original unless you change it.
  4. Press Extract Audio from 1 File. The first run loads FFmpeg into the tab, then each file shows its progress.
  5. Press Download next to each file, or Download All as ZIP. The file keeps the video's name with the new extension: clip.mp4 becomes clip.mp3.

Every format here is a re-encode, including M4A and AAC from a video that already has AAC audio. For a lecture or a voice memo the second compression rarely matters. For music you care about, choose FLAC, or use the -c:a copy command above.

Questions people ask

Does extracting the audio lose quality?

Not if you copy it. The audio in a video is already compressed, and `-c:a copy` moves those bytes into a new file without decoding them: the copy decodes to exactly the same samples as the original. Saving it as MP3 or AAC instead compresses it a second time, which does lose a little. WAV and FLAC re-encodes are lossless, but much bigger.

Why did ffmpeg say "Exactly one MP3 audio stream is required"?

You asked it to copy AAC audio into an .mp3 file. Copying only changes the wrapper, and an .mp3 file can only hold MP3 audio. Either copy it into .m4a, which holds AAC, or re-encode to MP3 with `-c:a libmp3lame -q:a 2`. The failed run leaves an empty 0-byte file behind; delete it.

Should I save it as .aac or .m4a?

M4A. Both hold the same AAC audio, but a bare .aac file has no room for the note that tells a player to skip the encoder's start-up padding. In our test the .aac copy decoded with 1,024 extra samples (23 ms) at the start, and the .m4a copy matched the original exactly.

The video has two audio tracks. How do I get the second one?

Add `-map 0:a:1` (the count starts at 0, so 1 is the second audio track): `ffmpeg -i film.mkv -map 0:a:1 -c copy commentary.opus`. Run ffprobe first to see which track is which codec, so you pick the right extension.

Why does it fail on a screen recording?

Probably because it has no sound in it. Many screen recorders leave the microphone and system audio off by default, and then the file has a video stream only. ffprobe prints nothing for the audio, and ffmpeg stops with "Output file does not contain any stream".

Tools in this guide

Everything runs on your device

All guides

/
123 items
Runs in your browser·Your files stay on this device
Out0 B
Ready—