RTSP Source not working

Please provide complete information as applicable to your setup.

• Hardware Platform (GPU)
• DeepStream Version: 5.1
• TensorRT Version: 7.2.1
• NVIDIA GPU Driver Version (valid for GPU only): 460
• Issue Type( questions)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
i’m trying to run deepstream-app with rtsp stream as input, with config like below image:
a
and set live-source in streammux to 1. But the result is as shown below, seems with rtsp stream as input deepstream-app hangs, even though I can get this rtsp stream using opencv. Looking forward to getting help from everyone. Thank you very much!

You use “GST_DEBUG=rtspsrc:5” to debug the RTSP connection.

Thanks for your reply. After following the instructions I got the result as below, but I don’t know what the error is and how I have to fix it. Looking forward to your help

**PERF: 0.00 (0.00) 0:01:07.876548782 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0

0:01:07.876670393 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 542860 usec
0:01:07.876766873 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.876816686 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.876868712 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 813 on channel 0
0:01:07.876963983 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 542561 usec
0:01:07.877032853 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.877065906 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.877101727 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0
0:01:07.877173402 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 542349 usec
0:01:07.877253725 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.877294396 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.877338131 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 134 on channel 0
0:01:07.877418480 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 542105 usec
0:01:07.962114528 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.962135353 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.962147427 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 312 on channel 0
0:01:07.962190878 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 457321 usec
0:01:07.962585643 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.962599117 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.962613706 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0
0:01:07.962640891 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 456871 usec
0:01:07.962832826 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.962843671 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.962853183 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 694 on channel 0
0:01:07.962872344 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 456637 usec
0:01:07.962887462 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.962897768 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.962909912 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0
0:01:07.962933972 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 456577 usec
0:01:07.962955522 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.962968628 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.962979922 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 972 on channel 0
0:01:07.963000250 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 456510 usec
0:01:07.963087756 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:07.963101042 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:07.963113848 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1338 on channel 0
0:01:07.963142271 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 456369 usec
0:01:08.076233004 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:08.076290516 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:08.076345654 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 296 on channel 0
0:01:08.076449015 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 343072 usec
0:01:08.076730423 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:08.076788555 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:08.076895583 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0
0:01:08.076990836 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 342531 usec
0:01:08.077060974 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:08.077097812 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:08.077193752 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 712 on channel 0
0:01:08.077282705 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 342237 usec
0:01:08.077354347 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:08.077406715 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message
0:01:08.077457792 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:4948:gst_rtspsrc_handle_data:<src_elem0> pushing data of size 1472 on channel 0
0:01:08.077549612 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5139:gst_rtspsrc_loop_interleaved:<src_elem0> doing receive with timeout 19 seconds, 341974 usec
0:01:08.077628245 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5149:gst_rtspsrc_loop_interleaved:<src_elem0> we received a server message
0:01:08.077668699 9039 0x56145ba00680 DEBUG rtspsrc gstrtspsrc.c:5182:gst_rtspsrc_loop_interleaved:<src_elem0> got data message

The RTSP transferring is fine. There is no “hang”. Please use “GST_DEBUG=v4l2videodec:7” to debug the video decoder.

Thanks for your reply. Here is the log when I export GST_DEBUG=v4l2videodec:7:

Debug info: gstnvinferserver_impl.cpp(242): validatePluginConfig (): /GstPipeline:pipeline/GstBin:secondary_gie_bin/GstNvInferServer:secondary_gie_0
WARNING from primary_gie: Configuration file batch-size reset to: 1
Debug info: gstnvinferserver_impl.cpp(242): validatePluginConfig (): /GstPipeline:pipeline/GstBin:primary_gie_bin/GstNvInferServer:primary_gie
0:00:32.665385102 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:555:gst_v4l2_video_dec_open: Opening
0:00:32.666227741 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1728:gst_v4l2_video_dec_sink_getcaps: Returning sink caps video/x-h264, width=(int)1280, height=(int)7
20, framerate=(fraction)10/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, level=(string)3.1, profile=(string)high-4:2:2, interlace-mode=(string)progressive, chroma-forma
t=(string)4:2:2, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8
0:00:32.666295360 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1704:gst_v4l2_video_dec_src_query: Returning src caps video/x-raw, format=(string)NV12, width=(int)[ 1
, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ], pixel-aspect-ratio=(fraction)1/1
0:00:32.666366982 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:637:gst_v4l2_video_dec_start: Starting
0:00:32.666574010 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1728:gst_v4l2_video_dec_sink_getcaps: Returning sink caps video/x-h264, width=(int)1280, height=(int)7
20, framerate=(fraction)10/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, level=(string)3.1, profile=(string)high-4:2:2, interlace-mode=(string)progressive, chroma-forma
t=(string)4:2:2, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8
0:00:32.666674102 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:694:gst_v4l2_video_dec_set_format: Setting format: video/x-h264, stream-format=(string)byte-stream, al
ignment=(string)au, level=(string)3.1, profile=(string)high-4:2:2, width=(int)1280, height=(int)720, framerate=(fraction)10/1, interlace-mode=(string)progressive, chroma-format=(string)4:2:2, bit-depth-lu
ma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true
0:00:32.668155218 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1704:gst_v4l2_video_dec_src_query: Returning src caps video/x-raw, format=(string)NV12, width=(int)[ 1
, 32768 ], height=(int)[ 1, 32768 ], framerate=(fraction)[ 0/1, 2147483647/1 ], pixel-aspect-ratio=(fraction)1/1
0:00:32.668332728 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1728:gst_v4l2_video_dec_sink_getcaps: Returning sink caps video/x-h264, width=(int)1280, height=(int)7
20, framerate=(fraction)10/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, level=(string)3.1, profile=(string)high-4:2:2, interlace-mode=(string)progressive, chroma-forma
t=(string)4:2:2, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8
0:00:32.668756573 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1728:gst_v4l2_video_dec_sink_getcaps: Returning sink caps video/x-h264, width=(int)1280, height=(int)7
20, framerate=(fraction)10/1, stream-format=(string)byte-stream, alignment=(string)au, parsed=(boolean)true, level=(string)3.1, profile=(string)high-4:2:2, interlace-mode=(string)progressive, chroma-forma
t=(string)4:2:2, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8
0:00:32.668831550 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1337:gst_v4l2_video_dec_handle_frame: Handling frame 0
0:00:32.668852632 9535 0x557cdca84e80 DEBUG v4l2videodec gstv4l2videodec.c:1377:gst_v4l2_video_dec_handle_frame: Sending header
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)
**PERF: 0.00 (0.00)

Please upload your deepstream-app config file.

source1_primary_recognition.txt (5.7 KB)

here is my deepstream-app config file

Since my deepstream running server is ubuntu server, no desktop, so I am publishing usb camera from another pc to rtsp stream using GitHub - aler9/rtsp-simple-server: ready-to-use RTSP / RTMP / HLS server and proxy that allows to read, publish and proxy video and audio streams, then deepstream app server will receive this rtsp stream as source. Will that cause problems? I tried vlc and gst-play-1.0 for display, all working fine.