<div dir="ltr">Hello everybody,<br><br>I am experimenting with GStreamer now for a few weeks<br>and after putting together some pipeline in the gst-launch-1.0 CLI<br>I started using python a few days ago.<br><br>Made good progress but I am stuck now with `srtsrc`.<br><br>I have a CLI-command inside a docker container which works as expected:<br><br><div><div style="line-height:18px"><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(30,30,30)">gst-launch-1.0 -v  srtsrc uri="srt://:2088" \</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(30,30,30)">! tsparse ! tsdemux ! h264parse ! avdec_h264 ! \</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(30,30,30)">queue ! x264enc byte-stream=true ! h264parse config-interval=-1 ! \</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(30,30,30)">queue ! matroskamux ! queue leaky=2 ! \</div><div style="color:rgb(212,212,212);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap;background-color:rgb(30,30,30)">tcpserversink port=7001 host=0.0.0.0 recover-policy=keyframe</div><br></div></div><div style="line-height:18px">I feed this with FFMPEG outside of the container on port 2088 and play it with `<span style="color:rgb(206,145,120);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;font-size:12px;white-space:pre-wrap">ffplay tcp://<a href="http://127.0.0.1:7001/" target="_blank">127.0.0.1:7001</a></span>` without any problems!<br><br>But ... when I rebuild this CLI-command with python (creating elements and linking them)<br><br>'srtsrc0'<br>srtsrc0->tsparse1<br>'tsparse1'<br>tsparse1->tsdemux2<br>'tsdemux2'<br>tsdemux2->h264parse3<br>'h264parse3'<br>h264parse3->avdec_h2644<br>'avdec_h2644'<br>avdec_h2644->queue5<br>'queue5'<br>queue5->x264enc6<br>'x264enc6'<br>x264enc6->h264parse7<br>'h264parse7'<br>h264parse7->queue8<br>'queue8'<br>queue8->matroskamux9<br>'matroskamux9'<br>matroskamux9->queue10<br>'queue10'<br>queue10->tcpserversink11</div><div style="line-height:18px"><br></div><div style="line-height:18px"><u>Here the diagram:</u><br><br><div><img src="cid:ii_k6ryu37m0" alt="srtPipeline.png" width="542" height="65" class="gmail-CToWUd"><br></div><div>Bus Messages (reduced):<br><br>Received message from -> tcpserversink11<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> queue10<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> matroskamux9<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> queue8<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> h264parse7<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> x264enc6<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> queue5<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> avdec_h2644<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> h264parse3<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsdemux2<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsparse1<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> srtsrc0<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> pipeline0<br>state changed: (oldstate=<enum GST_STATE_NULL of type Gst.State>, newstate=<enum GST_STATE_READY of type Gst.State>, pending=<enum GST_STATE_PLAYING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_CREATE of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bdcd0 (GstQueue at 0x2bae6f0)>)<br>Received message from -> queue10<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_ENTER of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bdcd0 (GstQueue at 0x2bae6f0)>)<br>Received message from -> matroskamux9<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_CREATE of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bd640 (GstQueue at 0x2bae3f0)>)<br>Received message from -> queue8<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_ENTER of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bd640 (GstQueue at 0x2bae3f0)>)<br>Received message from -> h264parse7<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> x264enc6<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_CREATE of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bd0a0 (GstQueue at 0x2bae0f0)>)<br>Received message from -> queue5<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_ENTER of type Gst.StreamStatusType>, owner=<__gi__.GstQueue object at 0x7f0e162bd0a0 (GstQueue at 0x2bae0f0)>)<br>Received message from -> avdec_h2644<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> h264parse3<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsdemux2<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsparse1<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_CREATE of type Gst.StreamStatusType>, owner=<__gi__.GstSRTSrc object at 0x7f0e162bb870 (GstSRTSrc at 0x2aca1b0)>)<br>Received message from -> srtsrc0<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> pipeline0<br>state changed: (oldstate=<enum GST_STATE_READY of type Gst.State>, newstate=<enum GST_STATE_PAUSED of type Gst.State>, pending=<enum GST_STATE_PLAYING of type Gst.State>)<br>Received message from -> src<br>stream status: (type=<enum GST_STREAM_STATUS_TYPE_ENTER of type Gst.StreamStatusType>, owner=<__gi__.GstSRTSrc object at 0x7f0e162bb870 (GstSRTSrc at 0x2aca1b0)>)<br>Received message from -> pipeline0<br>Bus message: 18446744073709551615: <flags GST_MESSAGE_NEW_CLOCK of type Gst.MessageType><br><Gst.Message object at 0x7f0e16488590 (GstMessage at 0x2b9db40)><br>Received message from -> queue10<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> matroskamux9<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> queue8<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> h264parse7<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> x264enc6<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> queue5<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> avdec_h2644<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> h264parse3<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsdemux2<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> tsparse1<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br>Received message from -> srtsrc0<br>state changed: (oldstate=<enum GST_STATE_PAUSED of type Gst.State>, newstate=<enum GST_STATE_PLAYING of type Gst.State>, pending=<enum GST_STATE_VOID_PENDING of type Gst.State>)<br><br>As soon as I try to connect to `srtsrc` with FFMPEG<br>`ffmpeg  -re     -f lavfi     -i "testsrc=size=1920x1080:rate=25"     -f lavfi     -i "sine=frequency=800:sample_rate=48000"     -preset:v superfast     -pix_fmt yuv420p     -map 0:v     -map 1:a     -c:v libx264 -tune zerolatency -profile:v high -preset veryfast  -g 30     -keyint_min 30 -b:v 2000k     -c:a aac -ar 48000 -ac 2 -max_muxing_queue_size 1024 -f mpegts "srt://:2088"` (which works with the CLI-command above like a charm!!!)<br><br>the following is sent to the pipeline-bus:<br><br>Received message from -> tsparse1<br>Element message: sdt, section=(GstMpegtsSection)NULL;<br>Received message from -> tsparse1<br>Element message: pat, section=(GstMpegtsSection)NULL;<br>Received message from -> tsparse1<br>Element message: pmt, section=(GstMpegtsSection)NULL;<br>Received message from -> tsdemux2<br>Element message: pat, section=(GstMpegtsSection)NULL;<br>Received message from -> tsdemux2<br>Bus message: 18446744073709551615: <flags GST_MESSAGE_WARNING | GST_MESSAGE_EXTENDED | GST_MESSAGE_STREAM_COLLECTION of type Gst.MessageType><br><Gst.Message object at 0x7f0e16488590 (GstMessage at 0x7f0df0002b40)><br>Received message from -> tsdemux2<br>Element message: pmt, section=(GstMpegtsSection)NULL;<br>Received message from -> srtsrc0<br>Error: gst-stream-error-quark: Internal data stream error. (1): gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstSRTSrc:srtsrc0:<br>streaming stopped, reason not-linked (-1)</div><div><br></div><div>and the python-script is exited.<br><br>As I have already done some CLI-> python examples, I am quite sure that the pipeline itself is rebuilt correct, but I am still new so I would appreciate it very much if you could help me?<br><br><br>Thank you in advance<div class="gmail-yj6qo"></div><div class="gmail-adL"><br></div></div></div></div>