This question already has an answer here:
I found this answer for combining 2 videos using Ffmpeg
ffmpeg.exe -i LeftInput.mp4 -vf "[in] scale=iw/2:ih/2, pad=2*iw:ih [left];
movie=RightInput.mp4, scale=iw/3:ih/3, fade=out:300:30:alpha=1 [right];
[left][right] overlay=main_w/2:0 [out]" -b:v 768k Output.mp4
Is there a way to combine more than 2?
I tried adding [bottom]
and [upper]
but I'm failing to understand how the overlay works and where do I put more videos.
Use the FFmpeg hstack and vstack filters:
If you want to combine the audio add the amerge filter: