Mixing lossy live sources

Tim Müller tim at centricular.com
Thu May 17 11:52:19 UTC 2018


On Thu, 2018-05-17 at 12:28 +0200, Benjamin Le Bozec wrote:

Hi Benjamin,

> I'm mixing two RTMP live sources with the compositor element : 
> rtmpsrc (do-imestamp=true) ==>
>                                                        compositor ==>
> rtmpsink (sync=true)
> rtmpsrc (do-imestamp=true)  ==>
> 
> But the sources are coming from cellphones, through a lossy network
> (the cellular network), and packets are lost from time to time.
> Consequently, the compositor elements tends to freeze, waiting for
> both streams to deliver packets. 
> 
> Is there a way to ensure a continuous streaming, that is for the
> compositor to continue to deliver images even if some (or all)
> sources do not deliver images ?

compositor *should* be able to handle this scenario well. However, it
will do so only if the source elements have identified themselves to be
'live' sources (like rtspsrc/udpsrc). I don't think rtmpsrc does that.

You *might* be able to hack around it by using gst_base_src_set_live()
and setting the "latency" property on compositor to some reasonable
value; or add a pad probe and intercept the latency query from
compositor to the sources.

Not sure if rtmpsrc will gracefully handle this case though (drop
packets to 'catch up').

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com


More information about the gstreamer-devel mailing list