You may use nvcompositor.
Be sure the final resolution doesn’t exceed your monitor resolution.
Try :
gst-launch-1.0 -v \
nvcompositor name=mix \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1280 sink_0::height=720 \
sink_1::xpos=1280 sink_1::ypos=0 sink_1::width=1280 sink_1::height=720 \
sink_2::xpos=0 sink_2::ypos=720 sink_2::width=1280 sink_2::height=720 \
sink_3::xpos=1280 sink_3::ypos=720 sink_3::width=1280 sink_3::height=720 \
! 'video/x-raw(memory:NVMM),format=RGBA,width=2560,height=1440,framerate=30/1' ! nvvidconv ! nvoverlaysink \
videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720,pixel-aspect-ratio=1/1' ! queue ! mix.sink_0 \
videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720,pixel-aspect-ratio=1/1' ! queue ! mix.sink_1 \
videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720,pixel-aspect-ratio=1/1' ! queue ! mix.sink_2 \
videotestsrc ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV12,width=1280,height=720,pixel-aspect-ratio=1/1' ! queue ! mix.sink_3
and when it works, just change the sources to your cams instead of videotestsrc.
Since you’re using UYVY sensors, you may use nvv4l2camerasrc:
gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! ...