kodi hardware decoder on bullseye Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
gr00ve
Posts: 3
Joined: Sat Nov 20, 2021 11:10 am

kodi hardware decoder on bullseye

Post by gr00ve »

Good day,

currently I am struggling to get the hardware decoder working for h264 in kodi 19 on my RPi 3B.
Versions:
  • dietpi 7.8.2 (armv7l)
  • kodi 19.3 (from untested repo)
  • ffmpeg 4.3.3 (from main repo)
I added following to config.txt:
gpu_mem=128
dtoverlay=rpivid-v4l2
dtoverlay=vc4-fkms-v3d,cma-256

I enabled Prime DRM decoding and hardware acceleration in kodi, but it shows still 'SW' instead of 'HW' while playing video files.

Did I miss something? Any suggestions?
ISquishWorms
Posts: 32
Joined: Thu Jan 31, 2019 2:01 am

Re: kodi hardware decoder on bullseye

Post by ISquishWorms »

Just spotted your post, and am now wondering if this is the same problem that I am having on my Pi 3B. As Kodi playback of video files is now choppy and it worked fine previously on Buster.
ISquishWorms
Posts: 32
Joined: Thu Jan 31, 2019 2:01 am

Re: kodi hardware decoder on bullseye

Post by ISquishWorms »

There is a topic here about Kodi I am not sure if you have seen it so thought I would link it in case it is of some help.
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: kodi hardware decoder on bullseye

Post by MichaIng »

dtoverlay=rpivid-v4l2 is only relevant on RPi 4 for HEVC decoding.

gpu_mem should not be increased anymore, leave it untouched.

As long as you do not watch 4k videos on RPi 4, leave CMA size untouched as well, and use the full KMS driver instead of the fake KMS driver. So the only change on RPi 3 should be:

Code: Select all

dtoverlay=vc4-kms-v3d
and hardware acceleration with Prime DRM decoding in Kodi.
gr00ve
Posts: 3
Joined: Sat Nov 20, 2021 11:10 am

Re: kodi hardware decoder on bullseye

Post by gr00ve »

@ISquishWorms
Thank you for that hint!
The solution for me was:

Code: Select all

rm /etc/modprobe.d/dietpi-disable_rpi_camera.conf
modprobe bcm2835_codec bcm2835_v4l2 bcm2835_isp
Finally kodi uses the hardware decoder :D


@MichaIng
Thank you too.
I removed the gpu_mem, cms and rpivid-v4l2 parameters.
But I prefere to use the fake KMS as it's possible to switch the hdmi port on & off by the tvservice command.
Or is there a similar command for the KMS driver?
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: kodi hardware decoder on bullseye

Post by MichaIng »

It should be possible to keep bcm2835_isp blacklisted, probably bcm2835_v4l2 as well. Probably bcm2835_codec is the only driver required for video decoding. But good that we found the culprit in general.
gr00ve
Posts: 3
Joined: Sat Nov 20, 2021 11:10 am

Re: kodi hardware decoder on bullseye

Post by gr00ve »

Yeap, I can confirm that only bcm2835_codec is needed 8)
Post Reply