Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[GUIDE] Kodi on Orange Pi 5 with GPU Hardware Acceleration and HDMI Audio

Featured Replies

I have been looking into this as well over the last two weeks or so to try to get a claerer picture.

But don't have that yet.  I'm no kernel guy just a hobbyist programmer but I have used drm prime in a software I've modified for Raspberry,

Chaiki for Raspberry

I'm currently trying to port that over to OPi5.

 

 

There's various places that can give you some hints but I'm going to assume that you guys are all aware of those already so not going to post.


But did you see this one?
I just spotted it but haven't had time to try yet

https://github.com/rockchip-linux/mpp/pull/122/commits

 

I didn't have luck running the current default 'mpi_dec_test' but there might be some drm prime hints in that PR?

Edited by fredrum

Is this broken now?
At step one, github returns a 404 page does not exist error.

 

Well, I have just used the regular XFCE image since the GitHub link does not appear to work from stage 1.  

 

However, after installing that and exactly following this guide, at step 6 there is no Kodi to select in the lower right hand side of the screen.  

 

Then, is there some way to execute Kodi without having to sign in as a user and then run Kodi?

 

 

 

Edited by Poincare

@vandyman For hw acceleration you'll need to compile it with ffmpeg configured to use rkmpp.

 

@amazingfate At the repo of JeffyCN I saw some commits related to NV12_10, NV15 and NV16, could this be the missing link for hdr video?

https://github.com/JeffyCN/xorg-xserver/commit/aa8e4176d3a4c6ee258f333e9dac8ce6ef827d4c

https://github.com/JeffyCN/xorg-xserver/commit/2a9c55ef3300e696d16ff6c868332fdcfa1b5740

Hi @amazingfate , Can you share us how to build kodi from xbmc source with lib ffmpeg from jeffyCN ?

i read  your guide from post in radax forum , but it's still little confused how to combine all of them into one build environment .

I think Kodi 21 fixed this issue , so i will try to build and start debug from this version instead of kodi 19.4 .

@luizkun You could find the build options in the source that amazingfate has uploaded on his repository, just build ffmpeg with rkmpp and libdrm enabled, then build kodi with gles and at least gbm.

But just use a newer version doesn't work, already tried.

 

@amazingfate Tnx I will have a look if I could find something in there. But I'm 100% sure that HDR did work at the beginning, so there has been a change somewhere, still not sure if it's mpp, libdrm or something else. I was thinking something in ffmpeg, since you'd found a working solution and after that JeffyCN made some commits which makes no sense to me like:

#ifndef DRM_FORMAT_NV15 // fourcc_code('N', 'V', '1', '5')

#define DRM_FORMAT_NV15 fourcc_code('N', 'A', '1', '2')

#endif

Removed these lines but this had the same result.

 

Something else I was thinking is that at the beginning gbm used the original driver? and now panfork. But I'm unable to make the original driver to work in gbm.

Edited by royk

@amazingfate Yes I've seen it's in the kernel. Still haven't found the solution yet. Something that struck me is that the block sizes of NV15 are different than NV12_10 when I look at 

 

{ .format = DRM_FORMAT_NV12_10, .depth = 0, .num_planes = 2, + .char_per_block = { 5, 10, 0 }, .block_w = { 4, 4, 0 }, .block_h = { 4, 4, 0 }, + .hsub = 2, .vsub = 2, .is_yuv = true},

 

{ .format = DRM_FORMAT_NV15, .depth = 0, .num_planes = 2, .char_per_block = { 5, 5, 0 }, .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true },

 

Trying some things with the libraries, next step will be adding NV12_10 back in the kernel.

@vandyman And does that one play HDR videos?

 

@amazingfate and @luizkun I haven't found the exact problem yet, but luckily found a backup. With this backup it does play HDR videos again, but with the HDR Vision the colors don't match. After compiling a new version of mpp the same problem occured as before. So the problem should be in mpp or the combi of the new version with .....

 

The file I've uploaded is the working one for HDR10, is from date 2022-11-16

librockchip_mpp.so.0

Edited by royk

@royk

I tried to run the Ubuntu kodi, but I get the green screen. 

My guess is that Wayland needs to be enabled. 

 

Oh! By the way. I am referring to the official Op5 Ubuntu build on the Opi website. 

