Use ffmpeg to create a split screen video out of 5 videos- 4 videos in landscape one in portrait
Assuming you want a layout of:

0 1 2
0 3 4


Command is:

ffmpeg -i input0.mp4 -i input1.mp4 -i input2.mp4 -i input3.mp4 -i input4.mp4 -filter_complex "[0]scale=-1:720[v0];[1]scale=-1:360[v1];[2]scale=-1:360[v2];[3]scale=-1:360[v3];[4]scale=-1:360[v4];[v0][v1][v2][v3][v4]xstack=inputs=5:layout=0_0|w0_0|w0+w1_0|w0_h1|w0+w1_h1[v]" -map "[v]" output.mp4