Mixing lossy live sources

daniel at poradnik-webmastera.com daniel at poradnik-webmastera.com
Thu May 17 16:16:51 UTC 2018


W dniu 2018-05-17 17:21, Nicolas Dufresne napisał(a):
> Le jeudi 17 mai 2018 à 12:52 +0100, Tim Müller a écrit :
>> 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.
> 
> I believe you can turn this into a lice source using the following
> construction, let me know if that works for you.
> 
>   rmptsrc do-timestamp=1 ! identity sync=1 ! ...
> 
> You can place the identity elsewhere if needed.
> 
>> 
>> Not sure if rtmpsrc will gracefully handle this case though (drop
>> packets to 'catch up').
>> 
>> Cheers
>>  -Tim
>> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

You can also try using audiorate element to insert extra samples into 
stream where necessary.

Regards,
Daniel


More information about the gstreamer-devel mailing list