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)
./test-appsrc

But it reports an error when we pull it.

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

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@192.168.1.155: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(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 ...
Caught SIGSEGV
#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.
Thanks
Ethan

Not sure how test-appsrc works. Other users can share their experience. We have test-launch and test-mp4 work well. For your reference:
[url]https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/#5187270[/url]
[url]https://devtalk.nvidia.com/default/topic/1014789/jetson-tx1/-the-cpu-usage-cannot-down-use-cuda-decode-/post/5188538/#5188538[/url]

Hi,DaneLLL
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
Target

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

Host

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@192.168.1.155:8554/test ! rtph265depay ! h265parse ! omxh265dec  ! videoconvert ! nveglglessink

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

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

Host

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@192.168.1.155:8554/test ! 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
[url]https://devtalk.nvidia.com/default/topic/1028201/jetson-tx2/send-tx2-encoded-stream-over-wifi/post/5275347/#5275347[/url]
[url]omxh264enc with gst-rtsp-server-1.8.3.tar.xz - Jetson TX2 - NVIDIA Developer Forums