fruitoftheloom
Posts: 27226
Joined: Tue Mar 25, 2014 12:40 pm

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 11:37 am

.
OSMC have released an update on their plans for Kodi 19 running on their Debian based Distro:

https://osmc.tv/2021/02/kodi-v19-matrix ... d-to-know/


This release will see the introduction of Raspberry Pi 4 / Pi400 support as well as a significant upgrade to the video stack for Vero 4K/4K+ devices. Raspberry Pi 0/1 and the Vero 2 will no longer be supported, but older versions of Kodi (up to v18.9) will still be available for download on the OSMC website for the foreseeable future.
Take what I advise as advice not the utopian holy grail, and it is gratis !!

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 11:47 am

Hello,

My Raspberry Pi 4B 2GB has just been updated with the 5.10 kernel (5.10.11-v7l+). Since then, I can no longer play my HEVC videos with Kodi 18.7. The sound is correct but the screen only shows green "patterns". I have to stop the video quickly, otherwise Kodi freezes. (FYI, I followed the guidelines mentioned in the first post.)

Here is an example of a log: https://paste.kodi.tv/ayonorohuv.kodi

After returning to the old Kernel (5.4.83-v7l+), everything works again.

Do you have an idea ?
A solution ?

Thanks in advance.

User avatar
DougieLawson
Posts: 41687
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 12:19 pm

Franck3679 wrote:
Mon Mar 01, 2021 11:47 am
Do you have an idea ?
A solution ?
Does it fail with the 5.10.17 kernel (that you can get with sudo rpi-update)?
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 1:41 pm

DougieLawson wrote:
Mon Mar 01, 2021 12:19 pm
Does it fail with the 5.10.17 kernel (that you can get with sudo rpi-update)?
Thanks for the idea ... but same problem ...

User avatar
DougieLawson
Posts: 41687
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 1:52 pm

In that case you need to provide more details of how it fails for you.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 2:12 pm

I can try, but what kind of information should I share?

I provided the Kodi log above and tried to describe the behavior during playback: "The sound is correct but the screen only shows green patterns. I have to stop the video quickly, otherwise Kodi freezes."

Kodi has been installed / configured as shown in the first post (Raspberry Pi OS Lite).

At this moment, I don't know what to say more. Anyway, thank you for your interest in my question.

User avatar
DougieLawson
Posts: 41687
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 2:38 pm

Kodi logs out a whole bunch of diagnostics when it starts up and a whole bunch more when it fails.

Posting "It fails" helps nobody if you don't also post the evidence of how it fails.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 3:45 pm

I tried to get a more interesting log, but I don't think I got it: https://paste.kodi.tv/yalolocaga.kodi

The log corresponds to the following actions:
  • Kodi launch.
  • Navigation to the video.
  • Video playback (the screen turns green and the sound is normal, then very quickly the screen freezes and the sound cuts out, then nothing changes).
  • Stop the video via the remote control (the screen becomes completely black and nothing more happens).
  • Kodi stop by "sudo systemctl stop kodi" (command which ends with a timeout then a kill).
Attachments
kodi_green.jpg
kodi_green.jpg (81.96 KiB) Viewed 4847 times

timothyjward
Posts: 6
Joined: Wed Jan 20, 2021 9:10 pm

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 9:47 pm

Right, based on feedback in this thread I have given up on trying to use the Debian sources to build a deb, and have just run the build in a container and packaged up the build output.
I can see that Kodi solves the ffmpeg version problem by including ffmpeg 4.3 as part of its build, and I get a kodi-gbm executable.

Unfortunately I’m still having issues. Initially I found that the performance was terrible. The UI ran at 100-150% CPU, and h264 encoded SD video runs at about 1fps with 300+% CPU.

I googled a bit and tried switching to the full kms mode

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-384
but that left my pi 4 non bootable with a kernel panic

Switching back to fins and Adding:

Code: Select all

dtoverlay=rpivid-v4l2
Made things much better (UI running with 10% CPU) but the h264 video froze and kodi locked up after a few seconds.

I’ve also found that HEVC encoded HD (1080P) content which used to play fine in Kodi 18.7 (default raspbian version) now causes Kodi to crash.

I’m on the latest “released” kernel 5.10.11.

