Jump to content

Recommended Posts

Posted

Hello everyone

 

Just would like to start a discussion about the current state of video acceleration (decoding only, h.265/h.264/av1).

The soc (rk3588) recently got mainline support for these features in 7.0: https://gitlab.collabora.com/hardware-enablement/rockchip-3588/notes-for-rockchip-3588/-/blob/main/mainline-status.md

 

Has anyone tested this on a OPI5 already, especially using Kodi? Does this work ootb there now?

 

Regards,

XXXBold

Posted (edited)

I am glad that it's possible to use a different ffmpeg version than what the distribution expects. :D (it gives me hope of installing it in Trixie, instead of changing over to the newest Ubuntu)

 

Did you install the locally compiled ffmpeg at OS level, or did you keep it in a folder within your /home/username/...?

Edited by robertoj
Posted

Hello, I made a buld with the vendor kernel for mekotronics R58SV2, and build ubutu desktop Gnome. I definately have no HW decoding since with fhd .mp4 h264 videos the beast runs on 100% cpu all cores what did I wrong? Help appreciated

Posted

Thanks for the responses!

 

TBH I am not very familiar with the software stack from userspace required for video playback.

 

So, some questions:

- @chaitan3: You mentioned using a custom ffmpeg for mpv. Do you know if ffmpeg is also needed for kodi (when just using it to playback videos, not converting)? In https://github.com/mpv-player/mpv/pull/14690#issuecomment-4159253319 you mentioned you used kernel 6.19, but this didn't have mainline support yet, maybe the situation with 7.0 is different?

- Does anyone here have a rough idea what is still needed for Kodi (including the whole software stack below) to fully support HW video decoding on said platform (good if you know if specific PRs), without needing custom patches and possible ETA for that?

Posted
14 hours ago, XXXBold said:

Which image?


Gnome (wayland) desktop with kernel 6.18.y
 

14 hours ago, XXXBold said:

Would using the CLI version also work

 

Probably this way?


apt install mpv

mpv --hwdec=auto test.mkv

 

 (+) Video --vid=1 (*) (hevc 1920x816 25.000fps)
 (+) Audio --aid=1 --alang=mul (*) (aac 2ch 48000Hz)

AO: [alsa] 48000Hz stereo 2ch float
VO: [gpu] 1920x816 yuv420p

 

But something is still missing ... not hw accelerated. Sorry, not an expert here. I am happy when Chromium says it.

Posted

Hi Igor, 
Thank you for your reply. I build an Image for Mekotronics R58V2, but I leaned today we dont have the R58S2 (yet) our current device is the R58s, with a build provided by Mekotronics and the HW decoding works with QT-Multimedia as playback back-end, 
This is this build: v26.02 rolling for Mekotronics R58S running Armbian Linux 6.1.84-vendor-rk35xx.  This device is not yet supported, at least I could not find it here. I will discuss with Mekotronics  to get also at least Standard support from Armbian in future.

 

I do have also Mekototronics R58X and R58HD devices we want to use also in ffuture the have better support level here as well. 
I could not find any Forums related to Mekotronics devices and seams can not open one or add threads to the Rockchip rk35xx section, there loads of OragePi stuff but I could not see that officially you support any of them, anyway I gave up  with them cause they are ...lets say below expectations ;-).
Please give me a hint.

As Iam new here please excuse if you get sometimes strange question, but Iam working with arm boards already for a while. 

Using CLI is not an option, we actually install LX-Qt together with the application.

 

Thanks for helping! 
 

Posted

With the official friendlyelec image for Nano Pi M6 (trixie, gnome, 6.1 kernel), I'm getting hardware acceleration with the plain vanilla mpv from Debian:

 

mpv --vo=gpu my.mp4
mpp[2968]: mpp_platform: client 18 driver is not ready!
● Video  --vid=1  (h264 1080x1920 59.9998 fps) [default]
● Audio  --aid=1  (aac 2ch 44100 Hz 128 kbps) [default]
arm_release_ver: g24p0-00eac0, rk_so_ver: 10-616430-r0
mpp[2968]: mpp_info: mpp version: 958803d7 author: Herman Chen   2026-02-26 fix[h265d_rkv]: Fix rkv ref and poc setup overflow
Using hardware decoding (rkmpp).
AO: [pipewire] 44100Hz stereo 2ch floatp
VO: [gpu] 1080x1920 drm_prime[nv12]
 

Everything works wonderfully, and CPU usage is about 25%, compared to 500% for Armbian. Why can't rkmpp be enabled on Armbian to give us harware accel out of the box?
 

