Accelerated Video Playback on the Raspberry Pi in Qt 6 on eglfs KMS

Featured Video Play Icon

The old days of OpenMAX and omxplayer are now almost gone. Raspberry Pi has long moved to DRM/KMS and V4L2. Using omxplayer from Qt had the great benefit of reducing GPU workload by using the HVS, resulting in a more performant UI. I quickly developed an element to control omxplayer from Qt/QML in the past: https://github.com/carlonluca/pot/tree/master/piomxtextures_videolayer. Unfortunately, this technique is going to die soon, it seems, so I experimented with other options.

An alternative to the old approach is to draw the video on a DRM plane below, and place the Qt UI on a higher layer. According to the vc4 kernel driver, the HVS should still be used. Here is a demo of the result, compared to the old approach.

There seems to be a performance regression actually, more work is probably needed. Refer to this other article for a comparison with the old approach and the Qt5 demo.

Bye! ­čśë

Leave a Reply

Your email address will not be published.