Today I setup my new RPI3 B+ with raspbian stretch as a desktop (OpenGL enabled 128 mem split). I use RPIs for some time as servers but not as desktop. I tried to play video (with avc codec) with omxplayer but no windows appeared. I compiled the most recent version of omxplayer from git but everything was the same.

omxplayer Autumn_leaves_4.mp4 
Video codec omx-h264 width 1280 height 720 profile 100 fps 29.970030
Subtitle count: 0, state: off, index: 1, delay: 0
V:PortSettingsChanged: [email protected] interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
have a nice day ;)

No error and no window appears. If I use legacy not OpenGL in raspi-config it can play video well but desktop graphic does not look so well. I also tried to use mpv

mpv --vd=h264_mmal Autumn_leaves_4_720p.mp4

which use 25% CPU against when I use

mpv --vd=h264 Autumn_leaves_4_720p.mp4

which use 100% CPU. My question is whats the best way to use hw acceleration to play videos on raspbian desktop? Is something wrong with my omxplayer that it doesn't work while OpenGL is enabled? Chromium also plays h264 quite laggy if I play file directly


in chrome://gpu/ is

Video Decode: Hardware accelerated

Why the video cant be played at least as good as with mpv -vd=h264_mmal?

1 Answer 1


The OpenGL driver that you can enable in raspi-config seems to be some sort of DRI driver. When it's enabled you have a /dev/dri/card0 device. Turn it off and the device goes away. It seems to generally slow things down on my Pi 3B so I keep it off. I'm only interested in pure (portable?) OpenGL ES 2.0 like the examples in /opt/vc/src. Those work fine without the DRI, and so does Omxplayer. Even from the console (no X).

You need DRI https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure to give OpenGL ES the ability to render to a framebuffer. But there's a lot of stuff you probably don't want, because it's possible to do software emulated OpenGL in varying degrees, which is much slower.

I use omxplayer almost daily, with and without X. My split's at 128 lately because some of the more recent demos in /opt/vc/src that play video as a texture on a rotating 3D object seem to require it. But I don't turn on the OpenGL driver in Raspi-config.

  • I understand that DRI is specifically needed when you want your 3D apps to run inside X windows. Mar 24, 2021 at 10:15
  • Could be, I've never done 3d. But DRI is part of X or the other thing, omxplayer works at a lower level, more like OpenGL ES. It's talking to the GPU directly which is why it's fast and efficient. It may collide with other things.
    – Alan Corey
    Mar 25, 2021 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.