I'm writing the command that is resampling the audio file and adding the high-pass filter to it.
In the software that I'm using, the high pass filter is very sharp - the problem is that I don't know how to sharpify the filter in FFmpeg.
I've experimented with some options but none succeded. How can I achieve that?
ffmpeg -i "Audio.wav" -ar 44100 -af highpass=f=5000 "Audio_HP.wav" -y
| What FFmpeg does | What I want |
|---|---|
![]() |
![]() |


highpassis limited to the first- or second-order (presumably, IIR) filter. You need to design your own digital filter to implement a filter with sharper cutoff. To do so, I'd useaiirfilter. But you need coefficients...While I (a DSP engineer by trade) uses/used Matlab/Python-Scipy to design filters, I found this website useful. If you enter your filter specifications, it shows C code for the filter. Show the code for "Nth order" implementation, and copy the coefficients to ffmpeg command as follows:
substitute
[...]as space-separated coefficients with the name in the IIR Filter Explorer. (See the examples in the documentation)Designing your filter, SB-Ripple controls how much the signal is killed below 5kHz (try -20 or -40 to start) and keep your filter order reasonable (say max 10). Too high of an order may cause numerical unstability.
Disclaimer: I've never run
aiirmyself but this should be the correct way to configure it.