2

Need to:

concatenate 3 mpg4 video clips (each around 1 minute long, and 800x500 size) + background mp3 -> into a 1-minute long (1920x1080) video composed of the first 20 seconds from each of the 4 videos.

So each clip would need to be enlarged (from 800x500 to 1920x1200 to keep aspect ration), and then the height (cropped down to 1920x1080 from the bottom of the video).

Then each video cut down to the first 20 seconds.

Then the 3 videos are concatenated (along with a 1 minute long mp3 file to play in the background of the final video).

Questions:

  1. Is ffmpeg capable of doing this correctly and how?
3

Sure. Command is

ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -i bg.mp3
-filter_complex
"[0]trim=0:20,scale=1920:-1,crop=1920:1080:0:0[a];
 [1]trim=0:20,scale=1920:-1,crop=1920:1080:0:0[b];
 [2]trim=0:20,scale=1920:-1,crop=1920:1080:0:0[c];
 [a][b][c]concat=3[v]"
-map "[v]" -map 3:a
-shortest out.mp4

Skip the -shortest if the audio is slightly longer than 1 minute. Alternatively, adjust one of the trim endpoints to make up for the shortfall.

to play in the background of the final video -> I assume final here means the output and not the 3rd video.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.