How to Configure FFmpeg Crossfeed Filter
This article provides a quick overview of how to configure the
crossfeed level using the FFmpeg crossfeed audio filter.
You will learn the exact parameters required to adjust the strength and
frequency range of the crossfeed effect, along with practical
command-line examples to apply to your audio files.
The crossfeed filter in FFmpeg is used to blend the left
and right audio channels, which is highly beneficial for headphone
listening as it reduces auditory fatigue by simulating a speaker
environment.
The FFmpeg Crossfeed Syntax
To configure the crossfeed filter, you apply the -af
(audio filter) flag followed by crossfeed and its specific
parameters. The basic syntax is:
ffmpeg -i input.mp3 -af "crossfeed=strength=0.5:range=400" output.mp3Key Parameters for Configuring Crossfeed
You can fine-tune the crossfeed effect using the following parameters:
strength(orf): This controls the amount of crossfeed (how much of the left channel is mixed into the right, and vice versa).- Value range:
0.0to1.0 - Default:
0.2 - Note: A value of
0.0disables the effect, while1.0provides maximum channel blending.
- Value range:
range(orr): This sets the cutoff frequency in Hz. Only frequencies below this limit are fed into the opposite channel, mimicking how low-frequency sounds naturally bend around the human head.- Value range:
0to20000Hz - Default:
350Hz
- Value range:
level_in(orln): Sets the input volume level.- Value range:
0.0to1.0(Default is0.9)
- Value range:
level_out(orlo): Sets the output volume level to prevent clipping.- Value range:
0.0to1.0(Default is1.0)
- Value range:
Practical Examples
1. Light Crossfeed (Subtle Speaker Simulation)
For a subtle effect that gently reduces headphone fatigue without drastically altering the stereo image, use a lower strength:
ffmpeg -i input.wav -af "crossfeed=strength=0.15:range=300" output.wav2. Strong Crossfeed (For Hard-Panned Stereo Tracks)
Older stereo recordings (like early Beatles tracks) often have instruments fully panned to one ear. To blend these channels more aggressively:
ffmpeg -i input.mp3 -af "crossfeed=strength=0.6:range=450" output.mp33. Using Shorthand Notation
FFmpeg allows you to pass the parameter values without naming them,
as long as you keep them in the correct order
(strength:range:level_in:level_out):
ffmpeg -i input.ogg -af "crossfeed=0.4:400:0.8:0.9" output.ogg