Jump to content

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


adr3nal1n27

Recommended Posts

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@royk Thanks for your response. I tried again with the image you linked, but same issue. Here are two kodi crashlogs: 1:1_kodi_crashlog-20240103_191538.log (This is the first crash after adding the Movies)

2: 2_kodi_crashlog-20240103_191715.log This is on of the other crashes (the crash session / restart loop is infinite, so the logs all look more or less the same)

Link to comment
Share on other sites

@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

 

Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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