[FFmpeg-user] Audio Channel mapping: 8 channel to 2 channel stream, dropping input channels 3-8
Dan Flett
dflett at bigpond.net.au
Tue Jul 10 04:04:31 CEST 2012
> > -map_channel does what I want if I know which numerical
> stream is the
> > audio
> > - e.g. -map_channel 0.0.0 -map_channel 0.0.1. However in my video
> > files, the first audio stream is sometimes 0.0, sometimes
> it is 0.1.
> > I want to script this so that it always takes the first
> audio stream.
> > I can't seem to use the "a" stream identifier in
> -map_channel to unambiguously denote audio.
> >
> > Does anyone have a suggestion here? I want to avoid a
> 2-step process - i.e.
> > piping or using a temp file.
> >
>
> Would you regard using ffprobe to list the streams first, and
> then using it to fill in the required numbers for the
> transcode as 2 passes?
Hi Tim
Yes I would consider it to be 2 passes as I'd have to write some more code
in my script to parse the output of ffprobe (not too hard I know) and
include the ffprobe binary in the "package". Something like the pan filter
is tantalising close to what I want it to do (in fact, it's supposed to do
what I want it to do). When I get a moment, I will try this again with the
pan filter and post the results. There is the real possibility that I'm
currently doing it wrong. :)
As a general observation, I think the "map_channel" option should support
the "a" stream identifier - to make it more useful and to make it more
consistent with the other newer options that support "a" or "v" or similar.
Dan
More information about the ffmpeg-user
mailing list