@Igor: The overlay link you provided above (mesa-vpu) is broken. And no such overlay exists in the prebuilt images for the Nano Pi M6. Result: still no hardware acceleration for my M6 with Armbian.

Posted
34 minutes ago, MMGen said:

no hardware acceleration for my M6 with Armbian.

 

34 minutes ago, MMGen said:

Why can't rkmpp be enabled on Armbian to give us harware accel out of the box?

 

On prebuild images we test video acceeleration within Chromium and it works. Both kernels, Ubuntu Noble / Resolute Gnome, same good or bad on all boards. Others userspace combo might not work and other/all video players we don't even try to cover. Our job is done, when at least one method works OOB.

 

34 minutes ago, MMGen said:

The overlay link you provided above (mesa-vpu) is broken

 

It was integrated. This is not needed anymore. For overlay, I don't know. I think its still needed and it that case, its certanly present. On kernel, where this is needed.

Posted (edited)
8 hours ago, MMGen said:

With the official friendlyelec image for Nano Pi M6 (trixie, gnome, 6.1 kernel), I'm getting hardware acceleration with the plain vanilla mpv from Debian:

 

mpv --vo=gpu my.mp4
mpp[2968]: mpp_platform: client 18 driver is not ready!
● Video  --vid=1  (h264 1080x1920 59.9998 fps) [default]
● Audio  --aid=1  (aac 2ch 44100 Hz 128 kbps) [default]
arm_release_ver: g24p0-00eac0, rk_so_ver: 10-616430-r0
mpp[2968]: mpp_info: mpp version: 958803d7 author: Herman Chen   2026-02-26 fix[h265d_rkv]: Fix rkv ref and poc setup overflow
Using hardware decoding (rkmpp).
AO: [pipewire] 44100Hz stereo 2ch floatp
VO: [gpu] 1080x1920 drm_prime[nv12]
 

Everything works wonderfully, and CPU usage is about 25%, compared to 500% for Armbian. Why can't rkmpp be enabled on Armbian to give us harware accel out of the box?
 

@Igor: The overlay link you provided above (mesa-vpu) is broken. And no such overlay exists in the prebuilt images for the Nano Pi M6. Result: still no hardware acceleration for my M6 with Armbian.

 

If you are using the friendlyelec image, can you really say "mpv is vanilla from Debian"?

 

I am really asking, because I haven't used friendlyelec in a long time, and I don't remember if they have their own DEB repository.

 

Can you identify the ffmpeg version and compilation options? Same with mpv.

 

Run $ ffmpeg with no options, and it will print out the version and the libraries that were activated.

 

$ apt list ffmpeg

$ apt list mpv

$ mpv --version

$ cat /etc/issue

$ uname -a

 

I do remember that friendlyelec has some extra video abilities, because they maintain their own patches with bleeding edge code, while the official ffmpeg and mpv maintainers are still checking whether to accept the pull requests.

 

Is it even possible to run "armbianmonitor -u" in friendlyelec?

 

Do you see "v4l2-request" or "va-api" (or "vaapi") anywhere in the mpv log? is your gnome desktop running under X11 or Wayland? (last time I used friendlyelec with Kodi, the graphic server was gbm, and there was no desktop, only Kodi).

 

If you run $ mpv --vo=gpu -v my.mp4 , mpv will print a more verbose log, with more details of how its running.

Edited by robertoj
Posted (edited)

@robertoj: Yes, it truly is the vanilla mpv. The package is from debian.org, not Friendlyelec.

 

$ apt list mpv
mpv/stable,now 0.40.0-3+deb13u1 arm64 [installed]

 

$ apt list ffmpeg
ffmpeg/stable,now 7:7.1.5-0+deb13u1 arm64 [installed,automatic]

 

$ mpv --version
mpp[949]: mpp_platform: client 18 driver is not ready!
mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1.2-0+deb13u1 (runtime 7.1.3-3rockchip)
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100 (runtime 61.7.103)
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

 

$ cat /etc/issue
Debian GNU/Linux 13 \n \l

 

$ uname -a
Linux NanoPi-M6 6.1.141 #16 SMP Thu Dec  4 14:51:28 CST 2025 aarch64 GNU/Linux

 

$ apt-cache show mpv                              
Package: mpv              
Version: 0.40.0-3+deb13u1                                      
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Architecture: arm64        
...
Filename: pool/main/m/mpv/mpv_0.40.0-3+deb13u1_arm64.deb
Size: 1270108
SHA256: ab039661c5016d96161fb9649b99cdde34ec4dfc83248ed9e42abb30318ac901

Edited by MMGen
Posted (edited)

Results of my testing of prebuilt images with the Nano Pi M6:

 

