How to Disable libmp3lame Low-Pass Filter

This article explains how to manually override or completely disable the internal low-pass filter in the libmp3lame MP3 encoder. While LAME automatically applies a low-pass filter to optimize compression and audio quality at various bitrates, advanced users can bypass these settings using specific command-line flags in the LAME CLI, arguments in FFmpeg, or directly through the C API.

Understanding LAME’s Default Low-Pass Filter

By default, libmp3lame applies a low-pass filter to remove high-frequency sounds (typically above 16 kHz to 20 kHz, depending on the target bitrate). Removing these hard-to-hear frequencies allows the encoder to allocate more data to the lower, more audible frequency spectrum, resulting in a subjectively better-sounding compression. However, for high-bitrate encodes (like 320 kbps) or archival purposes, you may want to preserve the full frequency range.

Method 1: Using the LAME Command-Line Interface (CLI)

If you are using the standalone LAME compiler, you can control the low-pass filter using the --lowpass option.

Method 2: Using FFmpeg

When using FFmpeg with the libmp3lame library, the low-pass filter is controlled via the -cutoff option. FFmpeg expects this value in Hertz (Hz).

Method 3: Using the C API (for Developers)

If you are integrating libmp3lame into your own software application, you can control the low-pass filter using the LAME API functions defined in lame.h.