How to Use FFmpeg apulsator Filter for Auto-Pan

This article explains how to use the apulsator filter in FFmpeg to apply dynamic auto-pan effects to your audio files. You will learn the core parameters of the filter—such as frequency, amount, and modulation mode—and how to implement them using practical command-line examples to shift audio seamlessly between the left and right stereo channels.

Understanding the apulsator Filter

The apulsator filter is an audio channel modulator that alters the volume of the left and right channels over time. This creates a psychoacoustic “panning” effect, making the sound feel as though it is physically moving back and forth between the left and right speakers or headphones.

Key Parameters of apulsator

To customize the auto-pan effect, you can configure several parameters:

Practical FFmpeg Command Examples

1. Basic Auto-Pan Effect

To apply a standard, smooth sine-wave pan at a rate of 1 Hz (one full cycle per second):

ffmpeg -i input.mp3 -af "apulsator=hz=1" output.mp3

2. Fast, Intense Panning with Triangle Wave

If you want a sharper, faster transition back and forth, you can increase the frequency to 5 Hz and change the modulation mode to a triangle wave:

ffmpeg -i input.mp3 -af "apulsator=hz=5:mode=triangle:amount=0.8" output.mp3

3. Subtle Ambient Panning

For a subtle spatial effect where the sound gently drifts without fully silencing either channel, lower the modulation amount and frequency:

ffmpeg -i input.mp3 -af "apulsator=hz=0.3:amount=0.4" output.mp3