[FFmpeg-user] complicated audio channel mapping

Nicolas George nicolas.george at normalesup.org
Sat Feb 2 11:56:26 CET 2013


Le primidi 11 pluviôse, an CCXXI, Gász Zoltán a écrit :
> Here comes the idea. Why not amerge all the input channels and the
> use mapping from the labeled "virtual stream":
> 
> -filter_complex "[0:1] [0:2] [0:3] [0:4] amerge=inputs=8 [mylabel]"
> 
> Now I have 8 channels in the "mylabel" stream, so map it to the 4
> output streams:
> 
> -map [mylabel]:0.1
> -map [mylabel]:0.2
> -map [mylabel]:0.3
> -map [mylabel]:0.4
> 
> So far so good, but now I ended up with 4  8-channel-streams.
> So I would like to use map_channel, somehow like this:
> 
> -map_channel [mylabel].0.0:0.1
> -map_channel [mylabel].0.1:0.1
> -map_channel [mylabel].1.0:0.2
> -map_channel [mylabel].1.1:0.2
> -map_channel [mylabel].2.0:0.3
> -map_channel [mylabel].2.1:0.3
> -map_channel [mylabel].3.0:0.3
> -map_channel [mylabel].3.1:0.3
> 
> ... but there is no such thing :( I can not use map_channel with
> amerge labeled "virtual streams".
> 
> What is the best practice for this?

I am not sure whether the docs tell it explicitly: are you aware that the
-map_channel option is just a short cut to build the required amerge+pan
filter chain. Therefore, if you are ready to use the -filter_complex
feature, you can do it entirely there, with something like that:

[0:1] [0:2] [0:3] [0:4] amerge=inputs=4 , asplit=3 [s1] [s2] [s3] ;
[s1] pan=stereo:c0=c0:c1=c1 ;
[s2] pan=stereo:c0=c2:c1=c3 ;
[s3] pan=quad:c0=c4:c1=c5:c2=c6:c3=c7

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130202/790c9fba/attachment.asc>


More information about the ffmpeg-user mailing list