compositor + buffering

Sebastian Dröge sebastian at centricular.com
Tue Jun 14 06:12:19 UTC 2016


On Mo, 2016-06-13 at 04:08 -0700, mariannasb wrote:
> Hi, I have a case where I want to use the compositor in order to be able to
> mix a live src with a buffered amount of video (which originates from the
> same src).
> The basic idea is like a instant replay when there is fx a goal in a sports
> match.
> So I want to have the live data playing all the time, and to keep fx the
> last 10 seconds saved in a queue. Then if a goal happens I want to show the
> content on the buffer on the same window.
> 
> The following pipeline should illustrate a bit the idea:
> 
> gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,width=500,height=500 !
> timeoverlay ! tee name=t ! queue ! compositor name=mix sink_1::xpos=100 !
> videoconvert ! ximagesink async=0 t. ! queue ! queue max-size-buffers=0
> max-size-bytes=0 max-size-time=10000000000 min-threshold-time=10000000000 !
> mix.
> 
> It almost works as expected.
> The problem is that the is a 10 seconds delay before it all starts.
> [...]
> So from what I can understand the problem is that the compositor queries the
> pipeline for the latency and the buffer (queue) is reporting a latency of 10
> seconds, which makes it wait 10 seconds to see if it will receive a frame on
> sink_1.
> 
> Is there any way to avoid this and just make it play without delays?

That's exactly the problem here and also expected, yes. Try to not use
min-threshold* on the queue but instead apply a pad offset of 10
seconds to the source pad that should be delayed (and make sure you
have a big enough queue there).

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160614/1c311f4a/attachment.sig>


More information about the gstreamer-devel mailing list