Deepstream-app cannot paly rtsp source

I use deepstream-app to run yolov3 sample. I found it cannot play rtsp source. I confirmed there are rtsp and rtp packets captured by tcpdump tool. But app cannot play rtsp stream. Below is log. please help me.

0:00:05.461404804 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:3016:new_manager_pad: stream 0x7edc01ed80, container 0, added 1, setup 1
0:00:05.461434308 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:3016:new_manager_pad: stream 0x7edc01ea70, container 0, added 0, setup 1
0:00:05.461850123 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2942:copy_sticky_events:<’’:recv_rtp_src_0_41031_96> store sticky event stream-start event: 0x7ec0003040, time 99:99:99.999999999, seq-num 402, GstEventStreamStart, stream-id=(string)b9049c323800fa1dbf0c9c2f5d6dcf0e63b50fc2c5030d1c14e44a893d14e333, flags=(GstStreamFlags)GST_STREAM_FLAG_NONE, group-id=(uint)3;
0:00:05.461943661 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2942:copy_sticky_events:<’’:recv_rtp_src_0_41031_96> store sticky event caps event: 0x7ea4001d00, time 99:99:99.999999999, seq-num 441, GstEventCaps, caps=(GstCaps)“application/x-rtp,\ media=(string)video,\ payload=(int)96,\ clock-rate=(int)90000,\ encoding-name=(string)H264,\ packetization-mode=(string)1,\ sprop-parameter-sets=(string)“Z00AHpY1QWh7TcBAQECA\,aO4xsg\=\=”,\ a-videoinfo=(string)“720\*480\*25\*4096”,\ ssrc=(uint)41031,\ npt-start=(guint64)0,\ play-speed=(double)1,\ play-scale=(double)1”;
0:00:05.462054831 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2942:copy_sticky_events:<’’:recv_rtp_src_0_41031_96> store sticky event segment event: 0x7ec0003120, time 99:99:99.999999999, seq-num 387, GstEventSegment, segment=(GstSegment)“GstSegment, flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1, applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0, offset=(guint64)0, start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0, position=(guint64)0, duration=(guint64)18446744073709551615;”;
0:00:05.462125072 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2719:gst_rtspsrc_handle_src_query: pad source:recv_rtp_src_0_41031_96 received query caps
0:00:05.463361445 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2719:gst_rtspsrc_handle_src_query: pad source:recv_rtp_src_0_41031_96 received query caps
0:00:05.463555144 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.463906670 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2719:gst_rtspsrc_handle_src_query: pad source:recv_rtp_src_0_41031_96 received query scheduling
0:00:05.464526776 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.473326317 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.474017433 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.474753093 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.475488657 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.478221280 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.482072321 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.482868494 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.483044017 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
0:00:05.489945509 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2577:gst_rtspsrc_handle_src_event: pad source:recv_rtp_src_0_41031_96 received event reconfigure
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261
0:00:05.507169736 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2719:gst_rtspsrc_handle_src_query: pad source:recv_rtp_src_0_41031_96 received query seeking
0:00:05.507243305 22907 0x7ec8003370 DEBUG rtspsrc gstrtspsrc.c:2719:gst_rtspsrc_handle_src_query: pad source:recv_rtp_src_0_41031_96 received query duration
**PERF: 0.00 (0.00)
0:00:10.415006549 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:8271:gst_rtspsrc_handle_message: timeout on UDP port
0:00:10.415164024 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd: sending cmd RECONNECT
0:00:10.415298426 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:5585:gst_rtspsrc_loop_send_cmd: cancel previous request LOOP
0:00:10.415339515 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd: connection flush busy LOOP
0:00:10.415374107 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush: set flushing 1
0:00:10.415406236 22907 0x7eb4004280 DEBUG rtspsrc gstrtspsrc.c:4751:gst_rtspsrc_connection_flush: connection flush
0:00:10.415617631 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5337:gst_rtspsrc_loop_udp: got interrupted
0:00:10.415671200 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5636:gst_rtspsrc_loop: pausing task, reason flushing
0:00:10.415709217 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5567:gst_rtspsrc_loop_send_cmd: sending cmd WAIT
0:00:10.415740322 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5572:gst_rtspsrc_loop_send_cmd: ignore, we were reconnecting
0:00:10.415774562 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5593:gst_rtspsrc_loop_send_cmd: connection flush busy LOOP
0:00:10.415860484 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush: set flushing 1
0:00:10.415923237 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread: got command RECONNECT
0:00:10.415959621 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush: set flushing 0
0:00:10.415998854 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:4751:gst_rtspsrc_connection_flush: connection flush
0:00:10.416057639 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5398:gst_rtspsrc_reconnect: doing reconnect
0:00:10.416123944 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:8346:gst_rtspsrc_thread: got command LOOP
0:00:10.416162313 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:4748:gst_rtspsrc_connection_flush: set flushing 0
0:00:10.416201993 22907 0x28296d40 DEBUG rtspsrc gstrtspsrc.c:5253:gst_rtspsrc_loop_udp: doing receive with timeout 109 seconds
**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)

