Default Audio Bitrate for libmp3lame
This article provides a quick overview of the default audio bitrate
used by the libmp3lame encoder when no specific bitrate
parameter is defined. You will learn the exact default value used in
standard environments like FFmpeg, how it impacts audio quality, and how
to customize the bitrate settings for your projects.
When encoding audio to MP3 using the libmp3lame library
without specifying any bitrate or quality parameters, the default
bitrate is 128 kbps (kilobits per second).
By default, the encoder applies Constant Bitrate (CBR) mode at this 128 kbps threshold. This baseline is widely supported across almost all hardware and software media players, making it a highly compatible choice for general audio distribution.
Audio Quality Implications
While 128 kbps is sufficient for speech, podcasts, and low-complexity audio, it is generally considered a low-to-medium quality setting for music and high-fidelity audio. Modern standards typically favor higher bitrates to prevent compression artifacts:
- 128 kbps: Standard default, acceptable for voice and casual listening.
- 192 kbps: Medium-high quality, often considered the entry point for transparent music encoding.
- 320 kbps: The maximum quality supported by the MP3 format.
How to Override the Default Bitrate
To achieve better audio quality or smaller file sizes, you can override the 128 kbps default using command-line arguments in tools like FFmpeg.
1. Setting a Custom Constant Bitrate (CBR)
To set a specific constant bitrate, use the -b:a
parameter followed by the desired bitrate (e.g., 192k or
320k):
ffmpeg -i input.wav -c:a libmp3lame -b:a 192k output.mp32. Setting a Variable Bitrate (VBR)
Instead of a fixed bitrate, it is highly recommended to use Variable
Bitrate (VBR) encoding. VBR adjusts the bitrate dynamically based on the
complexity of the audio. In FFmpeg, this is done using the
-q:a parameter (with values ranging from 0 for
best quality to 9 for worst quality):
ffmpeg -i input.wav -c:a libmp3lame -q:a 2 output.mp3A VBR setting of -q:a 2 targets a bitrate range of
approximately 170–210 kbps, providing superior audio quality compared to
the default 128 kbps CBR setting while maintaining an efficient file
size.