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

Kieran O Leary kieran.o.leary at gmail.com
Sun May 21 10:49:30 EEST 2023


Hi,

On Sun 21 May 2023 at 08:26, Sylvain Tremblay <syltrem at videotron.ca> wrote:

> Hi
>
>
>
> 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"


This is the key part missing from your email. What map options did you try?
We would need to see the complete output.
I usually would add -map 0 to grab all tracks, but it sounds like you tried
this and it was bringing over an unsupported track as well. Assuming it’s a
data track, you could try also adding -dn to ignore data tracks, or just
use ‘-map 0:v -map 0:a’ instead of the “-map 0 -dn” to make sure all audio
tracks and video track are mapped.

Best,

Kieran O’Leary
Digital Preservation Manager
National Library of Ireland



>
>
>
> 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 !
>
>
>
> ~ST
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list