I'm trying to concatenate 3 videos, which have different encodings, and 2 lack audio. I added mute audio tracks to the ones that didn't have any using:
ffmpeg -i video1_no_audio.m4v -f lavfi -i anullsrc -c:v copy -map 0:v -map 0:a? -map 1:a -shortest video1_now_with_blank_audio.m4v
Then I tried to concatenate them with:
ffmpeg -i video1_now_with_blank_audio.m4v -i video2.mp4 -i video3_now_with_blank_audio.m4v -filter_complex "[0:0] [0:1] [1:0] [1:1] [2:0] [2:1] concat=n=3:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" combined_vdeo.mp4
This fails with:
Parsed_concat_0 @ 0x7fba9b00fd80] Input link in1:v0 parameters (size 1920x1720, SAR 1:1) do not match the corresponding output link in0:v0 parameters (1204x1080, SAR 1:1) [Parsed_concat_0 @ 0x7fba9b00fd80] Failed to configure output pad on Parsed_concat_0 Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Error while processing the decoded data for stream #2:0 Conversion failed!
The 1st and 3rd videos are title and credit sequences that I made in Keynote, and exported as .mk4 videos. On screen, they have 1920x1720 aspect ratio, which matches the video I'm trying to concatenate them with. I'm not sure how to fix the 1st and 3rd videos so they match the 2nd, and then concatenate them...