The (batch) script below produces a mosaic of the nine input videos:
FFMPEG ^
-y -i "v1.mp4" -i "v2.mp4" -i "v3.mp4" -i "v4.mp4" -i "v5.mp4" -i "v6.mp4" -i "v7.mp4" -i "v8.mp4" -i "v9.mp4" ^
-filter_complex "[0:v][1:v][2:v]hstack=3[Row0];[3:v][4:v][5:v]hstack=3[Row1];[6:v][7:v][8:v]hstack=3[Row2];[Row0][Row1][Row2]vstack=3[v]" ^
-map "[v]" -shortest "Mosaic3x3.mp4"
The input videos are all 1280x720 and the resulting output is therefore 3840x2160 and takes a long time to render. The plan is to use this script as a basis to produce even larger mosaics and the time to render the output will become excessive.
So I wish to know the following:
is it preferable to scale the input videos before stacking them, or to scale the mega-sized mosaic output? Or both (scale at input and output)? I'm interested to know the trade-offs between scaling and output quality and processing time:
For a 6x6 mosaic, assuming a final resolution of 1920x1080, if I were to scale at the input, I would be scaling 1280x720 down to 320x180. I can't work out the command syntax for applying scaling at either end.