Video decoder performance and QoS

Yi-Lung Tsai wagamama.tsai at gmail.com
Fri Jan 6 08:07:38 UTC 2017


On Wed, Jan 4, 2017 at 6:07 PM, Tim Müller <tim at centricular.com> wrote:

> On Wed, 2017-01-04 at 11:25 +0800, Yi-Lung Tsai wrote:
>
> > Our team currently develop an HEVC decode library and want to
> > integrate it into GStreamer pipeline.
> > Unfortunately we encounter a performance issue.
> >
> > We test a video with frame rate 29.97.
> > In our test-bed, the HEVC library could process video stream under
> > FPS 33~34 on average.
> > This performance seems enough on the target machine.
> >
> > Then we develop a video decoder plugin to leverage our HEVC library.
> > The performance is measured in "playbin" with "fpsdisplaysink".
> > FPS message is shown every 500ms.
> > From the beginning, FPS value is around 29.8~30.1.
> > After two seconds, the FPS starts declining and never goes back to
> > 20.
> >
> > There is a drop mechanism in "gst_video_decoder_clip_and_push_buf".
> > I guess this issue is related to QoS.
>
> You could first check if that's actually the case.
>
> There might be other reasons for poor performance (e.g. additional
> frame copies/allocations or such).
>
> Or fpsdisplaysink's text rendering being slow (use text-overlay=false).
>
> Most sinks (not fpsdisplaysink though) have a "qos" property, which
> will be true by default for most video sinks and false for most other
> sinks.
>
> You could try e.g.
>
>  ... ! fpsdisplaysink text-overlay=false video-sink="fakesink"
>
> In this case, average fps could exceed 30 to the end.

> (^^^ measures pure decoder throughput)
>
>
>  ... ! fpsdisplaysink text-overlay=false video-sink="fakesink sync=true
> max-lateness=20000000"
>
> In this case, average fps could also exceed 30 to the end.

> (^^^ like above but syncing to the clock and configure more like a
> videosink, but without QoS enabled)
>
>
>  ... ! fpsdisplaysink text-overlay=false video-sink="fakesink sync=true
> max-lateness=20000000 qos=true"
>
> In this case, the measure result is unstable.
Sometimes average fps ranges from 27 to 30.
But sometimes average fps is down to around 20.

> (^^^ like above but syncing to the clock and configure more like a
> videosink, with QoS enabled)
>
> Cheers
>  -Tim
>
>
Here is also an interesting found.
In case 3 above, there is no help if the "max-size-buffers" of queue
between decoder and video sink is set to 60.
But in my real playback pipeline, average fps would be 29.8~30.1 if
"max-size-buffers" is set to 60 as well.

According to testing results with "fakesink" above, the key point would be
QoS.
However, in my real playback, enlarging max size of queue seems an option
to get better performance.
Is turning QoS a good option?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170106/e81219f7/attachment.html>


More information about the gstreamer-devel mailing list