How to Use the FFmpeg Highpass Filter to Cut Low Frequencies
This article provides a quick and practical guide on how to use the
FFmpeg highpass audio filter to eliminate unwanted
low-frequency sounds from your audio files. You will learn the basic
command syntax, how to adjust the cutoff frequency, and how to control
the steepness of the filter to remove low-end rumble, wind noise, or
microphone hum.
Understanding the FFmpeg Highpass Filter
The highpass filter allows high-frequency signals to
pass through while attenuating (reducing the volume of) frequencies
lower than a specified cutoff point. This is highly useful for cleaning
up voice recordings, podcasts, and video audio by removing low-end muddy
frequencies.
Basic Command Syntax
To apply a highpass filter in FFmpeg, you use the audio filter flag
(-af) followed by the highpass filter name and
its parameters.
Here is the standard command template:
ffmpeg -i input.mp4 -af "highpass=f=200" output.mp4In this example: * -i input.mp4 specifies your input
file. * -af "highpass=f=200" applies the audio filter. The
f=200 parameter sets the cutoff frequency to 200 Hz. All
frequencies below 200 Hz will be progressively cut. *
output.mp4 is the resulting output file.
Key Parameters
The highpass filter has two primary parameters you can
adjust to customize the audio output:
- Frequency (
f): Specifies the frequency (in Hz) below which audio is attenuated. The default value is 3000 Hz. For general vocal cleanup (like removing mic bumps or air conditioning rumble), a value between 80 Hz and 150 Hz is typically recommended. - Poles (
porpoles): Controls the steepness of the filter’s roll-off (slope). The default value is 2. A higher number of poles results in a steeper, more aggressive cut for frequencies below the threshold. You can set this from 1 to 20.
Practical Examples
1. Removing Low-End Rumble from Vocals (120 Hz Cut)
To clean up a vocal track by cutting out frequencies below 120 Hz with a standard slope:
ffmpeg -i voice.wav -af "highpass=f=120" clean_voice.wav2. Applying a Steeper Cut
If you have persistent low-frequency noise that requires a more aggressive reduction, increase the number of poles. This example uses a steeper curve at 100 Hz:
ffmpeg -i audio.mp3 -af "highpass=f=100:poles=4" clean_audio.mp33. Filtering Audio Without Re-encoding Video
If you are processing a video file and want to apply the highpass filter to the audio without wasting time re-encoding the video stream, copy the video codec:
ffmpeg -i video.mp4 -af "highpass=f=150" -c:v copy output_video.mp4