How can I use RTSP in command line?

  • Board:
    • Name: NVIDIA Jetson AGX Xavier
    • Type: AGX Xavier
    • Jetpack: UNKNOWN [L4T 32.3.1]
    • GPU-Arch: 7.2
    • Libraries:
      • CUDA: 10.0.326
      • cuDNN: 7.6.3.28-1+cuda10.0
      • TensorRT: 6.0.1.10-1+cuda10.0
      • VisionWorks: 1.6.0.500n
      • OpenCV: 4.1.2 compiled CUDA: YES

Hello.

I want to use RTSP in command line, because of my custom Tensor RT plugin.

gst-launch-1.0 \
{RTSPSRC} \
nvstreammux name=m width=1920 height=1080 batch-size=16 live-source=1 ! \
my_trt_plugin_1 ! \
my_trt_plugin_2 ! \
nvmultistreamtiler columns=4 rows=4 width=1920 height=1080 ! \
nvdsosd ! nvegltransform ! nveglglessink sync=0

In this case, How can I use RTSPSRC for TensorRT Input in command line?
And, How can I use H/W accelerated H264/265 decoder in command line?
Thank you.

Hi,
There are many must-have properties you have to configure in running a deep learning interference usecases. We would suggest you run deepstream-app and modify config file to run RTSP source. You may run the default config file first and then change to RTSP source. The document is in
https://docs.nvidia.com/metropolis/deepstream/dev-guide/index.html

There are reference posts about setting to RTSP sources:
https://devtalk.nvidia.com/default/topic/1058086/deepstream-sdk/how-to-run-rtp-camera-in-deepstream-on-nano/post/5366807/#5366807
https://devtalk.nvidia.com/default/topic/1068443/deepstream-sdk/-getting-segmentation-fault-when-running-gst-dsexample-on-multiple-source/post/5411980/#5411980

Thank you.

I found out in your first link.

So, my command would be like below.

gst-launch-1.0 \
uridecodebin uri={RTSP_ADDR_0} ! nvvideoconvert ! m.sink_0 \
uridecodebin uri={RTSP_ADDR_1} ! nvvideoconvert ! m.sink_1 \
...
uridecodebin uri={RTSP_ADDR_15} ! nvvideoconvert ! m.sink_15 \
nvstreammux name=m width=1920 height=1080 batch-size=16 live-source=1 ! \
my_trt_plugin_1 ! \
my_trt_plugin_2 ! \
nvmultistreamtiler columns=4 rows=4 width=1920 height=1080 ! \
nvdsosd ! nvegltransform ! nveglglessink sync=0

But some warning message occurs.

What is the meaning, and How can I fix it?

Opening in BLOCKING MODE 
0:00:00.323555289 21733   0x7f540045e0 WARN                    v4l2 gstv4l2object.c:4408:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:00.323639645 21733   0x7f540045e0 WARN                    v4l2 gstv4l2object.c:2370:gst_v4l2_object_add_interlace_mode:0x7f380cb280 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:00.430607942 21733   0x7f540045e0 WARN                    v4l2 gstv4l2object.c:4408:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:00.430748749 21733   0x7f540045e0 WARN                    v4l2 gstv4l2object.c:2370:gst_v4l2_object_add_interlace_mode:0x7f380cb280 Failed to determine interlace mode
Creating LL OSD context new
0:00:00.491547065 21733   0x7f540045e0 WARN            v4l2videodec gstv4l2videodec.c:1557:gst_v4l2_video_dec_decide_allocation:<nvv4l2decoder0> Duration invalid, not setting latency
0:00:00.498622854 21733   0x7f540045e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1062:gst_v4l2_buffer_pool_start:<nvv4l2decoder0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:00.646034399 21733   0x7f381ca0a0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1526:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:src> Driver should never set v4l2_buffer.field to ANY
0:00:01.146280946 21733   0x7f540045e0 WARN          v4l2bufferpool gstv4l2bufferpool.c:1482:gst_v4l2_buffer_pool_dqbuf:<nvv4l2decoder0:pool:sink> v4l2 provided buffer that is too big for the memory it was writing into.  v4l2 claims 64 bytes used but memory is only 0B.  This is probably a driver bug.

Hi,
There might be some properties not well configured in nvstreammux and nvinfer. Still suggest you run deepstream-app like:

$ deepstream-app -c source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt

If you have modified the config file and still cannot run it, please attach the config file for reference.

Not recommend run gst-launch-1.0, but other users may have experience to share here.