CCTV RTSP stream connection issue

debug_log.txt (2.3 MB)

• Hardware Platform Jetson Nano
• DeepStream Version: docker image nvcr.io/nvidia/deepstream-l4t:5.0-dp-20.04-base
• JetPack Version (valid for Jetson only): nvidia-jetpack/stable 4.4-b186 arm64
• TensorRT Version: 7.1.0-1+cuda10.2

I have strange issue when I try to plug CCTV camera RTSP stream into pipeline. The essence of issue is the following:
I operate in docker container and execute:

gst-launch-1.0 -v rtspsrc location=*** user-id=*** user-pw=*** protocols=GST_RTSP_LOWER_TRANS_TCP  ! queue ! rtph264depay ! h264parse ! mpegtsmux ! filesink location=lab.mp4

This command, when executed on dummy stream generated by gst-rtsp-server (https://github.com/GStreamer/gst-rtsp-server) works fine, but when turned on GST_DEBUG with CCTV camera stream I can see the following output:

Progress: (open) Opening Stream
Progress: (connect) Connecting to ***
Progress: (open) Retrieving server options
0:00:08.349122081   565   0x55c1156a80 WARN                 rtspsrc gstrtspsrc.c:5978:gst_rtspsrc_try_send:<rtspsrc0> server closed connection
0:00:16.621873379   565   0x55c1156a80 WARN                 rtspsrc gstrtspsrc.c:5978:gst_rtspsrc_try_send:<rtspsrc0> server closed connection
0:00:16.623643536   565   0x55c1156a80 WARN                 rtspsrc gstrtspsrc.c:7548:gst_rtspsrc_open:<rtspsrc0> can't get sdp
0:00:16.625269057   565   0x55c1156a80 WARN                 rtspsrc gstrtspsrc.c:5628:gst_rtspsrc_loop:<rtspsrc0> we are  not connected
Progress: (open) Open failed

(Please refer full logs attached)

What is more:

  • I can read the stream using OpenCV
  • I can save the stream using ffmpeg

I would really appreciate any suggestions that may help me to solve issue.

try this:

gst-launch-1.0 -e rtspsrc location=“rtsp://USER:PASS@IP:RTSPPORT” ! rtph264depay ! h264parse ! mpegtsmux ! filesink location=lab.mp4

always add -e to “end” your mp4 file, otherwise it might be unplayable.

definitely make sure your CCTV camera is set to H264 and not H264, MP4 or MJPEG.

Thanks for reply. You are right regarding -e flag, but this does not solve the main issue with connectivity. I am sure about H264 capabilities of camera (besides I’ve already checked other options as h265 and they also fail).

Thanks for help. The issue is solved now. I discovered with wireshark that the case was in proxy settings.