Configure Panning Frequency in FFmpeg apulsator

This article provides a quick guide on how to configure the panning frequency in the FFmpeg apulsator filter. You will learn how to use the hz and bpm parameters to control the speed of the auto-panning effect, complete with practical command-line examples to help you implement these settings in your audio processing workflows.

The FFmpeg apulsator filter is an audio effect that automatically pans the sound between the left and right stereo channels, creating a pulsating space effect. The speed or frequency of this panning effect is primarily controlled by two parameters: hz (Hertz) and bpm (Beats Per Minute).

Using the hz Parameter

The hz parameter defines the frequency of the panning modulation in Hertz. This determines how many times the sound pans back and forth per second.

To set the panning frequency to 5 Hz (meaning 5 full cycles per second), use the following syntax:

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

Using the bpm Parameter

If you prefer to synchronize the panning effect with the tempo of a song, you can use the bpm parameter instead of hz. FFmpeg will automatically calculate the corresponding frequency based on the beats per minute you specify.

To set the panning speed to match a tempo of 120 BPM, use this command:

ffmpeg -i input.mp3 -af "apulsator=bpm=120" output.mp3

Note: If both hz and bpm are defined in the filter chain, the hz parameter takes precedence and overrides the bpm setting.

Adjusting Depth with Frequency

To make the panning effect more or less pronounced at your chosen frequency, you can combine the frequency setting with the amount parameter. The amount parameter controls the modulation depth, ranging from 0.0 (no panning) to 1.0 (maximum channel separation).

ffmpeg -i input.mp3 -af "apulsator=hz=3:amount=0.8" output.mp3