concat and multiple audio streams

Questions involving a Windows version of FFmpeg.
Post Reply
vbmizio
Posts: 2
Joined: Mon Mar 12, 2018 1:30 pm

concat and multiple audio streams

Post by vbmizio » Mon Mar 12, 2018 1:36 pm

hi all, I'm using ffmpeg to concatenate some video clip. I use the " -f concat -i "C:\MyFileList.txt" -c copy "D:\Video\5tracce\mer.MOV" " string, but if the source video clips have more than an audio track, the output video file has just one track.
All the sources are similar each other, same audio and video codec, same system format, same audio tracks number.
Can someone help me?

therube
Posts: 26
Joined: Thu Nov 02, 2017 7:41 pm

Re: concat and multiple audio streams

Post by therube » Mon Mar 12, 2018 11:55 pm

My expectation, like yours is that it should work as you've done.
But it does not.

What you've done is a what Concatenate shows.
Concat also mentions, Stream copy.
Stream copy says, "By default, ffmpeg includes only one stream of each type (video, audio, subtitle) present in the input files and adds them to each output file.".
And then mentions -map.

So with that...

Code: Select all

ffmpeg  -f concat  -i input.txt  -map 0:v  -vcodec copy  -map 0:a  -acodec copy  out.mkv
-map 0:v says to select all the video streams.
-map 0:a says to select all the audio streams.


Sample file with 5. Multiple audio/subtitles.
Note that the sample has subtitles & if you have subs you may have to account for them too ;-).

vbmizio
Posts: 2
Joined: Mon Mar 12, 2018 1:30 pm

Re: concat and multiple audio streams

Post by vbmizio » Tue Mar 13, 2018 9:26 am

Hi therube,
it works correctly.
Thanks

Post Reply