How to Use the Bass Filter in FFmpeg

This article provides a straightforward guide on how to use the bass audio filter in FFmpeg to boost or attenuate low-frequency signals in your audio files. You will learn the primary parameters of the filter—including gain, frequency, and width—and see practical command-line examples to help you achieve the exact audio profile you need.

The bass filter in FFmpeg is a specialized equalizer tool designed to alter the low-frequency response of an audio stream using a two-pole shelving filter. It allows you to either boost the bass to make your audio sound warmer and punchier, or reduce the bass to clean up muddy low-end frequencies.

Filter Parameters

To customize the bass response, the filter utilizes three primary parameters:

Command Examples

To apply the filter, use the -af (audio filter) flag in your FFmpeg command.

1. Basic Bass Boost

To boost the bass by 6 dB using the default frequency of 100 Hz, use the following command:

ffmpeg -i input.mp3 -af "bass=g=6" output.mp3

2. Cutting Low-End Frequencies

If your audio has too much low-end rumble, you can reduce the bass. This command cuts the frequencies below 120 Hz by 8 dB:

ffmpeg -i input.wav -af "bass=g=-8:f=120" output.wav

3. Customizing All Parameters

For precise control, you can define the gain, cutoff frequency, and width simultaneously. This command applies a 5 dB boost at 80 Hz with a sharper width of 0.3:

ffmpeg -i input.mp4 -c:v copy -af "bass=g=5:f=80:w=0.3" output.mp4

(Note: -c:v copy is used here to copy the video stream without re-encoding it, saving processing time.)