FFmpeg 0.9.4
Since* 0.9
#

Mix channels with specific gain levels. The filter accepts the output channel layout followed by a set of channels definitions.

The filter accepts parameters of the form: "l:outdef:outdef:..."

l

output channel layout or number of channels

outdef

output channel specification, of the form: "out_name=[gain*]in_name[+[gain*]in_name...]"

out_name

output channel to define, either a channel name (FL, FR, etc.) or a channel number (c0, c1, etc.)

gain

multiplicative coefficient for the channel, 1 leaving the volume unchanged

in_name

input channel to use, see out_name for details; it is not possible to mix named and numbered input channels

If the ‘=’ in a channel specification is replaced by ‘<’, then the gains for that specification will be renormalized so that the total is 1, thus avoiding clipping noise.

For example, if you want to down-mix from stereo to mono, but with a bigger factor for the left channel:

pan=1:c0=0.9*c0+0.1*c1

A customized down-mix to stereo that works automatically for 3-, 4-, 5- and 7-channels surround:

pan=stereo: FL < FL + 0.5*FC + 0.6*BL + 0.6*SL : FR < FR + 0.5*FC + 0.6*BR + 0.6*SR

Note that ffmpeg integrates a default down-mix (and up-mix) system that should be preferred (see "-ac" option) unless you have very specific needs.