Jump to content

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


Recommended Posts

Posted
10.10.2023 в 02:25, royk сказал:

If there are people that still have problems with the overlays in Kodi, unable to see the OSD while playing a movie. You could try the following:

Install the overlay: sudo armbian-add-overlay vop.dts

Then:

armbian-config -> System -> DTC

Then search  (crtl+w) for 'disable-win-move;' and remove that line. After that ctrl+x and save and agree to reboot

Thank you! This helped me also solve the problems with the overlays in Kodi on orangepi 5.

Posted

@vale Yeah, I found out it was because I was sitting on the remote. But seriously In case you've got the OPi5 plus it is possible that the IR receiver receives a signal from another remote, I remember that mine did with a remote, I thought the one of LG. Perhaps it's better to disable the remote in the DTB by default, for now you could try to put a piece of tape over it or disable it if it's a module.

 

Posted

Hello, first, thanks for the detailed instructions!

 

I followed the guide step by step:

- Downloaded image from https://fi.mirror.armbian.de/archive/orangepi5/archive/Armbian_23.02.2_Orangepi5_jammy_legacy_5.10.110_xfce_desktop.img.xz

 

So far so good, made all settings as described.

 

However, after I add some Movies to the library, kodi keeps crashing and resetting the session (crashlog attachedkodi_crashlog-20240103_143357.log I've loaded 3 x265 (.mkv) files for testing purposes directly on the SD-Card)

 

How can I fix that? I did not change the system in any other way so far, my goal is to get this problem solved first.

 

My System:

- OrangePI 5 16GB with 64GB MicroSD Card

- Display / TV: Toshiba 40RV723 (1080p)

 

If more information is required, let me know :)

 

Thanks and regards

Posted

@XXXBold You could try updating mpp:

 

git clone https://github.com/rockchip-linux/mpp.git -b develop
cd mpp/build/linux/aarch64
nano make-Makefiles.bash

add after '-DHAVE_DRM=ON \' the following lines and save (ctrl-x then y)

      -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
      -DCMAKE_INSTALL_LIBDIR:PATH='lib/aarch64-linux-gnu' \

bash make-Makefiles.bash
make -j8
sudo make install

 

Posted (edited)

@royk I can't find the '-DHAVE_DRM=ON \' in the file. See here: https://github.com/rockchip-linux/mpp/blob/develop/build/linux/aarch64/make-Makefiles.bash

 

I added the lines below "-DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \"

Now it looks like:

# generate Makefile
cmake -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_TOOLCHAIN_FILE=./arm.linux.cross.cmake \
      -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
      -DCMAKE_INSTALL_LIBDIR:PATH='lib/aarch64-linux-gnu' \ 
      -G "Unix Makefiles" \
      ${MPP_TOP}

Compile & install worked.

 

I rebooted the machine, and now it seems to work! Kodi no longer crashes & when playing an x265-file the CPU usage is quite low, thanks!

However, another (small) issue: When playing a video, it's always in front, when using the menu in kodi (Esc) it's behind the video, so not really usable, until the playback is stopped completly, see Image.

2024-01-04-20-48-01-989.jpg.517fd614cc2cc1cf81a6d063c54af963.jpg

 

Is there a fix for this? Otherwise it seems to work really well now (need more testing to confirm for sure)

 

EDIT: Fixed, see answer from @royk, thanks!

Edited by XXXBold
Posted (edited)

Btw, there's also another way. Combination kodi + mpv.

it's not difficult to make mpv as external player inside of kodi. 

In that case it's not necessary  to do full set of instructions of 1st post.   Generic kodi installation from apt would be enough.

And,  what is an advantage - with mpv you get hdr tonemapping, that makes better and more contrast look of  hdr videos for most of tv's  relatively to kodi's internal player.

(unless you have "true" hdr tv , that is rare case, end even if you do,  wayland is unable to output hdr as far i know, so tonemapping will make better look anyway)

 

Edited by rix81
Posted

@rix81 Great tip! Although Wayland can't output HDR yet (it's almost there), Kodi under GBM can output HDR and these days it's pretty common to have a HDR TV, at least where I live unless you mean something different with "true HDR". Eitherway it seems like a good alternative but you might still need to edit the dtb for HDR.

