Gst_rtsp_server error and VLC not playing stream

Hi,

I cloned the gst_rtsp_server at GStreamer / gst-rtsp-server · GitLab onto my TX2 and am trying to stream from an nvarguscamerasrc.

However, when we run this using the test-launch:
./test-launch "nvarguscamerasrc ! ‘video/x-raw(memory:NVMM),width=(int)320,height=(int)240,format=(string)NV12,framerate=(fraction)15/1’ ! omxh264enc name=omxh264enc control-rate=1 ! video/x-h264,profile=baseline,stream-format=(string)byte-stream ! h264parse ! rtph264pay name=pay0"

we get the output that the stream is ready at rtsp://127.0.0.1:8554/test

However, when we try to access the stream at rtsp://(TX2 IP):8554/test, we get this on the TX2 side:
(test-launch:7038): GStreamer- **CRITICAL** **: 22:21:01.773: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

and this on the client machine side:
gst-launch-1.0 rtspsrc location=rtsp://10.137.88.33:8554/test latency=100 ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! autovideosink

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayCocoa\)\ gldisplaycocoa0";
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://10.137.88.33:8554/test
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not read from resource.
Additional debug info:
gstrtspsrc.c(6320): gst_rtsp_src_receive_response (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Could not receive message. (Timeout while waiting for server response)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...`

The bizarre thing is a few months ago, this pipeline was working (or somehow I was able to get the RTSP stream on my host machine using the same process). Does anyone have any advice on what could be going on?

GStreamer core version (TX2): 1.14.5
GStreamer core version (client machine): 1.16.2
rtsp-server repo checkout: 1.14

Thank you so much!

Hi,
You may try nvv4l2h264enc. Please refer to

You may replace videotestsrc with nvarguscamerasrc and try.

Hi, when we run this pipeline with nvarguscamerasrc, we get this result:

./test-launch 'nvarguscamerasrc ! nvvidconv ! nvv4l2h264enc ! h264parse ! queue ! rtph264pay name=pay0 pt=96 audiotestsrc ! voaacenc ! queue ! rtpmp4apay pt=97 name=pay1'

stream ready at rtsp://127.0.0.1:8554/test

Opening in BLOCKING MODE 

NvMMLiteOpen : Block : BlockType = 4 

===== NVMEDIA: NVENC =====

NvMMLiteBlockCreate : Block : BlockType = 4 

GST_ARGUS: Creating output stream

CONSUMER: Waiting until producer is connected...

GST_ARGUS: Available Sensor modes :

GST_ARGUS: 3840 x 2160 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 44.400002; Exposure Range min 44000, max 478696000;


 

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 177.000000; Exposure Range min 58000, max 184611000;


 

GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 30.000000; Exposure Range min 864000, max 20480000;


 

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 177.000000; Exposure Range min 859000, max 15649000;


 

GST_ARGUS: Running with following settings:

   Camera index = 0 

   Camera mode  = 3 

   Output Stream W = 1920 H = 1080 

   seconds to Run    = 0 

   Frame Rate = 59.999999 

GST_ARGUS: PowerService: requested_clock_Hz=27216000

GST_ARGUS: Setup Complete, Starting captures for 0 seconds

GST_ARGUS: Starting repeat capture requests.

CONSUMER: Producer has connected; continuing.

H264: Profile = 66, Level = 0 


 

(test-launch:8269): GStreamer-CRITICAL **: 11:53:03.329: gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed


 

(test-launch:8269): GStreamer-CRITICAL **: 11:53:03.329: gst_structure_set: assertion 'IS_MUTABLE (structure) || field == NULL' failed

And when we run this pipeline on the client machine, we only get a gray screen (when we run VLC, we don’t get anything at all - no errors, but also no video popping up).

gst-launch-1.0 rtspsrc location=rtsp://10.137.88.33:8554/test latency=100 ! queue ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video/x-raw,width=640,height=480 ! autovideosink

Do you have any advice?

Thank you so much!

Hi, thanks again for your help! I have an update:

We actually got the RTSP stream to work using gstreamer and not the gst-rtsp-server.

On the camera end:
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1' ! omxh264enc control-rate=2 bitrate=4000000 ! video/x-h264, stream-format=byte-stream ! rtph264pay mtu=1400 ! udpsink host=$CLIENT_IP port=8554 sync=false async=false

On the client end:
gst-launch-1.0 udpsrc port=8554 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! autovideosink sync=false async=false -e

It’s now streaming with very little latency and looks great on the client end.

Thanks again!