If there is any helpful data I can collect then please let me know. I’m guessing that I either need to upgrade kernel, downgrade kernel, change my overlay settings, or some combination of these things.

Rascas
Posts: 751
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 10:46 pm

timothyjward wrote:
Mon Mar 01, 2021 9:47 pm
Right, based on feedback in this thread I have given up on trying to use the Debian sources to build a deb, and have just run the build in a container and packaged up the build output.
I can see that Kodi solves the ffmpeg version problem by including ffmpeg 4.3 as part of its build, and I get a kodi-gbm executable.

Unfortunately I’m still having issues. Initially I found that the performance was terrible. The UI ran at 100-150% CPU, and h264 encoded SD video runs at about 1fps with 300+% CPU.

I googled a bit and tried switching to the full kms mode

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-384
but that left my pi 4 non bootable with a kernel panic

Switching back to fins and Adding:

Code: Select all

dtoverlay=rpivid-v4l2
Made things much better (UI running with 10% CPU) but the h264 video froze and kodi locked up after a few seconds.

I’ve also found that HEVC encoded HD (1080P) content which used to play fine in Kodi 18.7 (default raspbian version) now causes Kodi to crash.

I’m on the latest “released” kernel 5.10.11.

If there is any helpful data I can collect then please let me know. I’m guessing that I either need to upgrade kernel, downgrade kernel, change my overlay settings, or some combination of these things.
If you want to compile Kodi 19 for the RPi, you shouldn't grab the debian tarballs, it doesn't matter if it is from stable, testing or unstable. That is because Debian ARM Kodi, is a generic version, not optimized for any platform, so it doesn't support Hardware video decoding and other stuff. It is from Kodi github master branch which still doesn't support it.
If you want to compile Kodi for the RPi, grab the code from here: https://github.com/popcornmix/xbmc/tree/gbm_matrix
And for a basic build, follow the instructions here: viewtopic.php?p=1824600#p1824600
If you have any questions/doubts/whatever about it, you should ask in Kodi official forums because they know better.

PS: Kodi should always be compiled with ffmpeg statically not dinamically, because of compatibility issues. Thats their recommendation.

Rascas
Posts: 751
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Mon Mar 01, 2021 11:20 pm

timothyjward wrote:
Mon Mar 01, 2021 9:47 pm
I googled a bit and tried switching to the full kms mode

Code: Select all

dtoverlay=vc4-fkms-v3d,cma-384
That is fake kms mode, currently the default on the RPi 4. cma is a kind of shared memory, there is some topics here in this forum explaining what it does. Full KMS or simply KMS is "dtoverlay=vc4-kms-v3d"
timothyjward wrote:
Mon Mar 01, 2021 9:47 pm
Switching back to fins and Adding:

Code: Select all

dtoverlay=rpivid-v4l2
This only applies for Kodi 19, Kodi 18 doesn't use v4l2 but mmal, so it doesn't change a thing on Kodi 18.

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Tue Mar 02, 2021 9:58 am

Franck3679 wrote:
Mon Mar 01, 2021 3:45 pm
I tried to get a more interesting log, but I don't think I got it: https://paste.kodi.tv/yalolocaga.kodi

The log corresponds to the following actions:
  • Kodi launch.
  • Navigation to the video.
  • Video playback (the screen turns green and the sound is normal, then very quickly the screen freezes and the sound cuts out, then nothing changes).
  • Stop the video via the remote control (the screen becomes completely black and nothing more happens).
  • Kodi stop by "sudo systemctl stop kodi" (command which ends with a timeout then a kill).
FYI, my problem seems to me to be related to this:
https://github.com/raspberrypi/linux/issues/4112
https://github.com/raspberrypi/linux/issues/4167

timothyjward
Posts: 6
Joined: Wed Jan 20, 2021 9:10 pm

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Tue Mar 02, 2021 1:24 pm

Rascas wrote:
Mon Mar 01, 2021 10:46 pm

If you want to compile Kodi 19 for the RPi, you shouldn't grab the debian tarballs, it doesn't matter if it is from stable, testing or unstable. That is because Debian ARM Kodi, is a generic version, not optimized for any platform, so it doesn't support Hardware video decoding and other stuff. It is from Kodi github master branch which still doesn't support it.

