Poor HD performance with appsink

Gordon Nickel gordon.nickel at downstream.com
Thu Feb 13 09:37:14 PST 2014

Hi Tim, thanks for your reply,

I posted this gist of the gstreamer wrapper previously: https://gist.github.com/gordeaoux/8978998 Note that the streaming pipeline seems to work just fine  under nearly any size.

It's a pretty basic pipeling: playbin with appsink for video and directaudiosink for audio. 

Keep in mind I'm using appsink (not appsrc) to display video frames in openGL. I'm copying buffers from the new buffer callbacks and sending them to open GL textures. 

By 'the video track can get very far behind the audio' I mean the video and audio tracks get out of sync, with the audio being ahead. After a few seconds, the audio will drop completely. If I set the max lateness of the video sink to a fraction of a second (0.01 to 0.5 seconds range), the audio keeps playing, but the video struggles to keep up and plays roughly a frame a second.

-----Original Message-----
From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Tim Müller
Sent: Thursday, February 13, 2014 9:28 AM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: Poor HD performance with appsink

On Thu, 2014-02-13 at 01:40 +0000, Gordon Nickel wrote:

Hi Gordon,

> I have an implementation of Gstreamer 1.0 for Windows using appsink to 
> play videos back. Generally, performance is pretty good, and quality 
> is excellent. However, with some specific videos (all 1080p, 720p 
> seems to be fine), the video track can get very far behind the audio, 
> at which time the audio starts to stutter and eventually cut out. I 
> don't believe it's an issue with the app itself (which generally gets
> 90-200 fps with videos running), but my implementation of Gstreamer.
> The same videos play without issue using playbin in gst-launch.
> I've tried setting drop frames ( gst_app_sink_set_drop to true ) and 
> max lateness to various values from 1 second to 0.01 seconds. In doing 
> so, the audio won't cut out, but the video will stutter to an 
> unnacceptable degree (approx 1 frame per second). I've also tried 
> different bit rates, but have generally stuck with h.264 for codecs.
> Mpeg 2 had similar performance issues.

Could you share with us some more details about your pipeline? Maybe a dot file / svg image of the elements or so?

What does 'the video track can get very far behind the audio' mean exactly?

> I can provide the problem videos if that would be helpful.

That might also be helpful, yes. (Though if it plays fine with playbin, there's no reason why the same file wouldn't work with your app and appsrc feeding data).


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

gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org

More information about the gstreamer-devel mailing list