[FFmpeg-user] Audio Channel mapping: 8 channel to 2 channel stream, dropping input channels 3-8

Tim Nicholson nichot20 at yahoo.com
Mon Jul 9 08:57:43 CEST 2012


On 08/07/12 08:23, Dan Flett wrote:
> Hi all,
> 
> I am struggling to find a way of mapping channels 1 and 2 of the first input
> stream of my audio input.
> 
> -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.
> 
> I have tried various filters such as channelmap, pan, etc.  No matter what I
> do, the filters always seem to detect the 8 channel input stream as a 7.1
> audio format (which it isn't - it's 8 discrete, unrelated audio channels -
> not surround sound), and always performs a downmix.  I don't want a downmix,
> I just want channel 1 and 2 of the input stream to be channel 1 and 2 of the
> output stream and all other input channels to be dropped.
> 
> 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?


> Cheers,
> 
> Dan
> 
> [..]

-- 
Tim




More information about the ffmpeg-user mailing list