How to Use the FFmpeg apulsator Filter

This article provides a quick guide on how to use the apulsator filter in FFmpeg to create dynamic audio panning effects. You will learn what the filter does, its key parameters, and how to apply it to your audio files using practical command-line examples.

The apulsator filter in FFmpeg is an audio effect that automatically pans sound between the left and right channels, creating a pulsating tremolo or auto-pan effect. It achieves this by using a Low-Frequency Oscillator (LFO) to modulate the volume of the audio channels over time.

Basic Syntax

To apply the apulsator filter, use the -af (audio filter) flag in your FFmpeg command:

ffmpeg -i input.mp3 -af apulsator output.mp3

By default, this command applies a sinusoidal pulsation at a frequency of 2 Hz, smoothly moving the audio between the left and right speakers.

Key Parameters

You can customize the pulsation effect by passing specific parameters to the filter. The syntax for adding parameters is apulsator=parameter1=value1:parameter2=value2.

Practical Examples

1. Fast Stereo Panning To make the audio pan back and forth rapidly, increase the frequency (hz) to 7 Hz:

ffmpeg -i input.mp3 -af apulsator=hz=7 output.mp3

2. Subtle Panning Effect If you want a gentler effect where the audio does not pan completely to the extremes of each channel, reduce the amount to 0.4:

ffmpeg -i input.mp3 -af apulsator=amount=0.4 output.mp3

3. Choppy Square Wave Effect To create a harsh, rhythmic switching effect between speakers, change the wave mode to square and set the frequency to 3 Hz:

ffmpeg -i input.mp3 -af apulsator=mode=square:hz=3 output.mp3