How to Set FFmpeg AAC Cutoff Frequency
This guide explains how to configure the low-pass filter cutoff frequency when using the native, built-in AAC encoder in FFmpeg. You will learn the specific command-line parameter required to adjust this frequency limit, how it impacts audio quality, and how to apply it directly to your audio encoding workflows.
To set the cutoff frequency for the built-in AAC encoder in FFmpeg,
you use the -cutoff option followed by the desired
frequency value in Hertz (Hz).
By default, FFmpeg’s native AAC encoder (-c:a aac)
automatically calculates a cutoff frequency based on the selected
bitrate to optimize compression. However, you can manually override this
behavior using the following command syntax:
ffmpeg -i input.wav -c:a aac -b:a 128k -cutoff 15000 output.m4aParameter Breakdown
-c:a aac: Specifies the built-in FFmpeg AAC encoder.-b:a 128k: Sets the target audio bitrate to 128 kbps.-cutoff 15000: Restricts the audio bandwidth to 15,000 Hz (15 kHz). All frequencies above this limit are filtered out.
Why Adjust the Cutoff Frequency?
- Optimizing Low Bitrates: If you are encoding audio at low bitrates (e.g., below 96 kbps), lowering the cutoff frequency (to 12000 or 14000 Hz) forces the encoder to discard high-frequency data that is difficult to compress. This allows the encoder to allocate more bits to the mid and low-range frequencies, resulting in a cleaner overall sound with fewer compression artifacts.
- Preserving High Frequencies: If you are encoding at higher bitrates (e.g., 192 kbps or higher) and want to preserve the full frequency spectrum, you can increase the cutoff value (e.g., to 20000 Hz) or disable the automatic cutoff limit entirely.
Disabling the Cutoff
To allow the encoder to encode up to the maximum physical frequency limit (Nyquist frequency) of your input audio, you can set the cutoff value to a high number or disable it:
ffmpeg -i input.wav -c:a aac -b:a 256k -cutoff 22050 output.m4aUsing these adjustments ensures you have complete control over the frequency response and audio fidelity of your compressed AAC files.