[FFmpeg-user] Concatenating 2 or more MP4 videos containing multiple audio streams
Sylvain Tremblay
syltrem at videotron.ca
Sun May 21 23:52:32 EEST 2023
Hi Kieran
Thanks for your reply
I updated ffmpeg.exe and the error no longer arises. So that's one good thing.
With this
ffmpeg -i CLEO_D1-4.mp4 -i CLEO_D2.mp4 -map 0 -map 1 Cleopatra.mp4
or this
ffmpeg -i CLEO_D1-4.mp4 -i CLEO_D2.mp4 -map 0:v -map 0:a -map 1:v -map 1:a Cleopatra_2.mp4
I get the 1st video only with 6 languages (it duplicates the audio streams). The 2nd part is not copied in the resulting file.
If I use this
ffmpeg -i CLEO_D1-4.mp4 -i CLEO_D2.mp4 -map 0:v -map 0:a Cleopatra.mp4
then I still get the 1st video only but the audio tracks are fine.
I'm missing the correct bits to get this to work
Thanks for any hint!
~ST
-----Message d'origine-----
De : ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] De la part de Kieran O Leary
Envoyé : 21 mai 2023 03:50
À : FFmpeg user questions <ffmpeg-user at ffmpeg.org>
Objet : Re: [FFmpeg-user] Concatenating 2 or more MP4 videos containing multiple audio streams
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".
>
_______________________________________________
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