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.mp3

Key Parameters

You can customize the phaser effect by adjusting the following parameters:

  • in_gain: Sets the input gain. The default value is 0.4. range is 0.0 to 1.0.
  • out_gain: Sets the output gain. The default value is 0.74. Range is 0.0 to 1.0.
  • delay: Sets the delay in milliseconds. The default value is 3.0. Range is 0.0 to 5.0.
  • decay: Sets the decay (feedback) of the filter. The default value is 0.4. Range is 0.0 to 0.99.
  • speed: Sets the modulation speed (LFO frequency) in Hz. The default value is 0.5. Range is 0.1 to 2.0.
  • type: Sets the modulation type. You can choose between triangular (or t) and sinusoidal (or s). The default is triangular.

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.mp3

2. 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.mp3

3. 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.mp3

4. 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