I'm trying to create a series of split screen videos for students to work on remotely using ffmpeg. I need to create an ffmpeg split screen "template" for 5 videos, 1 in portrait and the other 4 in landscape. All the videos have the same resolution: 1280x720. One is 720x1280 (portrait) and the other 4 are 1280 x 720 (landscape) I want to create a split screen of dimensions 1680x720 out of the 5 videos so the portrait video is 400x720 and the 4 landscape videos as 640x360. How do I modify this 2x2 grid ffmpeg code to allow this?:
ffmpeg -i input0.mp4 -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" output.mp4