<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I have and RTP source that I want to republish using a RTSP server.<br></div>I am using the python code below for it. The problem I have: The pipeline only gets created after the first client connects. But then I have an issue with my RTP source not being ready at the same time.<br></div>What I want: start the pipeline immediately, even if no client is connected (and then reuse it; what should already be the case).<br></div>I do not understand what actually triggers the creation of the pipeline. It seems to be somehow implicitly done via the RTSPMediaFactory?<br><br>------------------------------<br>import gi<br>gi.require_version('Gst', '1.0')<br>gi.require_version('GstRtspServer', '1.0')<br>from gi.repository import Gst, GObject, GstRtspServer<br><br>GObject.threads_init()<br>Gst.init(None)<br><br><br>class RTSP_Server:<br>    def __init__(self):<br>        self.server = GstRtspServer.RTSPServer.new()<br>        self.address = '172.17.0.4'<br>        self.port = '8554'<br>        self.launch_description = '( udpsrc port=6784 caps="application/x-rtp,payload=96,config-interval=1" ! rtph264depay ! rtph264pay name=pay0 pt=96 )'<br>        self.server.set_address(self.address)<br>        self.server.set_service(self.port)<br>        self.server.connect("client-connected",self.client_connected) <br>        self.factory = GstRtspServer.RTSPMediaFactory.new()<br>        self.factory.set_launch(self.launch_description)<br>        self.factory.set_shared(True)<br>        self.factory.construct('/video')<br>        self.factory.set_transport_mode(GstRtspServer.RTSPTransportMode.PLAY)<br>        self.mount_points = self.server.get_mount_points()<br>        self.mount_points.add_factory('/video', self.factory)<br><br>        self.server.attach(None)  <br>        print('Stream ready')<br>        GObject.MainLoop().run()<br><br>    def client_connected(self, arg1, arg2):<br>        print('Client connected')<br><br>server = RTSP_Server()<br>------------------------------<br><br></div>Regards<br><br></div>Peter<br></div>