Lag between appsource and appsink
Tim Müller
tim at centricular.com
Tue Aug 12 00:57:26 PDT 2014
On Mon, 2014-08-11 at 07:50 -0700, mansi.karan wrote:
Hi,
> I am using x264enc to encode a live video stream.
> The problem I am facing is that appsrc need-data callback is called at least
> 40 times before first new-buffer callback is called, which results in a
> delay of around 6-7 seconds, even when I use apprtc.appspot.com loopback.
> The pipeline is :
> appsrc ! videoparse format=I420 width=$width height=$height framerate=$rate
> ! x264enc byte-stream=true ! appsink.
> I have tried is-live, min/max latency and do-timestamp properties but to no
> avail.
> Is there something I am doing wrong? Please help me out.
No, nothing you're doing wrong.
By default x264enc is configured to use a very high latency which allows
higher quality (with everything else equal).
You can use x264enc tune=zerolatency to make it output things pretty
much instantly, or use the other properties (e.g. key-int-max) to
configure a trade-off that's suitable for your use case.
Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
More information about the gstreamer-devel
mailing list