<div dir="ltr">Nicolas,<div><br></div><div>you are of course right!<br>I was not aware of the "sometimes"-pad mechanism and had to do this in the demuxer and not on the Srtsrc side, Thank you!<br><br><a href="https://github.com/gkralik/python-gst-tutorial/blob/3734fd35b04e458acddeb2c45fe701b72f7c0b27/basic-tutorial-3.py#L89">https://github.com/gkralik/python-gst-tutorial/blob/3734fd35b04e458acddeb2c45fe701b72f7c0b27/basic-tutorial-3.py#L89</a><br><br>did the trick</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Di., 18. Feb. 2020 um 23:47 Uhr schrieb Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 18 févr. 2020 10 h 45, Michael <<a href="mailto:michael.riha%2BgstreamerMailingList@gmail.com" target="_blank">michael.riha+gstreamerMailingList@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><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/" rel="noreferrer" 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"><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></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Not-linked is a precise error in GStreamer. Did you forgot to track pad-added signal on tsdemux ? Denuxer have sometimes pads, so they need runtime linking.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="line-height:18px"><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></div><div></div><div><br></div></div></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>