Posted (edited)
On 1/6/2024 at 3:27 AM, royk said:

it's pretty common to have a HDR TV

Yea) kind of offtop probably. Hdr is marketing thing. I also have Samsung hdr tv,  that is not hdr at all.. And tonemapped into 8bit hdr videos on it looks much better than ones without tonemapping. I'm not in this market, but suspect that most of tv's selling nowadays are fake hdr. Except Oled  etc. Actually it easy to find out that tv either true or fake hdr just looking at brightness level of specs, it would be self explanatory,

Edited by rix81
Posted

Hello everyone

 

I did some more tests now, and most things seem to work pretty good so far.

There's one thing that makes watching movies with (not burned in) subtitles a bit a bad experience: Whenever a subtitle is shown, the Image of the video will turn Black and stay black, sound keeps playing normally. This seems to happen every time when a subtitle is shown, so you should be able to reproduce it easily.

I found 2 workarounds, but both are not really nice:

1: After the subtitle disappeared, let the movie play for ~15s, then jump back 10s, that will make the image reappear (simple pause-play won't). However, when this is done too often, the stream hangs and the OPI needs a hard reboot (Kodi is no longer responsive), seems the system doesn't like that skipping much.

2: Disable subtitles completely. This is possible but obviously bad for scenes that require them (e.g. native language dialogs etc.).

 

Did anyone experience this aswell, were you able to fix it?

Posted

Hi everyone,

 

I've got an orange pi 5 plus running Kodi that is almost working perfectly, I followed the instructions in this thread and am using the vop.dts overlay @royk posted earlier in this thread, but when fast-fowarding through some videos the screen will completely freeze. it seems to need a hard reboot to change it's display output again--I can't figure out anything (including quitting Kodi entirely) that changes the display output until I reboot. Accessing the system through SSH still works fine though, I don't see any processes with high CPU usage, and even ssh with x forwarding still works fine.

 

I didn't have subtitles on but this sounds very similar to the issue @XXXBold was describing above.

 

The only logs I know how to find are Kodi's logs, but that log didn't update between it working and not working.

 

It only freezes when I fast-forward at 4x or faster, but freezes almost every time I try to fast-forward that fast. As far as I can tell, it only freezes when fast-forwarding through a video encoded with HEVC, but is totally fine fast-forwarding through an AV1 encoded video.

 

Does anyone have advice on what logs to look for to try to fix an issue like this? I don't even know where to start on this one.

 

Thanks so much!

Posted (edited)

The posts sound promising.

 

I've got an old Zidoo Media player z9s which is on Android 6.  Sometimes it stutters with the 2160p x265 .

 

I'm guessing a OPi 3B would be too underpowered to run 2160p so maybe a OPi5b will be perfect if I can support a bluetooth remote, HDR, DTS and ATMOS pass through.    Has anyone had success with this kind of setup so far with no issues?  Thanks.

Edited by Thewonderer
further clarification
Posted

I saw this article regarding RK3588 today from cnx-software

 

I thought this thread would would like to know... Sounds very promising!

 

 

 

Add full HWA transcoding pipeline for Rockchip RKMPP

HW decoder (MPEG1, MPEG2, MPEG4, H264, HEVC, VP8, VP9, AV1)

HW encoder (H264, HEVC) up to 1080p @ 480fps / 4k @ 120fps on RK3588

HW scaler, format conversion, and subtitle burn-in

HW HDR-to-SDR tone-mapping (requires OpenCL, RK3588 only)

The OpenCL runtime can be downloaded and installed from libmali-valhall-g610-g13p0-x11-wayland-gbm_1.9-1_arm64.deb

Support lossless AFBC (Arm frame buffer compression) to save memory bandwidth and improve FPS

Support async RGA filter and MPP encoder

 

https://www.cnx-software.com/2024/02/01/jellyfin-rockchip-rk3588-mpp-hardware-acceleration/

https://github.com/jellyfin/jellyfin-ffmpeg/pull/318#commits-pushed-d89df02

Posted

Hi, I have a problem with Kodi on Armbian.
When I interrupt (stop, not pause) watching a movie and then start it again, Kodi freezes and I have to do a hard reset.
Is there any solution?
A thousand thanks

Posted

Mine freeze randomly on pi 5 plus. Let say freeze once a week, but I can still get control with ssh and reboot.

I guess this is the best we can get with voluntary support .  So would rather thanks all the ones giving us a not so bad working system.

The question I would ask is how to diagnose the cause of a kodi freeze?  What should be run before the freeze? After the freeze?

Posted

Following initial steps with Armbian_23.8.1_Orangepi5_jammy_legacy_5.10.160_xfce_desktop

at 

sudo apt install ubuntu-desktop kodi

receiving 

The following packages have unmet dependencies:
 gjs : Depends: libgjs0g (= 1.72.2-0ubuntu2) but 1.72.4-0ubuntu0.22.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Posted (edited)

@VanGeldon Seems like an old image, try one from here: https://imola.armbian.com/dl/orangepi5/archive/

 

When you choose an image with amazingfated and Wayland like Gnome or KDE you probably only need to install Kodi.

 

By the way when I search the package with apt search, this is the result:

libgjs0g/jammy-updates 1.72.2-0ubuntu2 arm64

 

So or it's corrected or you've got other sources in /etc/apt/sources.list

 

deb http://ports.ubuntu.com/ jammy main restricted universe multiverse

# deb-src http://ports.ubuntu.com/ jammy main restricted universe multiverse

 

deb http://ports.ubuntu.com/ jammy-security main restricted universe multiverse

# deb-src http://ports.ubuntu.com/ jammy-security main restricted universe multiverse

 

deb http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse

# deb-src http://ports.ubuntu.com/ jammy-updates main restricted universe multiverse

 

deb http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse

# deb-src http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse

Edited by royk
Posted

Thanks @royk
From the archive link I tried with Armbian_24.2.1_Orangepi5_jammy_legacy_5.10.160_gnome-amazingfated_desktop.img : Hit the same package unmet dependency issue.

With Armbian_24.2.4_Orangepi5_jammy_vendor_6.1.43_kde-neon-amazingfated_desktop.img I could follow all steps successfully but just always black screen with DRM prime direct to plane, even h264.

Posted (edited)

EDIT: Have discussed with Werner on Discord, I will need to migrate to armbian for this as Debian does not work with PPAs. I will use release 6.1.x from here:
https://dl.armbian.com/orangepi5/archive/Armbian_24.5.1_Orangepi5_jammy_vendor_6.1.43.img.xz

 

No longer need assistance with below.

 

 

 

I'm trying to install this on my Orange Pi 5 running standard Orange Pi Debian 12 (bookworm).

 

I'd like my Pi 5 to run both Home Assistant as well as Kodi, so I first used this guide:

https://gist.github.com/renatoccosta/c30f0b4216c8caaf1f202b0a0561b5d3

and am now trying to follow the guide in this thread.

 

 

 

When I try to add the repos and update, I get the following errors:
 

E: The repository 'https://ppa.launchpadcontent.net/liujianfeng1994/panfork-mesa/ubuntu bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://ppa.launchpadcontent.net/liujianfeng1994/rockchip-multimedia/ubuntu bookworm Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

 

 

Is there a way for me to use these repos on my OS (standard Orange Pi release of Debian)? I thought that as I am running Debian bookworm and the guide is for armbian bookworm, then it should work OK?

 

I am also unable to install the ubuntu-desktop repo.

 

Am I out of luck? Or is there a way around this?

Edited by benadamson
Posted (edited)

Home assistant can be run from any platform that supports docker.

 

Kodi also has a headless docker container from Linuxserver.io

 

Docker is an incredible tool that allows you to run almost anything from a preconfigured container.

 

Edited by Michael Robinson
Posted

Hi, I have problem with Kodi in new version Armbian 24.5.1 Noble Gnome.

Kodi freeze when I trie to add objects to library.

Is there any solutions?

Thanks to all

 

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