RTSP-server and side-by-side (nvcompositor) nvarguscamerasrc camera

Hello there.

I’ve been having problems trying to make a stream with nvarguscamerasrc video feed. To be more specific, the main problem is using compositor.

First, using the “test-multicast” example and this line…

gst_rtsp_media_factory_set_launch (factory, "(nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1 ! omxh264enc preset-level=3 control-rate=2 bitrate=2000000 ! video/x-h264,stream-format=(string)byte-stream  ! rtph264pay name=pay0 audiotestsrc ! audioconvert ! rtpL16pay name=pay1 )");

I’m able to serve a RTSP stream.

Now, i want to add a second video feed, side by side. This seems to work

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 sink_1::height=1080 ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420, width=3840, height=1080' ! nvoverlaysink nvarguscamerasrc sensor_id=0 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvcomp.sink_1 nvarguscamerasrc sensor_id=1 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvcomp.sink_0

I don’t know how to translate this to the test-multicast script and h264 . Any hint that could help me understand and implement this?

Thanks in advance.

Hi,
Please refer to the commands in
RTSP streaming of two CSI cameras by using Gstreamer

You would need to apply this patch and rebuild nvarguscamerasrc:
RTSP streaming of two CSI cameras by using Gstreamer - #6 by DaneLLL

Hello again.

I’ve been reading the posts you provided and that seems to be the solution, but I don’t know where do i have to execute that command to apply the “diff”. Can I apply this patch to the current system gstreamer installation?

Thanks again.

Hi,
The patch is based on r32.4 and if you use later version, may not be able to apply it directly. It is simple so please try to apply it manually.

Hi,

I did it manually,

I’m going to upload the modified files just in case i did something wrong. After the modification i compiled with “make” and replaced “libgstnvarguscamerasrc.so” in "/usr/lib/aarch64-linux-gnu/gstreamer-1.0/
"

gstnvarguscamerasrc.cpp (65.5 KB)
gstnvarguscamerasrc.hpp (7.7 KB)

Also, this is my version

R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t210ref, EABI: aarch64, DATE: Mon Jul 26 19:20:30 UTC 2021

Finally, after these changes, the last working example i had stopped working with this error.

pipeline used on test-multicast that worked before this change.

gst_rtsp_media_factory_set_launch (factory, "(nvarguscamerasrc ! video/x-raw(memory:NVMM), width=3264, height=2464, framerate=21/1 ! omxh264enc preset-level=3 control-rate=2 bitrate=2000000 ! video/x-h264,stream-format=(string)byte-stream  ! rtph264pay name=pay0 audiotestsrc ! audioconvert ! rtpL16pay name=pay1 )");

error:

stream ready at rtsp://127.0.0.1:8554/test
Framerate set to : 21 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
H264: Profile = 66, Level = 40 
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
LSC: LSC surface is not based on full res!
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 3264 H = 2464 
   seconds to Run    = 0 
   Frame Rate = 21.000000 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Failed to configure NvDdkVic Target Surface
nvbuffer_transform Failed

Thanks for your time.

Raul.

Hi,
You may try test-launch. There are steps in Jetson Nano FAQ for reference:
Q: Is there any example of running RTSP streaming?

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