Suppose I have a series of video files to combine with non-overlapping times:
1.mp4
[0:00-0:45]2.mp4
[1:00-2:00]3.mp4
[2:10-3:00]
This example has three segments, but in general, there may be more.
Assuming these are the same aspect ratio but not necessarily the same size, I would like to use a complex filter to combine these into one video file of 3:00 length, with blank spaces when there is no video. I actually want a more complex filter outcome with this as one part, but this is the part I do not understand how to produce.
ffmpeg -i 1.mp4 -i 2.mp4 -i 3.mp4 -filter_complex "
[0:v] scale=640x480 [one];
[1:v] scale=640x480 [two];
[2:v] scale=640x480 [three];
???
[out]" -map '[out]' out.mp4
I am looking for the filter function(s) to apply after scaling the input video streams. I have looked at:
- concat - This does not seem to allow time padding
- streamselect and sendcmd - This seems to get horribly complicated if there are many streams
This question is similar to FFmpeg - Concenating audio files with spacing, but with video instead of audio.
I am only looking for help with the video; I already have the audio functioning the way I want.