FFmpeg MP3 encoding with LAME

FFmpeg and libmp3lame

FFmpeg can use LAME to make MP3 files

If your FFmpeg command uses libmp3lame, FFmpeg is passing the audio and encoding settings to the LAME MP3 encoder. This means common FFmpeg MP3 choices such as VBR, CBR and ABR are closely related to the same modes available when LAME is used directly.

The short answer

FFmpeg is not a separate MP3 encoder when you select libmp3lame. FFmpeg handles the input, output and command options, while LAME performs the MP3 encoding.

So a search such as FFmpeg 320 kbps CBR vs V0 VBR is usually a comparison between two LAME encoding modes reached through FFmpeg.

Windows x64 download

FFmpeg + LAME 4.0 audio build

This compact 64-bit Windows build is provided for users who want a known FFmpeg package with libmp3lame enabled and LAME 4.0 included. It also includes Opus and Vorbis encoding support alongside FFmpeg's built-in audio codecs and decoders.

MP3

Uses the included libmp3lame-0.dll from the Cole Williams LAME 4.0 build.

Audio focused

Includes ffmpeg.exe and ffprobe.exe, with network support and FFplay intentionally omitted.

64-bit Windows

This package is for x64 Windows. An x86 build is not currently provided.

Compatibility tool

Need an ffmpeg.exe interface but want native LAME?

FFmpeg LAME Shim 1.0.1.0 translates a focused subset of FFmpeg/libmp3lame command-line options to the native lame.exe bundled beside it. It is intended for audio-only applications and workflows that expect an FFmpeg-shaped command but do not need FFmpeg's general decoding, filtering or video features.

What does libmp3lame mean?

libmp3lame is FFmpeg's wrapper for the LAME MP3 encoder library. You select it with -c:a libmp3lame.

ffmpeg -i input.wav -c:a libmp3lame [MP3 options] output.mp3

The important part is -c:a libmp3lame: it tells FFmpeg to use LAME for the audio encode.

FFmpeg MP3 commands and LAME equivalents

The options use different syntax, but the main quality controls map closely to LAME's own settings.

ModeFFmpegDirect LAMEMeaning
V0 VBR ffmpeg -i input.wav -c:a libmp3lame -q:a 0 output.mp3 lame.exe -V0 input.wav output.mp3 Highest normal LAME VBR quality setting.
V2 VBR ffmpeg -i input.wav -c:a libmp3lame -q:a 2 output.mp3 lame.exe -V2 input.wav output.mp3 High-quality VBR with smaller files than V0.
320 kbps CBR ffmpeg -i input.wav -c:a libmp3lame -b:a 320k output.mp3 lame.exe -b 320 input.wav output.mp3 Fixed nominal 320 kbps MP3.
192 kbps ABR ffmpeg -i input.wav -c:a libmp3lame -abr 1 -b:a 192k output.mp3 lame.exe --abr 192 input.wav output.mp3 Targets an average bitrate of about 192 kbps.

FFmpeg 320 kbps CBR vs V0 VBR

If both commands use libmp3lame, the encoder is LAME in both cases. The real difference is therefore CBR versus VBR, not FFmpeg versus LAME.

320 kbps CBR keeps the nominal bitrate fixed at 320 kbps. V0 VBR lets LAME vary the bitrate according to the audio. V0 normally produces a smaller file because easy passages do not need to use 320 kbps continuously.

320 kbps CBR is not automatically audibly better than V0. For a deeper comparison of bitrate behaviour, file size and practical quality, see the MP3 V0 vs 320 kbps guide.

VBR, CBR and ABR in FFmpeg

VBR

Use -q:a with libmp3lame. Lower values mean higher LAME VBR quality: -q:a 0 corresponds to V0 and -q:a 2 corresponds to V2.

CBR

Use a fixed bitrate such as -b:a 320k. With the normal libmp3lame settings this selects LAME's bitrate-based CBR path.

ABR

Use -abr 1 together with a target bitrate such as -b:a 192k. FFmpeg then asks LAME to use its average-bitrate mode.

Check whether your FFmpeg build has LAME

Pre-built FFmpeg packages do not all contain the same optional libraries. You can check the encoders available in your copy of FFmpeg:

ffmpeg -encoders | findstr libmp3lame

On Linux or macOS, use:

ffmpeg -encoders | grep libmp3lame

If libmp3lame is listed, that FFmpeg build can use LAME for MP3 encoding.

Quick questions

Does FFmpeg use LAME for MP3?

FFmpeg can use LAME through libmp3lame. When that encoder is selected, LAME performs the MP3 encoding.

What is libmp3lame?

It is FFmpeg's wrapper for the LAME MP3 encoder library.

Is FFmpeg 320 kbps better than V0?

Not automatically. With libmp3lame, both are LAME modes. 320 kbps CBR uses a fixed nominal bitrate, while V0 VBR changes bitrate with the audio and is usually more space-efficient.

What FFmpeg setting matches LAME V0?

With libmp3lame, -q:a 0 maps to LAME's V0 quality setting.