RTSP Server fails when using a second camera with nvcompositor

Hello there,

I’ve been trying to use gstreamer to setup a RTSP server, so far I did accomplish what i need, which is 2 video feed side by side plus one audio source, but one of the video feed I’m using is a videotestsrc.

When I try to add a second camera I got some errors.

Code that works so far. (File test-multicast from gst-rtsp-server)
Using only one camera

nvcompositor name=comp sink_1::xpos=1920 ! nvvidconv ! video/x-raw(memory:NVMM) ! omxh264enc insert-sps-pps=true bitrate=20000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! rtpL16pay name=pay1 videotestsrc is-live=true ! video/x-raw, width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM) ! comp. nvarguscamerasrc ! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM) ! comp.

Code where I change the videotestsrc for my second camera.

nvcompositor name=comp sink_1::xpos=1920 ! nvvidconv ! video/x-raw(memory:NVMM) ! omxh264enc insert-sps-pps=true bitrate=20000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! rtpL16pay name=pay1 nvarguscamerasrc sensor-id=1 ! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM) ! comp. nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1 ! nvvidconv ! video/x-raw(memory:NVMM) ! comp.

The first result is consumed correctly by VLC.

The second one shows this error:

0:00:06.709695301 29232 0x7f980250a0 ERROR nvcompositor gstnvcompositor.c:1321:do_nvcomposite: NvBufferComposite failed
0:00:06.709763635 29232 0x7f980250a0 ERROR nvcompositor gstnvcompositor.c:1378:gst_nvcompositor_aggregate_frames: Failed to composit frames

Thanks in advance.
Raul.

Hi,
Please try this:
Jetson/L4T/r32.6.x patches - eLinux.org
[gstreamer] patch for running v4l2src + nvcompositor

Please apply the patch to add the property and set background width and height.

Hello DaneLLL,

Now it’s working with this code:

nvcompositor name=comp 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 ! nvvidconv ! video/x-raw(memory:NVMM) ! omxh264enc insert-sps-pps=true bitrate=20000000 ! h264parse ! rtph264pay name=pay0 pt=96 alsasrc ! audioconvert ! rtpL16pay name=pay1 nvarguscamerasrc sensor_id=0 ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=60/1, format=NV12 ! nvvidconv flip-method=0 ! video/x-raw(memory:NVMM),width=1280, height=720, format=RGBA ! queue ! tee name=t t. ! queue ! comp. t. nvarguscamerasrc sensor_id=1 ! video/x-raw(memory:NVMM),width=1280, height=720, framerate=60/1, format=NV12 ! nvvidconv flip-method=0 ! video/x-raw(memory:NVMM),width=1280, height=720, format=RGBA ! queue ! comp.

It seems I already had that patch applied. I’m not sure what I’m doing wrong on the original code I was using.

I used this post to make it work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.