Guides · updated October 22, 2026
ffmpeg MP4 to MP3
The exact ffmpeg flags for extracting MP3 from MP4, a batch loop, and an honest comparison with the browser converter.
Tested: 22 October 2026 · ffmpeg 8.0.1 · MP4/AAC and MOV/PCM fixtures
The command is ffmpeg -i input.mp4 -vn -c:a libmp3lame -b:a 192k output.mp3. -vn drops the video, -c:a libmp3lame selects the MP3 encoder, and -b:a sets a constant bitrate. Use -q:a 2 instead of -b:a for VBR. The browser converter is the same job without installing ffmpeg.
The one-liner
ffmpeg -i input.mp4 -vn -c:a libmp3lame -b:a 192k output.mp3
Flags, in order:
-i input.mp4— the source file.-vn— no video output. The picture is skipped, not re-encoded.-c:a libmp3lame— use the LAME MP3 encoder.-b:a 192k— constant bitrate at 192 kbps.output.mp3— the target. The extension selects the MP3 muxer.
For VBR instead of CBR:
ffmpeg -i input.mp4 -vn -c:a libmp3lame -q:a 2 output.mp3
LAME’s -q:a scale runs from 0 (best) to 9 (smallest). 2 is a common music setting, roughly 170–210 kbps depending on the material. The browser converter does not offer VBR; ffmpeg is the route when you want it.
Common variations
Pick the second audio track:
ffmpeg -i input.mp4 -vn -map 0:a:1 -c:a libmp3lame -b:a 192k output.mp3
Force 44.1 kHz stereo:
ffmpeg -i input.mp4 -vn -c:a libmp3lame -b:a 192k -ar 44100 -ac 2 output.mp3
Trim before encoding:
ffmpeg -ss 00:01:30 -to 00:04:00 -i input.mp4 -vn -c:a libmp3lame -b:a 192k output.mp3
Batch a folder:
for f in *.mp4; do
ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 192k "${f%.mp4}.mp3"
done
What ffmpeg will not do for you
- It will not make MP3 lossless. The AAC track is decoded and re-encoded; the second generation is real.
- It will not choose the right bitrate for you. Inspect the source first:
ffprobe -v error -select_streams a:0 \
-show_entries stream=codec_name,bit_rate,sample_rate,channels \
-of default=nw=1 input.mp4
- It will not fix a broken file. A truncated MP4 is a truncated MP4.
When the browser is the better tool
| Situation | Better route |
|---|---|
| One file, no install | Browser |
| You want to see the audio track and duration first | Browser |
| A folder of files, unattended | ffmpeg |
| VBR or a specific filter chain | ffmpeg |
| A codec the browser cannot decode | ffmpeg |
| A machine where you cannot install software | Browser |
The browser converter is not a replacement for ffmpeg. It is a smaller tool for the common case: one file, no account, no upload, a visible result in a few seconds. ffmpeg is the professional route when you need control or scale.
A note on “no upload”
Both routes are local. ffmpeg reads the file from disk and writes the output next to it. The browser reads the file through the File API and writes a Blob. Neither one needs a server. The difference is where the CPU work happens and how much control you have over the encoder settings.
FAQ
What does -vn do?
It disables video output. ffmpeg reads the MP4, ignores the picture, and writes only the audio stream. Without -vn, ffmpeg would try to include a video stream, which an MP3 container cannot hold.
Can I copy the AAC stream into MP3 with -c:a copy?
No. -c:a copy copies the encoded packets unchanged; AAC packets cannot live in an MP3 container. To keep the AAC stream, output M4A instead: ffmpeg -i input.mp4 -vn -c:a copy output.m4a. MP3 requires re-encoding with libmp3lame.
How do I select the second audio track?
Add -map 0:a:1 before the output. Use ffprobe -show_streams input.mp4 to see which audio streams exist. The first audio stream is 0:a:0, the second is 0:a:1.
Is ffmpeg faster than the browser?
Native ffmpeg is usually faster, especially for long files, because it is not limited by the browser's JavaScript and WebAssembly overhead. The browser route avoids an install and gives you a visual check before converting.
How do I batch convert a folder?
On macOS or Linux: for f in *.mp4; do ffmpeg -i "$f" -vn -c:a libmp3lame -b:a 192k "${f%.mp4}.mp3"; done. On Windows PowerShell, use Get-ChildItem *.mp4 | ForEach-Object { ffmpeg -i $_.FullName -vn -c:a libmp3lame -b:a 192k ($_.BaseName + '.mp3') }.
Compare upload-based alternatives
Related guides
MP4 to MP3 on a Mac
QuickTime exports M4A, not MP3. Here are the three Mac routes that actually produce MP3: browser, Terminal ffmpeg, and the limits of each.
GuideMP4 to MP3 at 320 kbps
320 kbps is the maximum MP3 bitrate. What it does to an MP4's AAC track, when it is wasted, and how to set it without guessing.