Multiple Cameras (nvarguscamerasrc) to Single Window (nv3dsink)

Is there and example, preferably C, that shows how I can combine two camera streams into a single window using gstreamer (or otherwise). At the moment I am starting two separate streams which spawn two windows. It would be ideal to have these combined into a single output.

Example:
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM), width=2560, height=1440, format=(string)NV12, framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! ‘video/x-raw(memory:NVMM), format=(string)I420’ ! nv3dsink

Thanks!
Kris

Hi,
You can use nvcompositor plugin. Please refer to the post:

With a little tinkering, that worked perfectly. Thank you!

For future reference:

gst-launch-1.0 nvcompositor name=nvcomp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1920 sink_0::height=1080 sink_1::xpos=1920 sink_1::ypos=0 sink_1::width=1920
! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)I420’, width=3840, height=1080 ! nv3dsink
nvarguscamerasrc sensor_id=1 ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1’
! nvvidconv flip-method=2 ! nvcomp.sink_0
nvarguscamerasrc sensor_id=0 ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, format=(string)NV12, framerate=(fraction)30/1’
! nvvidconv flip-method=2 ! nvcomp.sink_1