How to Use the FFmpeg Highpass Filter
This guide explains how to use the highpass audio filter
in FFmpeg to clean up your audio tracks. You will learn the basic
syntax, understand the key parameters of the filter, and see practical
command-line examples for removing unwanted low-frequency noise like
wind, traffic, or microphone rumble.
What is the Highpass Filter?
A high-pass filter allows high-frequency signals to pass through while attenuating (reducing the volume of) frequencies lower than a specified cutoff frequency. This is highly useful for removing low-frequency hums and mud from vocal recordings without affecting the clarity of the voice.
Filter Parameters
The FFmpeg highpass filter has two primary parameters: *
frequency (or f): Sets the
cutoff frequency in Hz. Frequencies below this threshold will be
filtered out. The default value is 3000 Hz. * poles
(or p): Sets the number of poles for the filter.
It can be set to either 1 or 2. A higher
number of poles results in a steeper, more aggressive reduction of the
low frequencies. The default value is 2.
Basic Syntax
To apply the filter, use the -af (audio filter) flag
followed by highpass and your chosen parameters:
ffmpeg -i input.mp3 -af "highpass=f=200" output.mp3Practical Examples
1. Clean Up Vocal Tracks
Human speech rarely contains useful information below 80 Hz to 100 Hz. To remove low-end muddy frequencies from a voice recording, set the cutoff frequency to 100 Hz:
ffmpeg -i interview.wav -af "highpass=f=100" cleaned_interview.wav2. Adjusting the Filter Steepness (Poles)
If the default cutoff is too harsh, you can set the poles parameter
to 1 for a gentler slope:
ffmpeg -i audio.wav -af "highpass=f=150:p=1" output.wav3. Combining with Other Audio Filters
You can chain the highpass filter with other FFmpeg
audio filters, such as a lowpass filter (to create a bandpass filter) or
a volume adjustment, by separating them with a comma:
ffmpeg -i input.mp3 -af "highpass=f=80,volume=1.2" output.mp3