How to Use the FFmpeg Phaser Filter
This article provides a quick, practical guide on how to use the
phaser audio filter in FFmpeg to create a sweeping, spacey
sound effect. You will learn the syntax of the filter, the meaning of
its key parameters—such as delay, decay, and speed—and see real-world
command examples to help you apply this classic effect to your audio and
video files.
The phaser filter in FFmpeg simulates an analog phaser effect by splitting the audio signal, modulating the phase of one part using a Low-Frequency Oscillator (LFO), and mixing it back with the original input.
The Basic Syntax
To apply the phaser filter, use the audio filter flag
(-af or -filter:a) followed by
phaser and its parameters:
ffmpeg -i input.wav -af "phaser=parameter1:parameter2:..." output.wavIf you want to use the default settings, you can run the command with just the filter name:
ffmpeg -i input.wav -af phaser output.wavPhaser Filter Parameters
You can customize the phaser effect by passing specific values in the following order, separated by colons:
phaser=in_gain:out_gain:delay:decay:speed:type
in_gain: Sets the input gain (volume). The default value is0.89.out_gain: Sets the output gain (volume). The default value is0.74.delay: Sets the delay in milliseconds. The range is0.0to5.0. The default is3.0.decay: Sets the decay parameter (feedback), which controls how intense or “resonant” the sweep sounds. The range is0.0to0.99. The default is0.4.speed: Sets the modulation speed in Hertz (Hz) of the LFO sweep. The range is0.1to2.0. The default is0.5.type: Sets the modulation LFO wave type. You can choose eithertriangular(ort) orsinusoidal(ors). The default istriangular.
Practical Examples
1. Slow and Deep Phaser Effect To create a slow,
dramatic sweep, lower the speed to 0.2 Hz and increase the
decay to 0.6 using a sinusoidal wave:
ffmpeg -i input.mp3 -af "phaser=0.9:0.8:2.0:0.6:0.2:s" output.mp32. Fast, Shimmering Phaser Effect To achieve a fast,
fluttering effect, increase the speed to 1.5 Hz and reduce
the delay:
ffmpeg -i input.mp3 -af "phaser=0.8:0.74:1.0:0.5:1.5:t" output.mp33. Heavy Resonance Phaser Effect For a highly pronounced, metallic sweeping sound, push the decay close to its limit:
ffmpeg -i input.mp3 -af "phaser=0.89:0.74:4.0:0.9:0.4:t" output.mp3