ffmpeg: interpret input size?

Solution 1:

You can maybe scale all of your inputs down to 240x240 and then stack every sample at this size :

ffmpeg -i .\inputfile_240-1.mp4 -i .\inputfile_240-2.mp4 -i .\inputfile_480-1.mp4 -i .\inputfile_480-2.mp4 -filter_complex "[0:v]scale=240:240[v0];[1:v]scale=240:240[v1];[2:v]scale=240:240[v2];[3:v]scale=240:240[v3];[v0][v1][v2][v3]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[out]" -map "[out]" result.mp4

adjust your layout to match what you want.

(maybe add flags to your scale filter depending on what you're doing to your files eg. upscale or downscale)