Armbian vendor kernel image (Gnome/resolute): no HW acceleration, even with Chromium. HDMI sound works but headphone output doesn’t. HDMI sound incorrectly identified as “Analog Output”.

 

Armbian mainline kernel image (Gnome/resolute): HW acceleration works with Chromium but not with mpv. No sound, period. An audio device is identified and VU meter is active in the mixer, but both HDMI and headphones are silent.

 

Official Friendlyelec image (Gnome/trixie): HW accel works with every media player I tested. Sound works perfectly, with devices correctly identified. System appears to be stable, with no crashes so far.

 

 

Results of my testing of prebuilt images with the Rock Pi 5B:

 

Armbian vendor kernel image (Gnome/resolute): no HW acceleration, even with Chromium. HDMI and headphone sound both work. HDMI sound incorrectly identified as “Analog Output”.

 

Armbian mainline kernel image (Gnome/noble): HW acceleration works with Chromium. No sound. Clicking on the sound icon on the taskbar crashed the system and corrupted the filesystem, making the image unbootable.

 

Official Radxa image (KDE/bookworm): HW accel and sound work for all media players I tested. There are issues with the ethernet driver and occasional video crashes when switching to fullscreen mode. Otherwise, the system appears to be stable.

 

 

Verdict: if you want a usable RK3588-based workstation, use the images provided by the manufacturers. Armbian isn't quite there yet.

Edited by MMGen
Posted (edited)

@Igor:

 

Update: I have HW accel with sound for chromium with my minimal trixie/vendor image, which I installed xfce on top of. This is the image from armbian.org as opposed to the latest release from Github, which is what I tested in my review of Gnome images above.

 

However Chromium doesn’t support AC3 audio, which means it can’t play the majority of the files in my video collection with sound:

 

https://issues.chromium.org/issues/41253735

 

And there's a good deal besides that Chromium cannot do.

 

This is why Chromium is not enough and we need mpv/ffmpeg/libav* support. mpv plays literally every media file you can throw at it.

Edited by MMGen
Posted

@Igor, @robertoj:

 

Update: Friendlyelec image uses its own libav* libraries, not the Debian ones:

 

# ls -1 /usr/local/lib/aarch64-linux-gnu
libavcodec.so
libavcodec.so.61
libavcodec.so.61.19.101
libavfilter.so
libavfilter.so.10
libavfilter.so.10.4.100
libavutil.so
libavutil.so.59
libavutil.so.59.39.100

 

It also has the following packages, not in Armbian:

 

# dpkg -l *mpp*
...
ii  librockchip-mpp-dev 20260226-2   arm64        Media Process Platform
ii  librockchip-mpp1    20260226-2   arm64        Media Process Platform
ii  libv4l-rkmpp        1.8.0-1      arm64        A rockchip-mpp V4L2 wrapper plugin for chromium video dec and enc
ii  rockchip-mpp-demos  20260226-2   arm64        Media Process Platform Demos

 

I copied the relevant files from Friendlyelec system to Armbian system (both are Trixie), ran ldconfig, and ran `strace mpv my.mp4` on both systems.  Comparison of strace output revealed that certain apparently required device files under /dev/dma_heap are missing on Armbian, plus incorrect permissions on /dev/mpp_service:

 

On Friendlyelec:

 

# ls -l  /dev/dma_heap
total 0
crw-rw-r-- 1 root video 251, 4 Jul 20 06:48 cma
crw-rw-r-- 1 root video 251, 5 Jul 20 06:48 cma-uncached
crw-rw-r-- 1 root video 251, 0 Jul 20 06:48 system
crw-rw-r-- 1 root video 251, 1 Jul 20 06:48 system-dma32
crw-rw-r-- 1 root video 251, 2 Jul 20 06:48 system-uncached
crw-rw-r-- 1 root video 251, 3 Jul 20 06:48 system-uncached-dma32

 

# ls -l /dev/mpp_service 
crw-rw-rw- 1 root video 241, 0 Jul 20 06:48 /dev/mpp_service

 

On Armbian:

 

# ls -l  /dev/dma_heap
total 0
crw------- 1 root root 251, 0 Jul 19 19:41 system
crw------- 1 root root 251, 1 Jul 19 19:41 system-uncached

 

# ls -l /dev/mpp_service 
crw------- 1 root root 241, 0 Jul 20 06:48 /dev/mpp_service

 

Removing the cma= arg from the kernel cmdline gave me /dev/dma_heap/cma, and I manually fixed up the permissions, but still no video accel for mpv. Something else is apparently required, perhaps the remaining missing device files under /dev/dma_heap.

