push the stream in appsrc with gst-rtsp-server

Hello everyone,
We want to use RTSP to push the stream, so we installed RTSPserver on TX2 and compiled test-appsrc.c @ https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-appsrc.c, then we execute test-appsrc.

sudo apt-get install libgstrtspserver-1.0 -y
gcc test-appsrc.c -o test-launch $(pkg-config --cflags --libs gstreamer-1.0 gstreamer-rtsp-server-1.0)

But it reports an error when we pull it.

gst-launch-1.0 \
	rtspsrc location=rtsp://nvidia:nvidia@ ! \
	rtph264depay ! \
        h264parse ! \
	omxh264dec ! \
	videoscale ! video/x-raw, width=600, height=400 ! \
	videoconvert ! \

The error is:

Setting pipeline to PAUSED ...

Using winsys: x11 
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://nvidia:nvidia@
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(5670): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Got error response: 503 (Service Unavailable).
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
#0  0x0000007fa6bd1130 in pthread_join (threadid=548195525120, 
#1  0x0000007fa6c87ed0 in ?? () from /lib/aarch64-linux-gnu/libglib-2.0.so.0
#2  0x0000000000000011 in ?? ()
Spinning.  Please run 'gdb gst-launch-1.0 10948' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.

We have been looking for a long time but for the reason.
Please Let us know the appropriate commands to be used.

Not sure how test-appsrc works. Other users can share their experience. We have test-launch and test-mp4 work well. For your reference:

Thank you for your reply.
We have previously verified that test-launch and test-mp4 can indeed work well, but there is a small problem, we use when verifying test-launch

./test-launch "videotestsrc ! omxh265enc ! rtph265pay name=pay0 pt=96"


Open network stream rtsp://<TARGET_IP_ADDRESS>:8554/test via VLC

VLC will not be able to pull stream successfully.
However, on the Target side, execute the following command line

gst-launch-1.0 rtspsrc location=rtsp://nvidia:nvidia@ ! rtph265depay ! h265parse ! omxh265dec  ! videoconvert ! nveglglessink

The video stream can be successfully received.
When we execute the following command line

./test-launch "videotestsrc ! omxh264enc ! rtph264pay name=pay0 pt=96"


Open network stream rtsp://<TARGET_IP_ADDRESS>:8554/test via VLC

It’s also not be able to pull stream. And in Target side

gst-launch-1.0 rtspsrc location=rtsp://nvidia:nvidia@ ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! nveglglessink

It also no working.
We have not found a reason so far.

Hi EthanYYYY,
I just verified it working well on r28.2.1. My VLC player is 3.0.4. Not sure but you probably do not give correct IP.

Hi DaneLLL
I re-verified with your reminder. I found that I firstly ran test-launch, then pulled stream on the target, and finally used VLC, so it no working on VLC.
But run test-launch firstly, then VLC, and finally pulled stream on the target. This is fine. It’s a strange phenomenon.

Hi Ethan,
For h264, please refer to