<div dir="ltr"><div>Sorry for my bad english!<br><br></div><div>I'm new to Gstreamer and Python. I'm trying to compile a simple python file like this and I get this error: ImportError: cannot import name GstRtspServer<br></div><div>Can someone help me?<br></div><div>Thanks a lot<br></div><br><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:"DejaVu Sans Mono""><span style="color:rgb(0,0,128);font-weight:bold">import </span>sys<br><span style="color:rgb(0,0,128);font-weight:bold">import </span>gi<br>gi.require_version(<span style="color:rgb(0,128,0);font-weight:bold">'Gst'</span>, <span style="color:rgb(0,128,0);font-weight:bold">'1.0'</span>)<br><span style="color:rgb(0,0,128);font-weight:bold">from </span>gi.repository <span style="color:rgb(0,0,128);font-weight:bold">import </span>Gst, GObject, GstRtspServer<br><br><span style="color:rgb(0,0,128);font-weight:bold">if </span>__name__ == <span style="color:rgb(0,128,0);font-weight:bold">"__main__"</span>:<br>    GObject.threads_init()<br>    loop = GObject.MainLoop()<br>    Gst.init(<span style="color:rgb(0,0,128)">None</span>)<br><br>    server = GstRtspServer.RTSPServer()<br>    server.set_service(<span style="color:rgb(0,128,0);font-weight:bold">'554'</span>)<br><br>    factory = GstRtspServer.RTSPMediaFactory()<br>    factory.set_launch(<span style="color:rgb(0,128,0);font-weight:bold">"( rpicamsrc name=src bitrate=0 quantisation-parameter=24 intra-refresh-type=cyclic metering-mode=matrix annotation-mode=12 preview=false ! video/x-h264,profile=baseline,width=640,height=480,framerate=30/1 ! h264parse ! rtph264pay pt=96 name=pay0 )"</span>)<br>    factory.set_shared(<span style="color:rgb(0,0,128)">True</span>)<br><br>    server.get_mount_points().add_factory(<span style="color:rgb(0,128,0);font-weight:bold">"/video"</span>, factory)<br><br>    server.attach(<span style="color:rgb(0,0,128)">None</span>)<br>    <span style="color:rgb(0,0,128);font-weight:bold">print</span>(<span style="color:rgb(0,128,0);font-weight:bold">"stream ready at rtsp://paitu:554/video"</span>)<br><br>    loop.run()</pre></div>