4K HEVC/H.265 video playback choppy

I know the Pi 4 is supposed to be able to play 4K H.265 video but the best I can get is very choppy low framerate in MPV like hardware decoding is not working, the framerate doesn’t look more than 5. How does one achieve the specified 4K H.265 video playback that the Pi 4 is capable of or is it not possible in Manjaro?

GPU h.265 / h.264 HW decoding can only be done with kodi-rpi or kodi-rpi-git and not within a DE. Install / configure so it will boot straight into kodi as described here in post #1:

https://forum.manjaro.org/t/arm-stable-update-2022-07-10-qt5-pulseaudio-plasma-5-25-plasma-mobile-gear-and-kernels/116301

Here are the stats in kodi while playing a short test NASA UHD clip I took off my satellite system:

1 Like

Thanks, I’m trying the git version, you don’t actually need to enable and disable the login services there’s an option on the bottom left of the login screen where you enter your password.
It opens the files but I just get a blank screen instead of the video when playing 4k files, I made the necessary tweaks to config.txt and its overclocked to 2100 CPU and 750 GPU, even 1080 files aren’t very smooth and have tearing.

Sounds like you did not follow the guide. You should be booting straight into kodi with no password. Kodi will not work properly with in a graphical environment.

You evidently left out the steps to disable your present window manager and enable kodi.service. My steps would be:

sudo disable lightdm.service
sudo enable kodi.service
sudo reboot

Yes I know I said there’s an option on the login screen on the bottom left have a look for your self, it allows you to login using Plasma(in my case) or Kodi.

And I am telling you are not supposed to be booting to what you are booting to. You should be booting straight into kodi and see no login at all.

lightdm doesn’t exist, is it sddm I need to disable?

Yes.

sudo disable sddm.service
sudo enable kodi.service
sudo reboot

To go back to where you were after you are through with kodi:

sudo disable kodi.service
sudo enable  sddm.service

Also reverse the changes made in config.txt then reboot.

These kodi-rpi* packages was designed to be a standalone media server but there are ways around it.

Now 4K HEVC videos play but are corrupt/blocky and choppy and the display keeps reinitializing while playing but 1080 videos seem fine.

Show me your complete config.txt.

#gpu_mem=512
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
disable_overscan=1

#enable sound
dtparam=audio=on
#hdmi_drive=2

#enable vc4
dtoverlay=vc4-kms-v3d
#max_framebuffers=2
disable_splash=1
hdmi_enable_4kp60=1

over_voltage=6
arm_freq=2100
gpu_freq=750

Not enough video memory for your 4K monitor. Make this change on the dtoverlay=vc4-kms-v3d line. Also with your monitor you may have to add the line force_turbo=1 If video breaks with hdmi_enable_4kp60=1.

#enable vc4
dtoverlay=vc4-kms-v3d,cma-512
#max_framebuffers=2
disable_splash=1
hdmi_enable_4kp60=1
force_turbo=1

It hangs on “starting Terminate Plymouth Boot Screen” for a while before Kodi loads, anyway it’s playing 4K HEVC smoothly now, wont play 4K H.264 though but its not specified for that so I don’t expect it to.
Thanks for helping.

@CommanderLake Hold on. You have missed a config line in config.txt.

#enable vc4
dtoverlay=vc4-kms-v3d,cma-512
disable_fw_kms_setup=1
#max_framebuffers=2
disable_splash=1
hdmi_enable_4kp60=1
force_turbo=1

Applied, thanks.

1 Like

Now I have another problem, I have no audio and no passthrough of DTS etc. shall I create another thread?

Most likely this is your issue:

https://forum.manjaro.org/t/additional-arm-packages/10132/225

FYI: I am now compiling the latest kodi-rpi-git and if it tests out ok I will push the new 4 packages to the unstable branch within a hour. My time is short today as it is my going to town for groceries day.

I dont have pipewire, only pulseaudio.

I have no clue ATM then. Maybe @bogdancovaciu has an idea. He uses kodi-rpi all of the time. I am fixing to test the latest kodi-rpi-git and then go to town.

Another though is one time the headphone jack was picked by default and I had to change it in kodi’s settings.

Hey, no Pi device here and as an ARM device i only have the pinephone. Maybe there is another team member you wanted to refer too? :smiley: