<div dir="ltr"><div><div><div><div><div><div><div>Heya,<br><br></div>I tried to connect two pipelines from two different factories.<br></div>The "record" factory used fdsink, and the "play" factory used fdsrc. The UNIX socket were created by Python (I tried DGRAM and STREAM).<br><br></div>For now, I'm still struggling.<br></div>Anyway, is this the right way to do ?<br><br></div>How would you proceed to create a proxy server with gst-rtsp-server ?<br><br></div>Thanks,<br></div>Adrien<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-07-25 14:55 GMT+02:00 Adrien Aubourg <span dir="ltr"><<a href="mailto:adrien.aubourg@gmail.com" target="_blank">adrien.aubourg@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>Heya !<br><br></div>In order to do "1-to-N" video streaming, I'm currently using nginx with the rtmp module on a dedicated server.<br></div>But the need to reduce the video delay between the host and the viewer began to arise. The current delay is around 5 seconds, and I'd like it to be under 1 second.<br><br></div>To reduce the delay, I'd like to stream over udp/rtp thanks to rtsp.<br><br></div>I had a look at the examples of gst-rtsp-server. Thanks to them:<br></div>- I succeeded to deliver a video to several clients (test-readme, test-launch and test-mp4)<br></div>- I succeeded to receive a video from OBS [1] (using custom ffmpeg output)<br></div>- I succeeded to record into a file on the server the stream emitted from OBS<br><br></div>Unfortunately, I don't know how to "connect" the "record" pipeline to the "play" pipelines.<br></div>I tried using fdsink/fdsrc, or tcpserversink with localhost, without success.<br><br></div>How would you do such thing; use gst-rtsp-server to receive a stream (RECORD) and dispatch them through clients (PLAY) ?<br><br></div>Here's my base code around which I'm working, nothing fancy though:<br>------------------------------<wbr>--<br>#!/usr/bin/python3<br><br>import sys<br>import gi<br>gi.require_version('Gst', '1.0')<br>gi.require_version('<wbr>GstRtspServer', '1.0')<br>from gi.repository import GObject, Gst, GstRtspServer<br><br>if __name__ == "__main__":<br> GObject.threads_init()<br> loop = GObject.MainLoop()<br> Gst.init(None)<br><br> server = GstRtspServer.RTSPServer()<br> server.set_service('8554')<br><br> factory = GstRtspServer.<wbr>RTSPMediaFactory()<br> factory.set_launch("( decodebin name=depay0 ! fakesink decodebin name=depay1 ! fakesink )")<br> factory.set_shared(True)<br> factory.set_transport_mode(<wbr>GstRtspServer.<wbr>RTSPTransportMode.RECORD)<br><br> server.get_mount_points().add_<wbr>factory("/input", factory)<br><br> server.attach(None)<br> print("stream ready at rtsp://<a href="http://51.254.33.165:8554/input" target="_blank">51.254.33.165:8554/<wbr>input</a>")<br><br> loop.run()<br>------------------------------<wbr>--<div><div><div><div><div><div><br></div><div>Thank you for your help,<br></div><div>Cordially,<br></div><div>Adrien<br></div><div><br>[1] <a href="https://obsproject.com/" target="_blank">https://obsproject.com/</a><br></div></div></div></div></div></div></div>
</blockquote></div><br></div>