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! 😉

5 thoughts on “Accelerated Video Playback on the Raspberry Pi in Qt 6 on eglfs KMS”

  1. Hi Luca,

    can you go in deep into “alternative is to draw the video on a DRM plane below, and place the Qt UI on a higher layer”.

    Starting a standard omxplayer instance with layer “-128” is enough? In my case if I set the layer to -128 I can’t see the player neither over the console.

    Thank you.

      1. Thank you for your fast reply. I’m still working with fkms. Until now I always draw omxplayer above Qt UI, but I wish to try to put it below.

Leave a Reply

Your email address will not be published. Required fields are marked *