Configure FFmpeg Flanger Delay Feedback and LFO
This guide explains how to customize the flanger audio
filter in FFmpeg by configuring its key parameters: delay, feedback, and
LFO (Low-Frequency Oscillator) depth. You will learn the exact syntax,
parameter definitions, and practical command-line examples to achieve
the perfect sweeping flanger effect for your audio files.
Understanding the Flanger Parameters
The FFmpeg flanger filter accepts several options to
shape the audio sweep. The specific parameters used to control delay,
feedback, and LFO depth are defined as follows:
delay(Delay): Sets the base delay in milliseconds. This determines the starting point of the flanging effect. The allowed range is0to30ms, with a default of0ms.regen(Feedback): Sets the regeneration (feedback) percentage. This dictates how much of the delayed signal is fed back into the filter. Higher values create a more intense, metallic, resonant sound. The allowed range is-95to95percent, with a default of12%.depth(LFO Depth): Controls the sweep depth in milliseconds. This defines how far the LFO modulates the delay time away from the basedelaysetting. The allowed range is0to10ms, with a default of0.9ms.speed(LFO Speed): While not explicitly requested, configuring depth often requires adjusting the LFO sweep speed. This is set in Hz. The allowed range is0.1to10Hz, with a default of0.5Hz.
Command Syntax
To apply these settings, use the -af (audio filter) flag
in your FFmpeg command. The parameters are passed as key-value pairs
separated by colons.
ffmpeg -i input.mp3 -af "flanger=delay=[value]:regen=[value]:depth=[value]" output.mp3Practical Examples
1. Subtle, Spacey Flange To create a mild, slow-moving effect, keep the delay and feedback low, with a moderate sweep depth:
ffmpeg -i input.wav -af "flanger=delay=2:depth=1.5:regen=20:speed=0.25" output.wav2. Intense, Jet-Plane Flange To achieve the classic dramatic “jet-plane” sweep, increase both the base delay, the feedback (regen), and the LFO sweep depth:
ffmpeg -i input.wav -af "flanger=delay=10:depth=8:regen=75:speed=0.5" output.wav3. Vibrato/Chorusing Effect By setting a higher speed and moderate depth with low feedback, you can transition the flanger into a chorus-style effect:
ffmpeg -i input.wav -af "flanger=delay=5:depth=3:regen=10:speed=2.0" output.wav