Posted
4 minutes ago, MMGen said:

This is why Chromium is not enough and we need mpv/ffmpeg/libav* support. mpv plays literally every media file you can throw at it.

 

Totally undestand, just I probably know less then you about those things ...  mpv is the king, I know that. But most people don't and they will keep asking why VLC, Totem or whatever player doesn't support accelerated video. Every SoC family has its own tricks to get this working ... 

Posted
1 hour ago, MMGen said:

Something else is apparently required, perhaps the remaining missing device files under /dev/dma_heap.

A difference between FriendlyElec image and Armbian image is U-Boot ( bootloader/firmware ) variant I think. For my NanoPi-R6C, HDMI audio does not work if I boot from SD-card where an image with a U-Boot from 2026 is written in the boot area (between main GPT and 1st partition). If I wipe that U-Boot by zeroing that area, the OS will take EDK2 UEFI v1.1 that I have written to eMMC. Then there is HDMI sound, on Armbian and Opensuse Tumbleweed. I need to check if I run it in hybrid ACPI+DeviceTree mode or just DeviceTree mode. The setting is anyway 'mainline kernel' DT, which should be about 6.10 or later. If I select 'vendor kernel', it can only run Armbian 6.1.115, but I don't remember if KDE6 Wayland does work then. I only did that to check if I idle power consumption was still < 1.5 Watt, which was the case. Else it is 3 Watt and min clock is 1GHz instead of 480MHz and more differences. 

 

I remember I saw some U-Boot version scrolling by when I messed up partitions on eMMC (might just be corrupt 2nd backup GPT), I think the UEFI code did fall back to some build-in U-Boot.

Now I did check certain things:

 

# gunzip < rk3588-sd-debian-trixie-gnome-wayland-desktop-6.1-arm64-20260629.img.gz | dd count=32k status=none | grep -FUzi "U-Boot SPL 20"
U-Boot SPL 2017.09-g50821b3c8bd-241113 #fa (Jan 02 2025 - 16:53:42)

 

# cat nanopi-r6c_UEFI_Release_v1.1.img | dd count=32k status=none | grep -FUzi "U-Boot SPL 20"
U-Boot SPL 2017.09-g5f53abfa1e-221223 #zzz (Dec 26 2022 - 09:10:09)

So the EDK2 seems to contain some old base U-Boot and also the FriendlyElec image same U-Boot base, however, it can be different and certainly is incompatible with mainline recent year U-Boot and also likely the vendor tagged one from Armbian. FriendlyElec could do various HW initialization in a different way and on top of that or mixed with it, EDK2 again does things. It needs rebuild EDK2 from source or so in order to gain more know-how and check.

 

I also see the kernel version string in the FriendlyElec image is '6.1.141' (Armbian is '6.1.115-vendor-rk35xx' ), what that means I don't know, kernel.org is at 6.1.177 (2026-07-04).

I am using 7.1.3+deb14-arm64-16k #1 SMP PREEMPT Debian 7.1.3-1 (2026-07-04) from Debian Sid repo, userspace is Armbian Trixie. So no HW accel, at least not in KDE6 with FireFox.

 

The added RKMPP libs are 1 thing, the DMA devices are another. Names like 'uncached' and 'dma32' are important hints on how and what is implemented, wrapping tactics etc.

 

The whole issue with those FriendlyElec images is, at a Debian minor update for example, those libav* files get overwritten. In addition, kernel sources w.r.t RKMPP are banned from github. So those images from FriendlyElec are a 1-time shot, works as longs as you don't update.

I spent a lot of time to build RPI kernels and their ffmpeg/libav variant. It changed several times, now I don't use it anymore in a generic way, mainly because the HW encoder is fairly limited and does also not work anymore with Jellyfin ffmpeg build (for transcoding on-the-fly). Same for OpenSuse, they are strict on MPEG licensing/royalties, so no MPEG2,H264,HEVC etc, you extra need other repo to make it work.

 

To come back to OP topic title, LibreElec (so dedicated Kodi) worked fine HW accel for HEVC, H264, H265, AV1 and partly for VP9. Was about 9 months ago I ran that dedicated from separate SD-card, so LE's own U-Boot and kernel etc, all mainline based. But is only decoders, so playing video on a usually larger HDMI monitor. So the kernel can do it, it is just many different API's and protocols. FireFox focuses on VAAPI AFAIK, so known to work fine on Intel HW, but needs then tweaks to work with v4l2_m2m AFAIK. Maybe look at RPi's FireFox patches, although I think it is proprietary for their Broadcom tailored kernel, so won't work with mainline Linux nor Rockchips stuff on RK3588.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines