How to feed gts-rtsp-server with an udpsrc

Hi

I want to feed the gts-rtsp-server https://github.com/GStreamer/gst-rtsp-server with an udpsrc and sadly I am not able to build the pipeline.

Client (python/opencv):

appsrc ! videoconvert ! omxh264enc ! h264parse ! rtph264pay config-interval=1 ! udpsink host=localhost port=5000

Receiver (works)

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp,encoding-name=H264,payload=96 ! rtph264depay ! h264parse ! queue ! avdec_h264 ! xvimagesink sync=false async=false -e

Server:

./test-launch "udpsrc port=5000 ! ..? "

Another question: How to integrate the gst-rtsp-server element directly into python? (without the awesome solution from RidgeRun ;) )
Best regards Martin

Hi,
It is more like an advanced function and suggest you go to
http://gstreamer-devel.966125.n4.nabble.com/

You may construct it with software encoder x264enc first and once you get a working pipeline, it should work just fine to replace it with hardware encoder nvv4l2h264enc(or omxh264enc).

The following posts are RTSP, UDP cases:
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828
https://devtalk.nvidia.com/default/topic/1027423/jetson-tx2/gstreamer-issue-on-tx2/post/5225972/#5225972
These are not exactly fit your usecase, but probably can offer certain help in constructing your usecase.

Hi DaneLLL,

this works so far

Client (python/opencv):

'appsrc ! videoconvert ! omxh264enc ! h264parse ! rtph264pay name=pay0 config-interval=1 pt=96 ! udpsink host=localhost port=5000 sync=false async=false '

Server

./test-launch "( udpsrc name=pay0 pt=96 port=5000 caps=\"application/x-rtp, media=video, encoding-name=H264, payload=96 \" )"

But the buffer/delay on the gts-rtsp-server is getting bigger and bigger.

How can i use sync=false async=false or use the latest keyframe on the gts-rtsp-server side?

Best regards Martin

Hi,
The server/client pipelines look not right. If your source is appsrc, you may check test-appsrc:
https://devtalk.nvidia.com/default/topic/1049924/jetson-agx-xavier/using-rtsp-encode-with-h264-and-stream-images-at-device-memory-on-xavier-/post/5331159/#5331159

In the test code, it generates appsrc source by callng:

gst_buffer_memset (buffer, 0, ++ctx->white, size);

You can customize it into your usecase.