How to enable 2 MIPI CSI-2 camera at the same time and in the same pipeline?

My Jetson Nano has 2 CSI-2 interfaces. I would like to use them to measure distance with the stereo distance algorithm. But I don’t know how to enable both of them at the same time. I can enable them separately, but whenever I tried this code

$ gst-launch-1.0 \
nvarguscamerasrc sensor-id=0 \
! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' \
! nvoverlaysink overlay=0 overlay-x=0 overlay-y=0 overlay-w=960 overlay-h=1080 \
! nvarguscamerasrc sensor-id=1 \
! 'video/x-raw(memory:NVMM),width=1920,height=1080,framerate=30/1,format=NV12' \
! nvoverlaysink overlay=1 overlay-x=100 overlay-y=100 overlay-w=960 overlay-h=1080

I get an error like :

WARNING: erroneous pipeline: could not link nvoverlaysink-nvoverlaysink0 to nvarguscamerasrc1

Try with xvimagesink instead of nvoverlaysink.

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080’ ! nvvidconv ! xvimagesink sync=false &
gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080,’ ! nvvidconv ! xvimagesink sync=false

Thank you for your reply and it worked, I would like to ask one more question. If I want to synchronize both of them, what parameter that I need to add ?

What’s do you want to sync? I don’t think there’s this kind of parameter.