• Hardware Platform (Jetson nx)
• DeepStream Version 5.0

Hi,
Can you try this command with your RTSP stream and send the output if it is not working?

GST_DEBUG=3 gst-launch-1.0 uridecodebin uri=rtspt://170.93.143.139/rtplive/1701519c02510075004d823633235daa ! autovideosink

Hi,
Please try miguel’s suggestion. You may configure

export GST_DEBUG=*FACTORY*:4

to see which elements are picked by urodecodebin and autovideosink.

Setting pipeline to PAUSED …
0:00:00.110039262 15688 0x55794668f0 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/lee/.config:/etc/xdg/xdg-unity:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:a123456789@192.168.0.203:554:/0
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (request) SETUP stream 1
Progress: (open) Opened Stream
Setting pipeline to PLAYING …
New clock: GstSystemClock
Progress: (request) Sending PLAY request
0:00:00.523734642 15688 0x7f7c03a8f0 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:fakesrc0:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.524139257 15688 0x7f7c03a940 FIXME default gstutils.c:3981:gst_pad_create_stream_id_internal:fakesrc1:src Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
Opening in BLOCKING MODE
0:00:02.610742993 15688 0x7f4c002a30 WARN v4l2 gstv4l2object.c:4410:gst_v4l2_object_probe_caps:nvv4l2decoder0:src Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:02.610966581 15688 0x7f4c002a30 WARN v4l2 gstv4l2object.c:2372:gst_v4l2_object_add_interlace_mode:0x7f3807fe40 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261

lee@lee-desktop:/opt/nvidia/deepstream/deepstream-5.0/sources/objectDetector_Yolo$ gst-launch-1.0 uridecodebin uri=“rtsp://admin:a123456789@192.168.0.203:554/0” ! autovideosink
0:00:00.066366544 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “uridecodebin”
0:00:00.067325443 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “autovideosink”
0:00:00.068548508 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “fakesink” named “fake-video-sink”
0:00:00.069039718 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “pipeline”
Setting pipeline to PAUSED …
0:00:00.108708307 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “nvoverlaysink” named “autovideosink0-actual-sink-nvoverlay”
0:00:00.123988556 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “rtspsrc” named “source”
0:00:00.127159629 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtspwms”
0:00:00.128226243 15179 0x559a0fb790 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtspreal”
Pipeline is live and does not need PREROLL …
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:a123456789@192.168.0.203:554:/0
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
0:00:00.482301015 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsrc”
0:00:00.483850614 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsrc”
0:00:00.484632102 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsrc”
Progress: (request) SETUP stream 0
0:00:00.511770866 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “rtpbin” named “manager”
0:00:00.513542742 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpsession”
0:00:00.514666221 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpssrcdemux”
0:00:00.517129792 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpstorage”
0:00:00.517514664 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “funnel”
0:00:00.517784845 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “funnel”
0:00:00.520181438 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsink”
0:00:00.521730782 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “fakesrc”
0:00:00.522874646 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsink”
0:00:00.524481814 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsrc”
0:00:00.525127716 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsrc”
Progress: (request) SETUP stream 1
0:00:00.547697234 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpsession”
0:00:00.548056185 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpssrcdemux”
0:00:00.548220541 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpstorage”
0:00:00.548386912 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “funnel”
0:00:00.548485314 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “funnel”
0:00:00.550983445 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsink”
0:00:00.552031435 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “fakesrc”
0:00:00.552756346 15179 0x559a11ade0 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “udpsink”
Progress: (open) Opened Stream
Setting pipeline to PLAYING …
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
0:00:00.642422598 15179 0x7f8c03aa30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpjitterbuffer”
0:00:00.643165941 15179 0x7f8c03aa30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtpptdemux”
0:00:02.642575136 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “decodebin”
0:00:02.643168940 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element “typefind” named “typefind”
0:00:02.653662691 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “rtph264depay”
0:00:02.656598495 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “h264parse”
0:00:02.658022236 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “capsfilter”
0:00:02.664306172 15179 0x7f70002f70 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element “nvv4l2decoder”
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NVMEDIA: Reading vendor.tegra.display-size : status: 6
NvMMLiteBlockCreate : Block : BlockType = 261

I have found the root cause. When rtsp stream contains autodio stream and video stream, it cannot play successly. When it only contains video stream, it is well. Please check.

Hi,
We have RTSP sources with audio stream and don’t observe the issue. Probably you don’t modify config file correctly. You may refer to the config files in the posts: