[FFmpeg-user] Concatenating 2 or more MP4 videos containing multiple audio streams

Sylvain Tremblay syltrem at videotron.ca
Sun May 21 10:26:27 EEST 2023



I'm struggling to find the correct command parameters to concatenate 2 MP4
videos containing multiple audio streams (different languages or codecs). 


I have 2 video files, a.mp4 and b.mp4 and each have the same 3 languages /
audio tracks in them.  I was able to get 1 audio track only so far.


I tried :

ffmpeg -i CLEO_D1-4.mp4 -i CLEO_D2.mp4 -c copy Cleopatra.mp4


and this one with f.txt containing the 2 file names

ffmpeg -f concat -i f.txt -c copy Cleopatra.mp4


and also different variations of -map which only returned errors such as
"Could not find tag for codec bin_data in stream #4, codec not currently
supported in container"


I searched Google for a couple of hours but could not find the correct
syntax for this task.


I do not need to convert any of the streams as I want the output to be
identical as the source files (same codecs)


Thanks ahead for your suggestions !




More information about the ffmpeg-user mailing list