FFmpeg Vibrato Filter: Apply Frequency Modulation
The vibrato audio filter in FFmpeg allows you to apply
periodic frequency modulation—commonly known as pitch variation or
vibrato—to an audio stream. This guide explains the mechanics of the
vibrato filter, details its primary parameters, and
provides ready-to-use command-line examples ranging from subtle musical
effects to dramatic sound design warping.
How the Vibrato Filter Works
Vibrato alters the pitch of an audio signal sinusoidally over time
without changing the playback speed. In FFmpeg, the vibrato
filter operates through two primary arguments:
frequency(orf): Sets the modulation speed in Hertz (Hz). This defines how many times per second the pitch oscillates. The default value is5.0Hz, with an allowed range between0.1and20000.0.depth(ord): Sets the modulation depth or intensity, defining how far the pitch deviates from the original frequency. The value ranges from0.0(no effect) to1.0(maximum pitch deviation). The default value is0.5.
Basic Command Syntax
To apply the filter to an audio file using default settings (5 Hz frequency, 0.5 depth), use the following syntax:
ffmpeg -i input.mp3 -af "vibrato" output.mp3You can explicitly set both parameters using the key-value format:
ffmpeg -i input.mp3 -af "vibrato=f=5:d=0.5" output.mp3Alternatively, you can provide the arguments positionally (frequency first, depth second):
ffmpeg -i input.mp3 -af "vibrato=5:0.5" output.mp3Practical Examples
Natural Musical Vibrato
Human vocalists and string instruments typically produce vibrato at rates between 4 Hz and 7 Hz with subtle depth. To emulate a natural acoustic vibrato without introducing harsh pitch warping, keep the depth low:
ffmpeg -i vocal_track.wav -af "vibrato=f=6.0:d=0.15" vocal_vibrato.wavWarped Vinyl / Tape Flutter Effect
To simulate the slow, unstable pitch drift of an aging tape machine or warped vinyl record, reduce the modulation frequency to roughly 0.5 Hz to 2 Hz while using a moderate depth:
ffmpeg -i music.mp3 -af "vibrato=f=1.2:d=0.3" warped_tape.mp3Extreme Sci-Fi / Laser Modulation
For aggressive sound design or robotic, alien-like effects, increase both the speed and the depth:
ffmpeg -i sfx.wav -af "vibrato=f=14.0:d=0.9" sci_fi_sfx.wavApplying Vibrato to a Video File
When working with video files, apply the audio filter via
-af and pass the video stream through untouched using
-c:v copy to avoid re-encoding the video:
ffmpeg -i input.mp4 -c:v copy -af "vibrato=f=5.5:d=0.25" output.mp4