<div dir="ltr">Ok guys, thanks for the heads-up !<div><br></div><div>I managed to have something working using the "identity sync=1" trick, and adding a latency to the compositor. Here is the pipeline :</div><div><br></div><div>

<div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">gst-launch-1.0 -e rtmpsrc location="rtmp://..." ! identity sync=1 ! </font></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace,monospace">queue 

<span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">max-size-time=2000000000</span>

! decodebin ! videorate ! </span><span style="font-family:monospace,monospace">'video/x-raw,format=(string)I420,framerate=30/1, width=1280, height=720' ! mix.sink_0 \</span></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">rtmpsrc location="rtmp://..." ! identity sync=1 ! \</font></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">queue 

<span style="color:rgb(34,34,34);font-family:monospace,monospace;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">max-size-time=2000000000</span>

! decodebin ! videoscale ! videorate ! </font><span style="font-family:monospace,monospace">'video/x-raw,format=(string)I420,framerate=30/1, width=320, height=240' ! mix.sink_1 \</span></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">compositor name=mix latency=1000000000 ! \</font></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><font face="monospace, monospace">videoconvert ! </font><span style="font-family:monospace,monospace">x264enc threads=0 bitrate=2000 tune=zerolatency key-int-max=60 speed-preset=veryfast ! \</span></div><div style="color:rgb(34,34,34);font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><span style="font-family:monospace,monospace">flvmux streamable=true name=mux ! </span><span style="font-family:monospace,monospace">rtmpsink sync=1 location="rtmp://... live=1"</span></div>

<br></div><div>When one of the inputs starts to lag, the compositor continues to produce images. Amazing :)</div><div><br></div><div>The only thing i'm not confortable with is the arbitrary latency set to 1sec.</div><div><br></div><div>I also managed to mix the audio, but i spare you the pipeline ...</div><div><br></div><div>Thank you,</div><div><br></div><div>Ben</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-17 17:21 GMT+02:00 Nicolas Dufresne <span dir="ltr"><<a href="mailto:nicolas@ndufresne.ca" target="_blank">nicolas@ndufresne.ca</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Le jeudi 17 mai 2018 à 12:52 +0100, Tim Müller a écrit :<br>
> On Thu, 2018-05-17 at 12:28 +0200, Benjamin Le Bozec wrote:<br>
> <br>
> Hi Benjamin,<br>
> <br>
> > I'm mixing two RTMP live sources with the compositor element : <br>
> > rtmpsrc (do-imestamp=true) ==><br>
> >                                                        compositor<br>
> > ==><br>
> > rtmpsink (sync=true)<br>
> > rtmpsrc (do-imestamp=true)  ==><br>
> > <br>
> > But the sources are coming from cellphones, through a lossy network<br>
> > (the cellular network), and packets are lost from time to time.<br>
> > Consequently, the compositor elements tends to freeze, waiting for<br>
> > both streams to deliver packets. <br>
> > <br>
> > Is there a way to ensure a continuous streaming, that is for the<br>
> > compositor to continue to deliver images even if some (or all)<br>
> > sources do not deliver images ?<br>
> <br>
> compositor *should* be able to handle this scenario well. However, it<br>
> will do so only if the source elements have identified themselves to<br>
> be<br>
> 'live' sources (like rtspsrc/udpsrc). I don't think rtmpsrc does<br>
> that.<br>
> <br>
> You *might* be able to hack around it by using<br>
> gst_base_src_set_live()<br>
> and setting the "latency" property on compositor to some reasonable<br>
> value; or add a pad probe and intercept the latency query from<br>
> compositor to the sources.<br>
<br>
</div></div>I believe you can turn this into a lice source using the following<br>
construction, let me know if that works for you.<br>
<br>
  rmptsrc do-timestamp=1 ! identity sync=1 ! ...<br>
<br>
You can place the identity elsewhere if needed.<br>
<div class="HOEnZb"><div class="h5"><br>
> <br>
> Not sure if rtmpsrc will gracefully handle this case though (drop<br>
> packets to 'catch up').<br>
> <br>
> Cheers<br>
>  -Tim<br>
> </div></div><br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div><img src="https://www.google.com/a/vodalys.com/images/logo.gif"></div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><strong><b><font size="2" color="gray" face="Arial Black"><span style="font-size:11pt;font-family:'Arial Black';color:gray">Benjamin Le Bozec</span></font></b></strong><font size="1" color="#7d8c79" face="Verdana"><span style="font-size:7.5pt;font-family:Verdana;color:rgb(125,140,121)"><br></span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font size="1" color="#7d8c79" face="Verdana"><span style="font-size:7.5pt;font-family:Verdana;color:rgb(125,140,121)">Tél. +33 (0)2 99 63 42 36<br></span></font><a href="http://www.vodalys.com/" style="color:rgb(42,93,176)" target="_blank"><b><font size="1" color="#ff8000" face="Verdana"><span style="font-size:7.5pt;font-family:Verdana;color:rgb(255,128,0);font-weight:bold">http://www.vodalys.com</span></font></b></a></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font size="3" face="Times New Roman"><span style="font-size:12pt"> </span></font></p></span></div></div>
</div>