Kodi 19 HEVC 64 Bit RPi 4 Test Packages

It looks like Things are starting to turn around for HW decoding with Kodi 19 and the latest kernel for the 64 bit Rpi OS. Credit @graysky at the arch-arm forums for putting together a PKGBUILD so I could build these kodi packages.

Install xf86-video-fbturbo-git need to be in framebuffer mode.

Download, unpack and install the kodi packages using the link below.

Then switch to the unstable branch and install the latest kernel and also grab the 2 latest raspberrypi-bootloader packages while you are there. Then switch back to what ever branch you were on originally.

Config.txt (change/add):

#gpu_mem=???                    # Change to this if 64 is there

#enable vc4
dtoverlay=vc4-fkms-v3d, cma-384       # Add ", cma-284" Value may have to be higher
max_framebuffers=2
dtoverlay=rpivid-v4l2                             # Add this line here

Download s sample HEVC clips to test. A good place is here. (They do not have sound). I was able to play up to this one with ease.(jellyfish-110-mbps-hd-hevc.mkv). I was unable to play any 10bit vids on that page:

https://jell.yfish.us/

Reboot the pi4 and log in.

Since this kodi will only work outside of a desktop enviourment you need to exit to a terminal and login:

CTRL-ALT-F2
login
type kodi to start the program

In kodi yoy go where movies is on your sidebar and set up the directory where you
where you have your test movie then back out and look for your movie directory you set up to play the movie.

To get back to your DE:

CTRL-ALT-F7

Note:

This is HW decoding only for HEVC (h265). All other formats will use SW decoding.
This will not start in a DE. You will get a “Can not create a GUI” error.
Type “O” in kodi while pkaying to get the video stats:

UPDATED PACKAGES:

md5sum:
94e780195eff646b97662d47ae5db479 kodi.tar

https://drive.google.com/file/d/1an57rAdAB6syg9SI7B-3Oc12IGYs2z6g/view?usp=sharing

4 Likes

Hi,

I installed the last version of Manjaro ARM today on my RPI 4.
I also installed Kodi 19 RC1 from alarm repo.

I can’t get HW acceleration working for HEVC video or for h264 either.
I also installed xf86-video-fbturbo-git from alarm repo but i do not see any changes.

For sure, i can play HEVC video within Kodi but when i enable DRM Prime, i only have SW decoding.
It’s not smooth when i play jellyfish-110-mbps-hd-hevc.mkv and any 10 bits HEVC video does not play, i have sound only.

I do not really know how to do know.
In your point of view, what would be a good start to try to see what is happening wrong ?
At least, i would like to have HW decoding.

Thanks for any help

On the surface it looks like you have the wrong kodi installed. I do not see the right one here in our repo and we sync with theirs. The right kodi you can not launch from with in a Desktop environment.

I do have one I compiled a couple of weeks ago but I will have to test to see if any libs upgraded that broke it or I will have to recompile.

I was getting HW decoding on jellyfish-120-mbps-4k-uhd-h264.mkv and a nasa hevc clip I got off my satellite. I never got 10-bit nothing to play though.

I have been busy preparing for a winter storm so hopefully I can get around to checking out the kodi here and posting a link to the packages.

Hi Darksky,

In fact, i installed Kodi from Arch ARM repo :
kodi-rpi, kodi-rpi-git-dev, kodi-rpi-git-eventclients, kodi-rpi-git-tools-texturepacker

→ They are from the archlinuxarm mirror (alarm repo)

This is Kodi 19 RC1. Indeed, as you said, i do not lauch it from XFCE, i can’t, i have a message saying that i can’t create a GUI. To lauch it, i do ctrl-alt F2 → login → then i type kodi.

Maybe it’s not a good Kodi version.
But still, as i am not an expert, could you tell me i you would do to check if i have a right modules running related to video decoding ?

Here is the content of my /boot/config.txt

gpu_mem=256
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtoverlay=hifiberry-digi-pro

#enable vc4
dtoverlay=vc4-fkms-v3d,cma-384
max_framebuffers=2
dtoverlay=rpivid-v4l2
disable_fw_kms_setup=1

Looks good to me if you have xf86-video-fbturbo-git installed. Which kernel are you running. You probably need to be on linux-rpi4-mainline.

uname -a
Linux manjaroarm 5.4.83-1-MANJARO-ARM #1 SMP PREEMPT Mon Dec 14 08:37:33 CST 2020 aarch64 GNU/Linux

Do a pacman -Syu and make sure all is up to date then install the linux-rpi4-mainline package kernel 5.10.

Editing I was wrong

What ?
That is so strange, because i installed the following image : Manjaro-ARM-xfce-rpi4-20.12.1.img
I got the kernel i told you in my previous message.
I think i am lost :frowning: could you please pray for me before to go to bed ?

Edited my last post. Try kernel 5.10.

Ah ok, that is what i was afraid of.
How can i do to change the kernel ? There is no tool to do that in xfce as you can have in the amd64 version.

Backup your /boot/config.txt
sudo pacman -Syy
sudo pacman -S linux-rpi4-mainline
restore your /boot/config.txt then reboot

Ok thanks, i will do that.
On top of that, i realize i can see the kernel within pamac as well

Here are a 1 pic showing hw decoding.

BTW, do you use also MESA for openGL within Kodi ?
This is the default driver, i did not change anything for that

I changed nothing but config.txt and and installed fbturbo. I did try arch-arm version but it was flawed and would not play h264 at the time. So I went to where they got their tree (popcornmix’s repo) and recompiled his. Since then I found that his tree was not right and could not compile some needed addons so I merged popcornmix’s tree with the latest kodi tree to have my addons a couple of weeks ago.

I am uploading my packages for you right now for you test if they are still good to save me some time. They will either loadup or not load up. They were made jan 15 so hopefully they are still good.

Download tarball
cd kodi
tar -xf kodi.tar
sudo pacman -U *.zst

Updated packages in post #27

kodi.tar

If it works I compiled some addons so you can view some of the video addons that comes with kodi.

ctrl-alt F2 gets you to the login prompt and ctrl-alt F7 gets you back to your desktop.

I changed the Kernel as you told me.
This is fine now, i get HW decoding for h264 and h265.
h265 10 bits are playing perfectly.

But the issue i have now, for h264 or h265 i can’t zoom on video.
Indeed, i like to reduce the black borders, i usually zoom video to 1.10. When i do so now, there is like flickering (i do not know if this is the right word, english is not my native language).

Anyway, I will try to keep doing some tests, espacially with HDR content, because there was issues in Kodi 18.x with HDR contents, the video colors were not rights

Oh, thanks a lot, i will try your version as well for sure.
I will tell you how it works
Thanks

I uninstalled the version i had and then, i installed the one you uploaded.
I get this error message :
$ kodi
/usr/lib/kodi/kodi-gbm: error while loading shared libraries: libdav1d.so.4: cannot open shared object file: No such file or directory

Then, i did :

$ sudo find / -name libdav1d.so*
/usr/lib/libdav1d.so
/usr/lib/libdav1d.so.5.0.0
/usr/lib/libdav1d.so.5

So i guess, i had a versioning issue, but do not know exactly what do do now.