The result will be: Output #0, matroska, to 'output.mkv': Note that “a:0” refers to the output’s first AUDIO stream ( #0:1 in our case), “a:1” refers to the output’s 2nd AUDIO stream ( #0:2 in our case), etc. We used “-c:a:0” to specify codec for the output’s first AUDIO stream and “-c:a:1” to specify codec for the output’s second AUDIO stream.
Video and subtitle stream have just been copied and german audio stream has been encoded to 2 new audio streams, mp3 and aac. So, our output will now have the following streams: Output #0, matroska, to 'output.mkv':Īfter we selected which streams we would like in our output, using “-map” option, we specified codecs for each stream in our output. Using “-map 0:0 -map 0:1 -map 0:1 -map 0:3” we told FFmpeg to select/map specified input streams to output in that order. Note there is no “-map 0:2” and that “-map 0:1” has been specified twice. This can be done using the following FFmpeg command line: ffmpeg -i input.mkv \