Display inputs into a grid
How to display four inputs into 2x2 grid. If inputs are of different sizes unused gaps might appear, as not all of output video is used.
xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
Display 4 inputs into 1x4 grid, note that if inputs are of different sizes unused gaps might appear, as not all of output video is used.
xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
Display 9 inputs into 3x3 grid, note that if inputs are of different sizes unused gaps might appear, as not all of output video is used.
xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2