FFmpeg Phaser Filter Delay Feedback and LFO Rate
The FFmpeg phaser audio filter allows you to create a
sweeping, multi-phase delay effect commonly used in music production to
add depth and motion to sound. This article provides a quick guide on
how to configure the filter’s three essential parameters: delay,
feedback (decay), and the LFO (Low-Frequency Oscillator) speed. By
adjusting these specific settings, you can control the sweep range,
intensity, and rate of the phasing effect to suit your audio processing
needs.
To configure these parameters in FFmpeg, you apply the
phaser audio filter using the -af flag. While
you can pass arguments as a list of positional values, using named
parameters is highly recommended for clarity and precision.
The three key parameters are configured as follows:
1. Delay (delay)
The delay parameter sets the delay in milliseconds for
the phasing effect. This setting determines the frequency range where
the phase cancellation (the “notches” in the sound) occurs. *
Parameter Name: delay * Valid
Range: 0.0 to 5.0 milliseconds *
Default Value: 3.0 *
Usage: Lower values produce a brighter,
higher-frequency sweep, while higher values shift the effect toward
lower, warmer frequencies.
2. Feedback (decay)
The decay parameter controls the amount of output signal
fed back into the filter’s input, which dictates the sharpness and
resonance of the phasing effect. In traditional synthesizer terms, this
is the feedback control. * Parameter Name:
decay * Valid Range: 0.0 to
0.99 * Default Value: 0.4 *
Usage: A value close to 0.0 results in a
very subtle, almost unnoticeable sweep. A value closer to
0.99 creates a highly resonant, metallic, and dramatic
sweeping sound.
3. LFO Rate (speed)
The speed parameter defines the frequency of the
modulation in Hertz (Hz). This determines how fast the phaser sweeps
back and forth through the audio spectrum. * Parameter
Name: speed * Valid Range:
0.1 to 2.0 Hz * Default
Value: 0.5 * Usage: Lower values
(e.g., 0.1 to 0.3) create a slow, spacey,
evolving sweep. Higher values (e.g., 1.5 to
2.0) produce a rapid, warbling modulation.
Command Examples
Example 1: Subtle and Slow Phase Effect To create a gentle, slow-moving phaser effect, use a shorter delay, low decay, and a slow LFO speed:
ffmpeg -i input.mp3 -af "phaser=delay=2.0:decay=0.3:speed=0.2" output.mp3Example 2: Intense and Rapid Warble To achieve a highly resonant, fast-sweeping dramatic effect, increase the delay, decay, and speed:
ffmpeg -i input.mp3 -af "phaser=delay=4.5:decay=0.85:speed=1.8" output.mp3Example 3: Standard Setting with Sinusoidal LFO By
default, the phaser uses a triangular wave shape. You can change the LFO
wave type to sinusoidal (s) for a smoother sweep
transition, alongside your custom delay, feedback, and speed:
ffmpeg -i input.mp3 -af "phaser=delay=3.5:decay=0.6:speed=0.8:type=s" output.mp3