I don’t have 2 cameras for trying but this seems working:
gst-launch-1.0 -ev nvarguscamerasrc ! 'video/x-raw(memory:NVMM), format=NV12, width=1280, height=720, framerate=30/1' ! tee name=t t. ! queue ! comp.sink_0 t. ! queue ! comp.sink_1 nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=1280 sink_1::ypos=0 sink_0::width=1280 sink_0::height=720 sink_1::width=1280 sink_1::height=720 ! 'video/x-raw(memory:NVMM)' ! nvvidconv ! nvv4l2h264enc bitrate=8000000 insert-sps-pps=true ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=5000 sync=false async=false
And checked on same jetson with:
gst-launch-1.0 -ev udpsrc port=5000 ! queue ! application/x-rtp, media=video, encoding-name=H264 ! rtph264depay ! h264parse ! omxh264dec ! nvvidconv ! videoconvert ! xvimagesink sync=false