Issues when I stream RTSP

Please provide complete information as applicable to your setup.

**• Hardware Platform: Nvidia Jetson nano B01
**• DeepStream Version 6.0

**• Issue Type:
I have issues streaming video feeds from esp32-CAM via RTSP to Jetson nano via deepstream

**• How to reproduce the issue ?
create an RTSP stream on esp32-cam with output(rstp://42.10.0.62:8554/mjpeg/1) connect this to jetson nano via wifi and run deepstream test3 to output a video stream

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

deepstream test3
Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source/GstUDPSrc:udpsrc0:
streaming stopped, reason not-negotiated (-4)
Exiting app

Can you view the rtsp video rstp://42.10.0.62:8554/mjpeg/1 through vlc
and where you run the app? from remote terminal or from desktop?

Yes, I can, using vlc on my phone

How about change nveglglessink to fakesink?

Forgive my ignorance but how do I do this on the script, so I don’t break anything

-sink = gst_element_factory_make (“nveglglessink”, “nvvideo-renderer”);
+sink = gst_element_factory_make (“fakesink”, “nvvideo-renderer”);
and remove nvegltransform related code for Jetson

if not encoder:
sys.stderr.write(" Unable to create encoder")
encoder.set_property(“bitrate”, bitrate)
if is_aarch64():
encoder.set_property(“preset-level”, 1)
encoder.set_property(“insert-sps-pps”, 1)
encoder.set_property(“bufapi-version”, 1)

# Make the payload-encode video into RTP packets
if codec == "H264":
    rtppay = Gst.ElementFactory.make("rtph264pay", "rtppay")
    print("Creating H264 rtppay")
elif codec == "H265":
    rtppay = Gst.ElementFactory.make("rtph265pay", "rtppay")
    print("Creating H265 rtppay")
if not rtppay:
    sys.stderr.write(" Unable to create rtppay")

# Make the UDP sink
updsink_port_num = 5400
sink = Gst.ElementFactory.make("udpsink", "udpsink")
if not sink:
    sys.stderr.write(" Unable to create udpsink")

sink.set_property("host", "224.224.255.255")
sink.set_property("port", updsink_port_num)
sink.set_property("async", False)
sink.set_property("sync", 1)

Where you referring to “make the UDP sink” of deepstream_test1_rtsp_in_rtsp_out.py because i could not find “nvegltransform” related codes.

This is the exact error it brings out:

gstname= video/x-raw
features= <Gst.CapsFeatures object at 0x7f7ca9f3a8 (GstCapsFeatures at 0x7ed8074340)>
Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstBin:source-bin-00/GstURIDecodeBin:uri-decode-bin/GstRTSPSrc:source/GstUDPSrc:udpsrc1:
streaming stopped, reason not-negotiated (-4)

Hi @bvgohmslf ,
from the source name, seems it’s mjpeg stream instead of H264/H265 RTSP stream DS sample support by default.

could you try below comamnd
$ gst-launch-1.0 -e rtspsrc location=rstp://42.10.0.62:8554/mjpeg/1 ! queue ! multipartdemux ! nvv4l2decoder mjpeg=1! fakesink

gst-launch-1.0 -e rtspsrc location=rstp://42.10.0.114:8554/mjpeg/1 ! queue ! multipartdemux ! nvv4l2decoder mjpeg=1! fakesink
WARNING: erroneous pipeline: could not set property “mjpeg” in element “nvv4l2decoder0” to “1!”

Sorry for the late.
Did this still be an issue?

yes, it did

Can you check the stream codec format? you can get it by enable debug log, add option in gst launch command, --gst-debug=rtspsrc:5

okay will try that

Do you still need support for this topic? Or should we close it? Thanks.

Yes, i still need support

Hi @bvgohmslf , Could you make sure what’s the stream encode format from your camera? Could you share a rtsp uri to us?
Also, you can try to find a pipeline that works with gst-launch-1.0.

moon@moon-desktop:~$ GST_DEBUG=rtspsrc:5 gst-launch-1.0 -e rtspsrc location=rstp://10.42.10.114:8554/mjpeg/1 ! queue ! multipartdemux ! nvv4l2decoder mjpeg=1! fakesink
0:00:00.047968356 12328 0x559f881320 DEBUG rtspsrc gstrtspsrc.c:8617:gst_rtspsrc_uri_set_uri: parsing URI
0:00:00.048054444 12328 0x559f881320 ERROR rtspsrc gstrtspsrc.c:8671:gst_rtspsrc_uri_set_uri: Not a valid RTSP url ‘rstp://10.42.10.114:8554/mjpeg/1’ (-2)
WARNING: erroneous pipeline: could not set property “mjpeg” in element “nvv4l2decoder0” to “1!”

@Amycao

===>gstrtspsrc.c:8671:gst_rtspsrc_uri_set_uri: Not a valid RTSP url
From the log you attached, this is not a RTSP url for Gstreamer. VLC is not use Gstreamer to play rtsp, so it can play in your phone. You can open a topic to Gstreamer forum or just give us an public url for us to debug it.

How do I create a public URL link for esp32 cam

You can ask the vendor of esp32 camera and make sure the format of rtsp stream. Gstreamer rtspsrc strictly follows RFC 2326 protocal. If this camera don’t follow this protocal, we cannot support it.
https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.html?gi-language=c