Edited by vandyman

@vandyman Ok tnx, to be able to watch hdr at the moment it's only possible from gbm with gles rendering, I'm almost certain it doesn't work. I think that ffmpeg needs some adjustments due to changes in mpp.

 

@amazingfate

Found something, in ./mpp/codec/dec/h265/h265d_refs.c there is a line "s->h265dctx->pix_fmt |= MPP_FRAME_HDR;" when I change that to "s->h265dctx->pix_fmt |= MPP_FMT_YUV420SP_10BIT:"  it plays HDR again.

 

 I assume a proper way to fix this is to add "MPP_FRAME_HDR" to ffmpeg?

Edited by royk

Thank you @royk and @amazingfate

I've just tried to play some HDR 10bit videos and now they play fine. Also if I play 4k videos from chromium they are playing fine without cpu usage

 

I've installed VLC and tried to play some HDR 10bit videos and they can also be played. However, it seems they are being played through CPU, as I can see one core at 100% all the time.

Does  anyone know how to make VLC (or any other standalone player) to play the videos using the gpu?

 

Thanks

 

My pulse audio mapping.

It works with 5.1 surround, all channels are correct with the config.

I am using this config on an orange pi 5.

 

Zitat

sudo nano  /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf

 

[Mapping hdmi-surround]
description = Digital Surround 5.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
#channel-map = front-left,front-right,rear-left,rear-right,lfe,front-center 
channel-map = front-left,front-right,lfe,front-center,rear-left,rear-right
priority = 8
direction = output


 

Edited by amielke

@luizkun, Hi could you please share the drive link again, seems like it is dead, I would love to try out this ATV build! Thanks!

Edited by Rabee Hanzla

On 3/7/2023 at 5:23 PM, fredrum said:

Might be worth pointing out even if maybe many people are aware that there's two completely differernt uses of the term 'DRM'.

DRM = Digital Rights Management. Ie support for enforcing copy right protection of media.

 

also 

 

DRM = Direct Render Manager.  A render and display path in Linux that can show images when not under X11.

 

Good point which probably bears repeating.

 

However, in the first case, I think that 'Digital Restrictions Management' is a more accurate term.  ;)

 

You could even say DRM is defective by design.

On bullseye or archlinux based OS, hdmi cec works. (armbian, official ..)
However, it does not work on ubuntu based OS (armbian, official ubuntu).
Can this be fixed? 

[mention=205859]royk[/mention]
 

 dkinght@orangepi5:/dev$ ls -al cec0crw-rw---- 1 root video 248, 0  4월  2 21:49 cec0
 dkinght@orangepi5:/dev$ cec-client
 No device type given. Using 'recording device'* failed to open vchiq instance
 dkinght@orangepi5:/dev$ cec-client -l
 libCEC version: 6.0.2, compiled on Linux-4.15.0-166-generic ... , features: P8_USB, DRM, P8_detect, randr, RPi, Exynos, AOCECFound devices: NONE
 dkinght@orangepi5:/dev$ cec-compliance -d0
 Driver Info:       Driver Name                : dwhdmi-rockchip       Adapter Name               : dw_hdmi_qp       Capabilities               : 0x0000000e               Logical Addresses               Transmit               Passthrough       Driver version             : 5.10.110       Available Logical Addresses: 4       Connector Info             : None       Physical Address           : f.f.f.f       Logical Address Mask       : 0x0000       CEC Version                : 2.0       OSD Name                   : ''       Logical Addresses          : 0 FAIL: missing logical address(es), use cec-ctl to configure this
 dkinght@orangepi5:~$ uname -a
 Linux orangepi5 5.10.110-rockchip-rk3588 #1 SMP Sun Mar 19 16:54:42 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
 dkinght@orangepi5:/boot/dtb/rockchip$ ls -al rk3588s-ora*-rwxr-xr-x 1 root root 235351  3월 31 20:59 rk3588s-orangepi-5.dtb-rwxr-xr-x 1 root root 234574  3월 31 20:59 rk3588s-orangepi-5b.dtb
 



this in my armbian

Edited by dkg

It would be great to have hdmi-cec working on ARMBIAN as well. It works on rebornOS. I can help with any tests/checks as well if you need those.

Edited by Alex D

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.