Posts: 1
Joined: Fri Apr 13, 2018 11:37 am

Video playback on RPi3 with OpenGL Desktop driver (full KMS)

Fri Apr 13, 2018 12:28 pm


I'm currently writing a gaming app for the RPi with Python and the KIVY Framework. For this application, it would be nice to have smooth video playback and OpenGL shader effects. Unfortunately, shader effects (shader transitions) in Kivy are only possible with the OGL Desktop driver (with standard "Legacy" drivers, there appears to be a memory leak somwhere).

The problem is that video playback is painfully slow with the Desktop drivers. The Kivy framework depends on gstplayer for video playback, but with other video players on the RPi the problem persists as well. My guess would be that the libraries and applications used for video playback have to be recompiled with the correct OGL library for hardware acceleration with the OGL Desktop driver activated. Has someone tried this yet and can point me in the right direction?

Thanks in advance!

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5081
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Video playback on RPi3 with OpenGL Desktop driver (full KMS)

Sat Apr 14, 2018 7:02 am

I don't know about kivy specifically, but we're currently working on yuv support through the gl driver and kms. Predominantly this means support for dmabufs in order to avoid multiple image copies around the place.

You will need to rebuild Mesa to get the latest goodness, but should work as a simple demo of getting video decode into a window via gl. Use ninja to build it, not the makefile (look at the git history for the full runes required).
Now mmal is Pi specific. I'm 95% of the way to having a v4l2 codec driver sorted, so it'd be worth checking of kivy can handle that directly.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Graphics programming”

Who is online

Users browsing this forum: No registered users and 5 guests