Configure FFmpeg Low-Pass Filter Roll-Off Slope

This article explains how to configure and customize the roll-off slope of a low-pass audio filter in FFmpeg. You will learn how to use the poles parameter to choose between standard slopes and how to chain multiple filters together to achieve steeper, more aggressive roll-off curves.

Understanding the lowpass Filter in FFmpeg

In FFmpeg, the lowpass filter is used to attenuate high frequencies above a specified cutoff frequency. The sharpness of this attenuation—how quickly frequencies are quieted beyond the cutoff—is known as the roll-off slope.

The roll-off slope in FFmpeg is primarily controlled by the number of poles (p or poles parameter) in the filter: * 1 pole (p=1): Creates a gentle 6 dB per octave slope. * 2 poles (p=2): Creates a steeper 12 dB per octave slope (this is the default setting).

Basic Configuration Syntax

To set the frequency and the roll-off slope using poles, use the following syntax:

ffmpeg -i input.mp3 -af "lowpass=f=1000:p=2" output.mp3

In this example: * f=1000 sets the cutoff frequency to 1000 Hz. * p=2 configures a 2-pole filter (12 dB/octave slope).

If you want a gentler slope, change the pole value to 1:

ffmpeg -i input.mp3 -af "lowpass=f=1000:p=1" output.mp3

How to Create Steeper Slopes (Chaining Filters)

The lowpass filter in FFmpeg is limited to a maximum of 2 poles (12 dB/octave) in a single instance. If your audio project requires a much steeper roll-off slope (such as 24 dB, 36 dB, or 48 dB per octave), you must chain multiple low-pass filters together in a sequence.

When you chain filters, FFmpeg passes the audio through each filter successively, compounding the slope steepness.

24 dB/octave Slope (Two 2-pole filters)

To achieve a 24 dB/octave roll-off, chain two 12 dB/octave filters at the same cutoff frequency:

ffmpeg -i input.mp3 -af "lowpass=f=1000:p=2,lowpass=f=1000:p=2" output.mp3

36 dB/octave Slope (Three 2-pole filters)

To achieve a 36 dB/octave roll-off, chain three 12 dB/octave filters:

ffmpeg -i input.mp3 -af "lowpass=f=1000:p=2,lowpass=f=1000:p=2,lowpass=f=1000:p=2" output.mp3

48 dB/octave Slope (Four 2-pole filters)

To achieve a very steep 48 dB/octave roll-off, chain four 12 dB/octave filters:

ffmpeg -i input.mp3 -af "lowpass=f=1000:p=2,lowpass=f=1000:p=2,lowpass=f=1000:p=2,lowpass=f=1000:p=2" output.mp3

By adjusting the poles parameter and chaining filters together, you can achieve the exact roll-off steepness required for your audio processing pipeline.