How to Use the FFmpeg Flanger Filter

This article provides a quick guide on how to apply a flanger effect to audio files using the powerful FFmpeg command-line tool. You will learn the basic syntax of the flanger filter, understand its key parameters for adjusting the modulation, depth, and feedback, and see practical examples of how to customize the effect for different audio results.

The flanger filter in FFmpeg works by splitting the audio signal, delaying one part by a continuously varying amount controlled by a Low-Frequency Oscillator (LFO), and mixing it back with the original, unaffected signal. This creates the classic sweeping, metallic sound often heard in music production.

Basic Syntax

To apply the default flanger effect to an audio file, use the -af (audio filter) flag followed by flanger:

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

Key Parameters

You can customize the flanger effect by passing specific parameters as key-value pairs separated by colons. Here are the most commonly used options:

Practical Examples

1. Standard Stereo Flanger

This configuration creates a classic, noticeable flanger sweep suitable for guitars or synthesizers:

ffmpeg -i input.wav -af "flanger=delay=2:depth=4:regen=50:width=71:speed=0.5:shape=sinusoidal" output.wav

2. Heavy Metallic Flanger

To get a harsh, robotic sound, increase the regeneration (regen) and set a shorter delay:

ffmpeg -i input.wav -af "flanger=delay=1:depth=2:regen=85:width=80:speed=1.5" output.wav

3. Slow and Subtle Jet-Plane Sweep

For a slow, dramatic “jet-plane” phase effect, lower the LFO speed and increase the sweep depth:

ffmpeg -i input.wav -af "flanger=delay=8:depth=8:regen=30:width=60:speed=0.1" output.wav