[FFmpeg-user] Audio channel mapping of stereo channel without re-encode

Hanno Klamke Hanno.Klamke at streamlab.net
Thu Aug 21 16:13:09 CEST 2014


I would like to transcode a video into several outputs. From the source audio I would like to take either only the left or the right channel into my outputs. While only transcoding the video and copy the audio.

I tried to do it with -map  and also with -map_channel but either I can't get through to the stereo channels or I can't copy the audio codec.

Command:
ffmpeg -i D:\_Projekte_\Hanno_transcoding\Source\Touchdown_h264_1080i_59_TC_audiotest.mp4 -map_channel 0.1.0 -map_channel 0.1.0 -c copy td_rechts_2.mp4

-->Nothing happens if I use -c copy. Without -c copy it would work but re-encode. I tried Mp3, PCM, AAC.

I also tried
ffmpeg -i D:\_Projekte_\Hanno_transcoding\Source\sintel_trailer-1080p.mp4 -c copy -map 0:0 -map -0:a:1.1 sintel1_0-0_1_neu.mp4

But it seems to not access the single tracks of the stereo channel. I was just guessing if this would be the rigt command.
I also tried panning but it could not be used together with stream copy.
"Filtergraph 'pan=stereo:c1=c1' was defined for audio output stream 0:1 but codec
 copy was selected. Filtering and streamcopy cannot be used together."

Is accessing the stereo tracks only possible via re-encode?

best regards


More information about the ffmpeg-user mailing list