RPi 4 video really laggy on Kodi 20
#1
I've been a Kodi user for years. Was running Kodi 18.7, which was the latest one on the Raspbian (Debian 10). RPi 4 is connected over HDMI directly to AV receiver. Recently bought a new AV receiver and noticed that sources with Dolby Digital+ (E-AC-3) were not outputting any audio when passthrough was enabled. As soon as I disabled passthrough for for E-AC-3 audio was working as PCM. After some googling found that Kodi 19 had some fixes related to E-AC-3 and updated to Debian 11 from where I got Kodi 19 via apt install. Now, audio started to work as expected (yay!), however all content as h.265 did not show any video, just audio. Playing h.265 content was not problematic on Kodi 18. Decided to upgrade to Debian 12 to get Kodi 20, which I'm currently running. Now video and audio is playing, but doesn't matter if source is h.265 or something else then video framerate is unbearable (feels like 10 FPS or something). Doesn't matter if source is 1080p or 4K.

In /boot/config.txt I have these lines:
dtoverlay=vc4-kms-v3d,cma-448
dtoverlay=rpivid-v4l2
hdmi_enable_4kp60=1

I've tried almost everything by now. Any ideas why these problems exist? Any suggestions what should I try next?
Reply
#2
(2023-08-20, 18:09)juuser Wrote: updated to Debian 11 from where I got Kodi 19 via apt install

Did you update to RPiOS bullseye (which is based on debian 11).
Or just to debian.

Debian won't have any Pi specific support for hardware acceleration. RPiOS will.
Reply
#3
If you use your Pi for local media only, try LibreELEC, you should be able to play hevc 4k HDR.
Reply
#4
(2023-08-21, 13:34)popcornmix Wrote: Did you update to RPiOS bullseye (which is based on debian 11).
Or just to debian.

Debian won't have any Pi specific support for hardware acceleration. RPiOS will.
TLDR; Installing clean Raspbian (buster) solved all video and audio my problems.

Longer answer:
I performed update from Raspbian (buster) by updating buster to bullseye by changing repo URL inside `/etc/apt/sources.list` from this:
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

to this:
deb http://raspbian.raspberrypi.org/raspbian/ bullseye main contrib non-free rpi

Did similar changes inside /etc/apt/sources.list.d/raspi.list and ran apt update && apt dist-upgrade. Before upgrading I backed up ~/.kodi just in case.

I assumed that this will update to RPiOS and not plain Debian, because repo URL was still raspberrypi.org and I found something like this I also in some raspberry blog article about updating.

Anyway, after eventually I had updated to bookworm and using Kodi 20 it did display Kodi Debian in the upper left corner which I understand is not correct and hints to plain Debian.

After these failed attempts I did install clean RPiOS (bullseye) and Kodi 19, restored ~/.kodi from backup and had the exact same problem as with upgrading previously from Kodi 18 to Kodi 19 - h.265 content failed to play (either without any video or stuttering when turning DRM off).

Then I installed clean Raspbian (buster) and restored ~/.kodi from the backup, because it was until that point the only version of RPiOS and Kodi (version 18), which did not have any problems of playing whatever content. For my surprise even Dolby Digital+ (E-AC-3) started to work without any modifications.
Reply
#5
(2023-08-21, 13:42)MatteN Wrote: If you use your Pi for local media only, try LibreELEC, you should be able to play hevc 4k HDR.
I've seen suggestion of using LibreELEC in multiple places - how would migration from Kodi be? What does it mean if I only use for local media only? I use my Raspberry only for Kodi and Pi-hole at this moment.
Reply

Logout Mark Read Team Forum Stats Members Help
RPi 4 video really laggy on Kodi 200