Do not dropping any video frame (if frame is late) in "playbin" with living streaming

Tim Müller tim at centricular.com
Sat Jan 18 06:32:54 PST 2014


On Sat, 2014-01-18 at 14:42 +0800, jojo wrote:

Hi,

> My gstreamer prebuilt version is :
> "gstreamer-1.0-android-arm-1.2.0-release"
> 
> I launch gstreamer as :
> 
> "appsrc is-live=true do-timestamp=true" -> playbin ->
> GST_VIDEO_OVERLAY
> 
> and push data from another thread as :
> 
> gst_app_src_push_buffer()
> 
> BTW, my living stream just include video as h264
> 
> I want to play video without dropping any frame in "playbin" just
> because of the frame is late :(
> 
>   Could anyone give me any hints to fix this ? thanks.

There are two places where you can tweak things:

1) at the source: you have a live source, and can make it answer the
latency query by setting the min-/max-latency properties on appsrc. The
sink will query this and then knows that it might take that much time
for the frame to be captured and make its way through the pipeline.

2) at the sink: you can create an eglglessink yourself and set it on
playbin via the video-sink property. Sinks have a 'max-lateness'
property, which determines how late buffers have to be before they will
be dropped. So you can tweak that or even unset it (not recommended, and
shouldn't be necessary) to allow for more lateness. The default for this
is 20ms.

You can also set the "sync" property on the sink to FALSE, but I would
not recommend it, then the sink will not look at the timestamps at all
any more and you may get very jittery video.

 Cheers
  -Tim

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



More information about the gstreamer-android mailing list