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 is5.0Hz, and the allowed range is from0.1to20000.0Hz.d(Depth): This defines the modulation depth, which determines how extreme the pitch variation is. The default value is0.5, and the allowed range is from0.0(no effect) to1.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.wavPractical 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.mp32. 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.mp33. 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.mp34. 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