Add Flanger Effect to Audio Using FFmpeg

This article provides a quick guide on how to apply a flanger effect to an audio file using FFmpeg. You will learn the basic command to apply the effect instantly, as well as how to customize various parameters—such as delay, depth, feedback, and speed—to achieve the exact sound you want.

The Basic Flanger Command

To apply a default flanger effect to an audio file, use the -af (audio filter) flag followed by the flanger filter. Run the following command in your terminal:

ffmpeg -i input.mp3 -af flanger output.mp3

This command takes your input file (input.mp3), applies the default flanger settings, and exports the processed audio to output.mp3.

Customizing Flanger Parameters

The FFmpeg flanger filter allows you to fine-tune the effect by adjusting several parameters. The syntax for adding parameters is flanger=parameter1=value1:parameter2=value2.

Here are the most common parameters you can adjust:

Practical Examples

1. Subtle, Slow Flanger

For a gentle sweeping effect that is not too distracting, use a slow speed and moderate depth:

ffmpeg -i input.wav -af "flanger=delay=10:depth=2:regen=20:speed=0.2" output.wav

2. Intense “Jet-Plane” Flanger

To achieve the classic dramatic, metallic “whoosh” sound associated with jet engines, increase the regeneration (feedback) and depth:

ffmpeg -i input.wav -af "flanger=delay=20:depth=4:regen=80:width=90:speed=0.8" output.wav

3. Fast, Vibrato-like Flanger

For a rapid, warbling flanger effect, increase the LFO speed parameter:

ffmpeg -i input.wav -af "flanger=delay=5:depth=3:regen=50:speed=4.0:shape=triangular" output.wav