Nvcompositor can not connect nv3dsink when nvcompositor sinkpad is system memory

I have faced some nvcompositor issue. I need to composite two video streams from two USB camera.
Below is my pipeline:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=480 ! videoconvert !  video/x-raw,format=RGBA ! queue ! nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 sink_0::xpos=640 sink_0::ypos=0 sink_1::width=640 sink_1::height=480 ! nv3dsink  v4l2src device=/dev/video1 ! video/x-raw,format=YUY2,width=640,height=480 ! videoconvert !  video/x-raw,format=RGBA ! queue ! comp.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.608132989
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

If I replace the nv3dsink by nvoverlaysink, the pipeline is working, but I can not use nvoverlaysink since nvoverlaysink does not have window.
And for some reason from my app side the sinkpad of nvcompositor need to be system memory i.e.“video/x-raw, format=RGBA” , rather than NVMM “video/x-raw(memory:NVMM)”.

Could you help? Thanks in advance.

Hi,
Please share your release version:

$ cat /etc/nv_tegra_release

So that we can set up the device and try to replicate the issue.

Hi DaneLLL

Below is my release version

$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t186ref, EABI: aarch64, DATE: Mon Jul 26 19:36:31 UTC 2021

Hi,
Please try the single camera case:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=640,height=480 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! queue ! nvcompositor name=comp sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 ! 'video/x-raw(memory:NVMM)' ! nv3dsink

If it works, please try two cameras. It looks like sink_0::xpos sink_0::ypos are set twice. It should be a typo. Please fix it to set sink_1::xpos sink_1::ypos