Poor HD performance with appsink

Gordon Nickel gordon.nickel at downstream.com
Thu Feb 13 15:29:47 PST 2014


I've done more testing today, and here's what I found:

- Forcing the caps to a smaller resolution played back every video (from 720p to 4k) smoothly with appsink
- Commenting out buffer copying still lead to audio stutter.  (even though there was no video displaying)

From here, I guess the question is how do I get appsink or pipeline to drop frames without getting exceptionally far behind, or increase performance of the auto-constructed playbin pipeline?

Gordon Nickel


-----Original Message-----
From: gstreamer-devel-bounces at lists.freedesktop.org [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Gordon Nickel
Sent: Thursday, February 13, 2014 9:37 AM
To: Discussion of the development of and with GStreamer
Subject: RE: Poor HD performance with appsink

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).

 Cheers
  -Tim

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

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list