RTSP Server unable to launch the stream


I have been trying to launch rtsp stream using the command

gst-rtsp-launch '( uridecodebin uri=file:/home/nobita/deepstream/deepstream-5.0/samples/streams/sample_720p.mp4 ! videoconvert│··· ! queue ! x264enc tune="zerolatency" byte-stream=true bitrate=10000 ! rtph264pay name=pay0 payload=96 )

Gst-rtsp-launch is a very simple wrapper for creating the server, with source code here - https://github.com/sfalexrog/gst-rtsp-launch/blob/master/src/gst-rtsp-launch.cpp

Although the same command works fine for my laptop, nut gives the following error in jetson nano.

gst-launch-1.0 rtspsrc location=rtsp:// ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! gtksink

Setting pipeline to PAUSED .
Pipeline is live and does not need PREROLL
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading.
Additional debug info:
gstrtspsrc.c(5829): gst_rtspsrc_setup_auth (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
No supported authentication protocol was found
ERROR: pipeline doesn’t want to preroll.
Setting pipeline to PAUSED …
Setting pipeline to READY …
Setting pipeline to NULL …
Freeing pipeline …

What can be done to fix this issue?

Thanks in advance :)

Please refer to
Jetson Nano FAQ
Q: Is there any example of running RTSP streaming?
If the pipeline can be launched through test-launch, it shall also work in gst-rtsp-launch.

You can replace uridecodebin with filesrc ! qtdemux ! h264parse ! nvv4l2decoder for a try.

1 Like

Hey thanks for replying!

But I am getting this error on building test-launch.c

gcc test-launch.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)
test-launch.c: In function main:
test-launch.c:77:3: warning: implicit declaration of function gst_rtsp_media_factory_set_enable_rtcp; did you mean gst_rtsp_media_factory_set_latency? [-Wimplicit-function-declaration]
gst_rtsp_media_factory_set_enable_rtcp (factory, !disable_rtcp); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cc4QmOHi.o: In function main': test-launch.c:(.text+0x154): undefined reference to gst_rtsp_media_factory_set_enable_rtcp’
collect2: error: ld returned 1 exit status

I googled it a bit, but couldn’t find anything useful.

Also, please can you share the complete pipeline with filesrc ! qtdemux ! h264parse ! nvv4l2decoder for launching file to RTSP server.
I am facing issues there as well.

Pardon me, but I am a beginner in GStream and deepstream.

Thanks again :)

You probably miss to install gstreamer packages:

sudo apt-get install libgstrtspserver-1.0 libgstreamer1.0-dev

The command should be like:

./test-launch "filesrc location=sample_1080p_h264.mp4 ! qtdemux ! rtph264pay name=pay0 pt=96 "
1 Like

Although I was getting the same issue even after installing the libraries.

/tmp/ccbSfg5x.o: In function `main':   
test-launch.c:(.text+0x154): undefined reference to `gst_rtsp_media_factory_set_enable_rtcp'    
collect2: error: ld returned 1 exit status 

But gst-rtsp-launch ran successfully with filesrc and this command was able to run the server on Jetson nano

gst-rtsp-launch "(filesrc location=sample_1080p_h264.mp4 ! qtdemux ! rtph264pay name=pay0 pt=96 )"

Thanks for the support :)

1 Like

The problem you have is that u are probably using Gstreamer 14.5 and the test-launch is from a newer version.

you have two options,
check out the 14.1 branch or just comment the line
//gst_rtsp_media_factory_set_enable_rtcp (factory, !disable_rtcp);
in test-launch.c

1 Like