how to generate rtsp stream with gstreamer in TX2

In tx2, I can run the below command to decode usb video.

gst-launch-1.0 v4l2src device="/dev/video0" ! video/x-raw,width=640,height=480 ! autovideosink

When I use the following command to check the available sink in gstreamer, I find that there is no rtspsink. Therefore, I can not generate rtsp stream with gstreamer commond.

gst-inspect-1.0 | grep sink

Here is my question. How can I encode usb video and generate the corresponding rtsp stream ? I notice that there is a gst-rtsp-server in gitlab. Is it help ?
Thanks in advance !

You may refer to
https://devtalk.nvidia.com/default/topic/1018689/jetson-tx2/vlc-playing-gstreamer-flow/post/5187270/#5187270
https://devtalk.nvidia.com/default/topic/1014789/jetson-tx1/-the-cpu-usage-cannot-down-use-cuda-decode-/post/5188538/#5188538
https://devtalk.nvidia.com/default/topic/1043770/jetson-tx2/problems-minimizing-latency-and-maximizing-quality-for-rtsp-and-mpeg-ts-/post/5295828/#5295828

Hi @kealennieh,

GStreamer doesn’t offer a “rtspsink” element, that can be used out of the box like the rtspsrc element for example. You can use the following example app they provide to generate a rtps stream and send it over the network:

https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c

An example based on your above GStreamer pipeline will be as follows:

./test-launch "v4l2src device="/dev/video0" ! video/x-raw,width=640,height=480 ! omxh265enc ! rtph265pay name=pay0 pt=96"

You may find interesting the following link about our GStreamer RTSPsink solution:

https://developer.ridgerun.com/wiki/index.php?title=GstRtspSink

As a quick overview, RTSP Sink is a GStreamer element which permits high performance streaming to multiple computers using the RTSP / RTP protocols. The GstRtspSink element leverages previous logic from GStreamer’s RTSP server with extensions to create a GStreamer sink element providing benefits like greater flexibility, easy application integration and quick gst-launch prototyping.

I hope the above information helps you.

Best regards,
-Daniel