Hardware Acceleration (or just VSync) on Mali GPU

*nix specific usage questions
User avatar
Hammerill
New Cone
New Cone
Posts: 2
Joined: 23 Oct 2023 09:57
Location: France

Hardware Acceleration (or just VSync) on Mali GPU

Postby Hammerill » 23 Oct 2023 10:15

Hello everyone, I have a Banana Pi M5 and I want it to play videos on a big screen.
Everything seems to be working, but I inspect that videos are tearing, i.e. they are played without vertical synchronization.

Now let me introduce my environment:
1. Installed OS: Debian 10 Buster Lite
2. VLC is installed via APT.
3. Either it's launched in terminal, thus using the Framebuffer vout, either it's launched in minimal X enviroment (xorg, launching via startx command) with --vout=x11 parameter. The result is the same.

Like this videos are played somewhat well, in 60FPS, but as said before without VSync and thus teared, which is unacceptable for a big screen.

What I've tried to do:
1. Compiling VLC myself with some hardware acceleration options. Didn't succeed as there's no well documentation how to do it (the only thing I could find are those old articles for Raspberry Pi as this one, but they won't really work for Banana).
2. Messing up with VLC launch options to see if it could enable VSync. It didn't.
3. Understanding which video driver is used and trying to reinstall it. After running glxinfo I've understood that there's something wrong with the video driver itself, as I've obtained this string: OpenGL renderer string: llvmpipe (LLVM 7.0, 128 bits). It's llvmpipe, which is a software accelerated interface for OpenGL, maybe that's why I can't use any kind of hardware acceleration. I've been looking for how to reinstall it to make it recognize as Mali G31 MP2 (which is actual GPU on Banana Pi M5), but found nothing.
4. Using MPV instead of VLC. I've tried to launch it with different vout modes, such as xv, x11, vdpau, gpu, sdl, vaapi, libmpv. Only x11 and sdl worked. gpu is told to be the best vout mode which uses all the GPU power, and is the default one, but it just doesn't work in here. Instead, if launching MPV with no parameters, sdl mode is used which is too slow (like 5FPS or less). Interestingly, VLC works the same way, if not specifying vout mode upon starting in X mode, video is played at 5FPS (if launching in terminal it uses the framebuffer mode which is the same as x11). And x11 is something I've already seen in VLC, 60FPS and no VSync.

Well, after these failures I would like it if someone explained me what's a problem here and how do I fix it. Have a good day!

FYI, this exact post also exists on Banana Pi forum.

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Hardware Acceleration (or just VSync) on Mali GPU

Postby Rémi Denis-Courmont » 23 Oct 2023 17:50

As far as the media player is concerned, you just have to pick a an output mode whence VLC (or MPV) swap whole pictures, instead of writing into the frame buffer. So basically anything other than the FrameBuffer should work. For embedded devices, that's usually GL ES.

But then preventing tearing is then up to the display drivers. It seems that you are using dumb drivers without hardware acceleration, so no wonder that it's both slow and tearing.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

User avatar
Hammerill
New Cone
New Cone
Posts: 2
Joined: 23 Oct 2023 09:57
Location: France

Re: Hardware Acceleration (or just VSync) on Mali GPU

Postby Hammerill » 24 Oct 2023 16:43

Understood, thank you, that means I should look up further about compiling the correct GPU driver (basically continue the step 3 of what I've tried to do).


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 45 guests