How to make a streaming relay using gstreamer?

4k views Asked by At

I would like to make of some sort of a streaming server. I would like it to receive RTSP streams over the net from live streams (e.g. webcam, ipcam, etc.) then broadcast that same stream on my local network using a different URL. I know gstreamer can do it quite well but I don't know how. I'm quite confused with the way the documentation is written. Can somebody help me?

3

There are 3 answers

0
Michał Wróbel On

If you would like to retransmit the video streams using RTSP as well, you can use GStreamer RTSP Server. There is a lot of examples on the Internet how to use it. The best source of the examples is the gst-rtsp-server's examples directory:

http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/tree/examples

As you want to retransmit existing RTSP streams, you'll need to use the rtspsrc element for reception of the remote streams.

0
Stephen Thomas-Dorin On

I think you are looking for something like this: https://github.com/jayridge/rtsprelay. It configures one rtsp server to receive clients on two urls with a record link and a play link.

0
Marc Leeman On

This example uses a dynamic form:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1454

rtsp://server/path?uri=encoded-URI

you HTML encode the destination in URI form and add a path where it should register this camera to. The first time you connect; it will take some time, after that; the sessions are re-used.