How to Use Vibrato Filter in FFmpeg

This article explains how to use the vibrato audio filter in FFmpeg to add a pitch-modulation effect to your audio files. You will learn about the key parameters of the filter—frequency and depth—and how to apply them using practical command-line examples to achieve the exact audio effect you need.

Understanding the Vibrato Filter Parameters

The vibrato filter in FFmpeg modulates the pitch of an audio signal, creating a pulsating, vibrating sound. It relies on two primary parameters to control the effect:

  • f (Frequency): This defines the modulation frequency in Hertz (Hz). It controls how fast the pitch vibrates. The default value is 5.0 Hz, and the allowed range is from 0.1 to 20000.0 Hz.
  • d (Depth): This defines the modulation depth, which determines how extreme the pitch variation is. The default value is 0.5, and the allowed range is from 0.0 (no effect) to 1.0 (maximum effect).

Basic Command Syntax

To apply the filter, use the -af (audio filter) flag in your FFmpeg command. The basic syntax is:

ffmpeg -i input.wav -af "vibrato=f=FREQUENCY:d=DEPTH" output.wav

Practical Examples

1. Applying the Default Vibrato Effect

If you do not specify any parameters, FFmpeg will use the default values of f=5.0 and d=0.5.

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

2. Creating a Slow, Deep Vibrato

To create a slow, dramatic pitch bend, set a low frequency and a high depth:

ffmpeg -i input.mp3 -af "vibrato=f=2.0:d=0.8" output.mp3

3. Creating a Fast, Subtle Tremble

To create a fast but subtle shimmer, increase the frequency and lower the depth:

ffmpeg -i input.mp3 -af "vibrato=f=12.0:d=0.2" output.mp3

4. Extreme Modulation Effects

For experimental or sound-design purposes, you can push the frequency into higher ranges to create ring-modulation-like metallic sounds:

ffmpeg -i input.mp3 -af "vibrato=f=100.0:d=0.9" output.mp3