How to Use FFmpeg Phaser Filter
This guide explains how to use the phaser audio filter
in FFmpeg to apply a sweeping, multi-phase phase-shift effect to your
audio files. You will learn the filter’s syntax, its key parameters—such
as gain, delay, decay, speed, and modulation type—and practical
command-line examples to help you achieve different phaser sounds.
The Phaser Filter Syntax
The phaser filter in FFmpeg works by splitting the audio
signal, delaying one portion, modulating it with a Low-Frequency
Oscillator (LFO), and mixing it back with the original signal.
The basic syntax for the phaser filter is:
ffmpeg -i input.mp3 -af "phaser=parameter1=value1:parameter2=value2" output.mp3Key Parameters
You can customize the phaser effect by adjusting the following parameters:
in_gain: Sets the input gain. The default value is0.4. range is0.0to1.0.out_gain: Sets the output gain. The default value is0.74. Range is0.0to1.0.delay: Sets the delay in milliseconds. The default value is3.0. Range is0.0to5.0.decay: Sets the decay (feedback) of the filter. The default value is0.4. Range is0.0to0.99.speed: Sets the modulation speed (LFO frequency) in Hz. The default value is0.5. Range is0.1to2.0.type: Sets the modulation type. You can choose betweentriangular(ort) andsinusoidal(ors). The default istriangular.
Practical Examples
1. Default Phaser Effect
To apply a standard phaser effect using FFmpeg’s default settings, use the following command:
ffmpeg -i input.mp3 -af "phaser" output.mp32. Slow and Deep Phaser
For a slower, deeper sweeping sound, decrease the speed
parameter and increase the delay and
decay:
ffmpeg -i input.mp3 -af "phaser=delay=4.0:decay=0.6:speed=0.2:type=sinusoidal" output.mp33. Fast and Intense Phaser
To create a fast, dramatic, vibrato-like phaser effect, increase the speed to its maximum value:
ffmpeg -i input.mp3 -af "phaser=delay=2.0:decay=0.8:speed=2.0:type=triangular" output.mp34. Applying to a Video File
If you want to apply the phaser effect to the audio track of a video
without re-encoding the video stream, use the -c:v copy
option:
ffmpeg -i input.mp4 -af "phaser=speed=0.8" -c:v copy output.mp4