[Development] [QtMultimedia] How to make to use a HW codecs by QML media player on Linux?
Andrew den Exter
andrew.den.exter at qinetic.com.au
Wed May 25 03:44:21 CEST 2016
The short answer is some amount of platform adaptation will be required to
enable hardware acceleration on your board. Looking at the page you linked
to; that adaptation might be achieved by creating an implementation
of QGstBufferPoolPlugin (gstreamer 0.10 only) which exposes EGL surfaces
associated with the x-nv-yuv buffers produced by the accelerated codec. Or
you might also need to create your own video node by implementing
something more invasive may be required, it really depends on how the
vendor implemented their gstreamer plugins
The reason hardware acceleration doesn't just work is that hardware vendors
have traditionally had to create extensions to gstreamer in order to
implement their hardware accelerated plugins, and these extensions tend to
require a vendor specific video sink to work. If all you care about is
rendering to the full dimensions of a native window then autovideosink will
generally resolve to that vendor specific video sink and that's why the
standard example command line examples tend to work. But when it comes to
something more complicated like compositing into an opengl scene or even as
simple as rendering to a sub rect of a window then you're into the realm of
vendor extensions and without a port to your specific hardware it probably
won't work. Gstreamer 1.0+ goes some way to addressing these issues, but
even within the standard packages there still seems to be multiple APIs for
codecs which produce EGL surfaces and none of them have been utilized in
On Wed, May 25, 2016 at 12:40 AM, Denis Shienkov <denis.shienkov at gmail.com>
> Hi all.
> I have the Toradex (Apalis T30) embedded board:
> which has:
> Linux Image, with the GStreamer 0.10.
> Also I have compiled Qt 5.6 and installed it to the board.
> When I try to play any *.MP4 video file from the QML Video item:
> I see, that my video has very-very lags, and I see (with htop utility)
> that CPU loading is ~300% (
> three cores running on ~100%).
> But, when I try to play the video, using the 'nvgstplayer' utility, I see
> that CPU loading is ~46% and all fine. Seems, the QML player loads the SW
> codecs instead of HW codecs...
> Is there are any way to say to QML player to use a HW codecs? Or, maybe, I
> need to fix a sources of QtMM (where I need to change it?) Or, maybe, is
> there are another way to do this?
> Otherwise, is just a **HELL** and there is no sense in QML QtMultimedia at
> all (But I need QML for anumations). And I do not know, how to fix it (I'm
> not expert in GStreamer).
> PS: I have tried the 'gst-launch' pipelines instead of 'nvgstplayer', as
> described here:
> but it crashes with sigsegv....
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development