If you want to compile Kodi for the RPi, grab the code from here: https://github.com/popcornmix/xbmc/tree/gbm_matrix
And for a basic build, follow the instructions here: viewtopic.php?p=1824600#p1824600
If you have any questions/doubts/whatever about it, you should ask in Kodi official forums because they know better.

PS: Kodi should always be compiled with ffmpeg statically not dinamically, because of compatibility issues. Thats their recommendation.
Thanks for the heads up about the Debian version. I did already switch to the official sources listed in the build instructions (https://github.com/xbmc/xbmc/archive/19.0-Matrix.tar.gz) for the builds I'm seeing issues with.

I see that you're now suggesting a branch in a fork made by popcornmix, which I can check out and try building, but I'm still not sure whether there are kernel or dtoverlay issues that I'm also hitting.

Just for my piece of mind, is there a Kodi 19 binary likely to appear in the raspbian repo any time soon? I'm prepared to put a bit of time into making this work, but I'm certain that if someone who actually knows what they're doing were to try they could create a working .deb and deploy it to the raspbian repo much faster than I can get this working!

Rascas
Posts: 751
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Wed Mar 03, 2021 12:23 pm

timothyjward wrote:
Tue Mar 02, 2021 1:24 pm
Rascas wrote:
Mon Mar 01, 2021 10:46 pm

If you want to compile Kodi 19 for the RPi, you shouldn't grab the debian tarballs, it doesn't matter if it is from stable, testing or unstable. That is because Debian ARM Kodi, is a generic version, not optimized for any platform, so it doesn't support Hardware video decoding and other stuff. It is from Kodi github master branch which still doesn't support it.

If you want to compile Kodi for the RPi, grab the code from here: https://github.com/popcornmix/xbmc/tree/gbm_matrix
And for a basic build, follow the instructions here: viewtopic.php?p=1824600#p1824600
If you have any questions/doubts/whatever about it, you should ask in Kodi official forums because they know better.

PS: Kodi should always be compiled with ffmpeg statically not dinamically, because of compatibility issues. Thats their recommendation.
Thanks for the heads up about the Debian version. I did already switch to the official sources listed in the build instructions (https://github.com/xbmc/xbmc/archive/19.0-Matrix.tar.gz) for the builds I'm seeing issues with.

I see that you're now suggesting a branch in a fork made by popcornmix, which I can check out and try building, but I'm still not sure whether there are kernel or dtoverlay issues that I'm also hitting.

Just for my piece of mind, is there a Kodi 19 binary likely to appear in the raspbian repo any time soon? I'm prepared to put a bit of time into making this work, but I'm certain that if someone who actually knows what they're doing were to try they could create a working .deb and deploy it to the raspbian repo much faster than I can get this working!
It is not likely that it will appear soon.

Rascas
Posts: 751
Joined: Tue Mar 11, 2014 6:18 pm
Location: Porto, Portugal
Contact: Website

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Wed Mar 03, 2021 12:25 pm

Franck3679 wrote:
Tue Mar 02, 2021 9:58 am
Franck3679 wrote:
Mon Mar 01, 2021 3:45 pm
I tried to get a more interesting log, but I don't think I got it: https://paste.kodi.tv/yalolocaga.kodi

The log corresponds to the following actions:
  • Kodi launch.
  • Navigation to the video.
  • Video playback (the screen turns green and the sound is normal, then very quickly the screen freezes and the sound cuts out, then nothing changes).
  • Stop the video via the remote control (the screen becomes completely black and nothing more happens).
  • Kodi stop by "sudo systemctl stop kodi" (command which ends with a timeout then a kill).
FYI, my problem seems to me to be related to this:
https://github.com/raspberrypi/linux/issues/4112
https://github.com/raspberrypi/linux/issues/4167
Yes, it looks like. I recommend that you report your problem there too. More people reporting, more likely that they fix it.

BIGF2
Posts: 1
Joined: Thu Mar 04, 2021 8:04 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Thu Mar 04, 2021 8:35 am

Franck3679 wrote:
Tue Mar 02, 2021 9:58 am
Franck3679 wrote:
Mon Mar 01, 2021 3:45 pm
I tried to get a more interesting log, but I don't think I got it: https://paste.kodi.tv/yalolocaga.kodi

The log corresponds to the following actions:
  • Kodi launch.
  • Navigation to the video.
  • Video playback (the screen turns green and the sound is normal, then very quickly the screen freezes and the sound cuts out, then nothing changes).
  • Stop the video via the remote control (the screen becomes completely black and nothing more happens).
  • Kodi stop by "sudo systemctl stop kodi" (command which ends with a timeout then a kill).
FYI, my problem seems to me to be related to this:
https://github.com/raspberrypi/linux/issues/4112
https://github.com/raspberrypi/linux/issues/4167
Add

Code: Select all

cma=250M

At the end of cmdline.txt in boot this will fix it I also have this problem I spend days trying to Google a solution but nothing, I found this solution from the first GitHub link you posted https://github.com/raspberrypi/linux/issues/4112

The problems seems to be in the latest kernel, they removed a method kodi used to allocate memory for HEVC in the kodi log you will see it having memory allocation timeouts

Btw I have a RPI3 and this solution work for me but I just went back and read that GitHub issue and it seems to be someone with a RPI4 still have problems even with the above mention fix

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Thu Mar 04, 2021 10:44 am

Rascas wrote:
Wed Mar 03, 2021 12:25 pm
Yes, it looks like. I recommend that you report your problem there too. More people reporting, more likely that they fix it.
It is done.

Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Fri Mar 05, 2021 11:51 am

DVB-T2 HEVC streams (1080p 50fps) from the TV-HAT are still playing fine here on an updated RPI4.

And I don't see problems on these files:
https://x265.com/hevc-video-files/

So I guess the problem is in some HEVC files.

Is there an example file that does not work?

Also Franck3679, can you play those problematic files in VLC? Do they show green artifacts?

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Fri Mar 05, 2021 6:55 pm

BIGF2 wrote:
Thu Mar 04, 2021 8:35 am
Add

Code: Select all

cma=250M

At the end of cmdline.txt in boot this will fix it I also have this problem I spend days trying to Google a solution but nothing, I found this solution from the first GitHub link you posted https://github.com/raspberrypi/linux/issues/4112
Thanks BIGF2 for this potential solution. Unfortunately, it doesn't work for me.

Franck3679
Posts: 8
Joined: Mon Mar 01, 2021 10:55 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Fri Mar 05, 2021 6:58 pm

Aardappeltaart wrote:
Fri Mar 05, 2021 11:51 am
Also Franck3679, can you play those problematic files in VLC? Do they show green artifacts?
No green artifacts with VLC.

Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Sun Mar 07, 2021 11:01 am

bscphil wrote:
Mon Feb 22, 2021 8:44 am

(I actually built it using systemd-nspawn on a server with qemu, so the Pi was not involved in the build process for me at all.)

Trying to cross-compile it myself, not succeeding yet, can you elaborate a bit on how to do that with systemd-nspawn?
BTW using Ubuntu 20.10 here, and I'm totally new to systemd-nspawn.

allo0osh
Posts: 1
Joined: Wed May 13, 2020 3:09 pm

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Thu Mar 18, 2021 10:31 pm

bscphil wrote:
Mon Feb 22, 2021 8:44 am
Rascas wrote:
Sun Feb 21, 2021 10:56 pm
Oh, and I was forgetting the thing that bothers me the most on the RPi 4. You can't seek h264. This is a problem that begun with the first versions of Kodi 19 abd still hasn't a solution. Well it is has a workaround which to disable hardware decoding for h264....
Hmm. I'm not seeing this issue. I assume you mean when you're playing a film and you pull up the interface with your remote or control device, and highlight the progress bar, you're not able to drag it to the left or right? It works fine for me, with the Kodi 19.0 release version. There's a ton of jank for 5-10 seconds as the video "resyncs" (they don't "pause and rebuffer", which I think was the previous default?), but it does work for me.

In any case I agree with your other statements, especially HDR. I predicted that would be a long time coming when the Pi 4 was released and unfortunately turned out to be right on that point. Couple that with my issues decoding VP9 and the occasional frame drop... overall my experience using the Pi 4 as a media platform has not been fantastic.

Anyway, I want to thank you for your hard work in building and distributing Kodi for the Pi over the years. You're certainly not obligated to continue doing that.

All that said, I did get a 19.0 build working pretty easily. The Pi build has been merged with their standard Linux GBM build so it all sort of just works now with no patches. Performance seems pretty good so far but I haven't tested extensively.

Basic instructions (assumes you've followed the rascas guidelines before, e.g. adding the pi user to the right groups, etc.).

Code: Select all

sudo apt install                                                     \
autoconf automake autopoint autotools-dev cmake cpp curl default-jre \
g++ gawk gcc gdc gettext gperf libasound2-dev libass-dev             \
libavahi-client-dev libavahi-common-dev libbluetooth-dev             \
libbluray-dev libbz2-dev libcdio-dev libcec4 libcec-dev              \
libcrossguid-dev libcurl4-openssl-dev libcwiid-dev libdbus-1-dev     \
libdrm-dev libegl1-mesa-dev libenca-dev libflac-dev libfmt3-dev      \
libfontconfig-dev libfreetype6-dev libfribidi-dev libfstrcmp-dev     \
libgbm-dev libgcrypt-dev libgif-dev libgles2-mesa-dev libglew-dev    \
libglu1-mesa-dev libgnutls28-dev libgpg-error-dev libgtest-dev       \
libinput-dev libiso9660-dev libjpeg-dev liblcms2-dev liblirc-dev     \
libltdl-dev liblzo2-dev libmariadb-dev libmicrohttpd-dev libnfs-dev  \
libogg-dev libomxil-bellagio-dev libpcre3-dev libplist-dev           \
libpng-dev libpulse-dev libshairplay-dev libsmbclient-dev            \
libsqlite3-dev libssl-dev libtag1-dev libtiff5-dev libtinyxml-dev    \
libtool libudev-dev libunistring-dev libva-dev libvdpau-dev          \
libvorbis-dev libxkbcommon-dev libxmu-dev libxrandr-dev libxslt1-dev \
libxt-dev lsb-release meson nasm ninja-build python3-dev python3-pil \
python-support rapidjson-dev swig unzip uuid-dev wayland-protocols   \
yasm zip zlib1g-dev

wget https://github.com/xbmc/xbmc/archive/19.0-Matrix.tar.gz
tar xf 19.0-Matrix.tar.gz
mkdir kodi-build && cd kodi-build

cmake ../xbmc-19.0-Matrix -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCORE_PLATFORM_NAME=gbm -DAPP_RENDER_SYSTEM=gles \
-DX11_RENDER_SYSTEM=gles -DENABLE_INTERNAL_FMT=ON \
-DENABLE_INTERNAL_FLATBUFFERS=ON \
-DENABLE_INTERNAL_SPDLOG=ON

cmake --build . -- VERBOSE=1 -j$(getconf _NPROCESSORS_ONLN)
This is mostly based on this forum thread. If you get a failure in the configure or linking stages let me know, there's probably a library I'm missing and I can update the instructions accordingly.

Note: I strongly recommend not building this directly on the Pi with an SD card. The dependencies and source code alone will run close to a GB of data, and compiling software uses a lot of IO so this will put heavy stress on your card. I wouldn't expect it to survive the trip. Use an external disk or netbooted Pi instead. (I actually built it using systemd-nspawn on a server with qemu, so the Pi was not involved in the build process for me at all.)

If you're building this yourself I don't really see a point in installing it, so I've left out that step. You can just run it directly from the kodi-build folder. I suggest making a backup of your config (~/.kodi) before running it the first time just to be safe. (If you do decide to install it don't forget to remove the existing Kodi packages first.)

I could make a deb pretty easily if there's a ton of interest, but you probably shouldn't be trusting me anyway, I'm just a random person on a forum! And I'm not sure I want the responsibility of updating it for point releases...
thanks for the easy solution. searched the whole internet to find a way to build kodi easily. but after build, it cant create GUI and prints this error:
"ERROR: Unable to create GUI. Exiting"
searched for the solution but gained nothing. I enabled/disabled the kms, fkms, and changed cma memory but no difference. this is my /boot/config.txt :
"
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
#dtoverlay=vc4-kms-v3d-pi4
#max_framebuffers=2
dtoverlay=vc4-fkms-v3d,cma-512
#[all]
#dtoverlay=vc4-fkms-v3d-pi4
#dtoverlay=rpivid-v4l2
#gpu_mem=512
hdmi_enable_4kp60=1
"
changed lot of options with comments. and the kodi didn't run. do you know what problem is? and this is my uname -a
Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l GNU/Linux

User avatar
Niccolo
Posts: 25
Joined: Mon Dec 14, 2015 8:45 am
Contact: Website

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Tue Mar 30, 2021 3:02 pm

I have problem with jerky playback of MPEG-4 videos.

The problem is with RaspiOS 10.8 Buster running Kodi 18.7: I have several 1366x768 pixel videos, encoded by the XviD library at 6000 kbit/s (about 3 Gb per hour). The videos played nicely with my Rasperry Pi 3, but goes jerky on the Pi 4. On the same hardware I tried LibreELEC 9.2 and LibreELEC 10.0 Beta which play the same videos smoothly. Videos of the same size/bitrate, but encoded with H264 play nicely.

Video system info are about the same in RaspiOS and LibreELEC:

Code: Select all

GPU: V3D 4.2
Screen resolution: 1360x768@60.00Hz - Full screen
OpenGL vendor: Broadcom
OpenGL version: OpenGL ES 3.1 Mesa 19.3.2
The video is so jerky, that in the Kodi log I get several times the error

Code: Select all

NOTICE: CVideoPlayerAudio::Process - stream stalled
I run the rpi-update which bumped the kernel to 5.10.25-v7l+, but the problem remains the same.

So I ask for some hints on how to start the debug:
  • What RaspiOS image do you suggest for a fresh reinstall?
  • Is launching kodi-standalone from the console the best way to check Kodi performances?
  • Can I install some RaspiOS or Kodi alternative versions to test for regressions or alike?
P.S. I opened a thread here, but it seems that this thread is actively followed, so I ask help here.

Aardappeltaart
Posts: 168
Joined: Wed Mar 02, 2016 11:32 am

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Thu Apr 01, 2021 8:27 am

Niccolo wrote:
Tue Mar 30, 2021 3:02 pm
I have problem with jerky playback of MPEG-4 videos.

The problem is with RaspiOS 10.8 Buster running Kodi 18.7: I have several 1366x768 pixel videos, encoded by the XviD library at 6000 kbit/s (about 3 Gb per hour). The videos played nicely with my Rasperry Pi 3, but goes jerky on the Pi 4. On the same hardware I tried LibreELEC 9.2 and LibreELEC 10.0 Beta which play the same videos smoothly. Videos of the same size/bitrate, but encoded with H264 play nicely.

Video system info are about the same in RaspiOS and LibreELEC:

Code: Select all

GPU: V3D 4.2
Screen resolution: 1360x768@60.00Hz - Full screen
OpenGL vendor: Broadcom
OpenGL version: OpenGL ES 3.1 Mesa 19.3.2
The video is so jerky, that in the Kodi log I get several times the error

Code: Select all

NOTICE: CVideoPlayerAudio::Process - stream stalled
I run the rpi-update which bumped the kernel to 5.10.25-v7l+, but the problem remains the same.

So I ask for some hints on how to start the debug:
  • What RaspiOS image do you suggest for a fresh reinstall?
  • Is launching kodi-standalone from the console the best way to check Kodi performances?
  • Can I install some RaspiOS or Kodi alternative versions to test for regressions or alike?
P.S. I opened a thread here, but it seems that this thread is actively followed, so I ask help here.
RPI4 with Buster did play all files fine here in Kodi with kernel 5.4.

The 5.10 update did bring a regression for some file(formats), e.g. HEVC. There are a lot of changes in 5.10 for the video drivers.
I guess an update to Kodi 19 is needed the restore performance.

Kodi is AFAIK not maintained by RPI engineers in RaspiOS, but by Rascas, who did a great job, but is using a RPI3+ I believe, for which HEVC-support is completely lost in kernel 5.10 for the time being.

Try to build 19, and see if that improves.

Or try the old kernel, as suggested here Please read that complete thread so you know what you're doing. Using an older kernel in Buster is a workaround not a solution IMHO.

MechNTech
Posts: 4
Joined: Fri Oct 20, 2017 8:54 pm

Re: [Guide] Kodi on Raspberry Pi OS / Raspbian Buster

Wed Apr 07, 2021 12:23 am

When I compile for the pi 4 with new raspberry pi os kernel, I get "libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)" what can I do different to fix this? I first blindly followed the install instructions here. Then picked different options. I believe I just put gbm and gles.

Return to “Raspberry Pi OS”