[FFmpeg-user] swopping channels in a 5.1 layout

Clément Bœsch ubitux at gmail.com
Sun Jan 29 14:58:30 CET 2012

On Sun, Jan 29, 2012 at 02:46:14PM +0100, Youri Feenstra wrote:
> Hi all,
> I'm trying to reverse left and right audio channels from a 5.1 audio source.
> My command is
> ffmpeg -i 6.wav -map_channel 0.0.1 -map_channel 0.0.0 -map_channel 0.0.2
> -map_channel 0.0.3 -map_channel 0.0.5 -map_channel 0.0.4 -y 6rev.wav
> But the resulting file will sound exactly the same.

Mmh indeed I can reproduce. I'm going to look what's going on here.

> However, when I downmix to two channels, like so
> ffmpeg -i 6.wav -ac 2 -map_channel 0.0.1 -map_channel 0.0.0 -map_channel
> 0.0.2 -map_channel 0.0.3 -map_channel 0.0.5 -map_channel 0.0.4 -y 2rev.wav
> ...the resulting audio will have the left and right channels swopped. The
> fact that this will be a 2-channeld audio stream isn't a big problem since
> I'll be using this command on video files which I will play on my phone
> with headphones.
> But, downmixing results in a much lower volume, which is an issue for me.

You can use -rmvol option, or volume audio filter for this.

> Does anyone know why the map_channel option won't work on a 5.1 output
> stream?

Not yet. In the meantime, you can use:

ffmpeg -f lavfi -i
"amovie=6ch.wav,pan=5.1:c0=c1:c1=c0:c2=c2:c3=c3:c4=c4:c5=c5" as a


Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120129/5612bcea/attachment.asc>

More information about the ffmpeg-user mailing list