Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30fps

Raspberry Pi 2

Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30fps

Postby procobain » Thu Jul 22, 2021 10:15 pm

My Raspberry Pi 4 2gb doesn't play 1080p60fps or 2160p30fps videos, even using a new kodi config.

I'm using Arch armv7l, I just installed Kodi (19.1-10). It does not play video files over network or SD card (Lexar 1066x 160mb/s read, 120mb/s write).

Tested with Twitch-Addon, streaming with 1080p 60fps, Desync.

Files over LAN and written to sd card, performance is the same.

bbb_sunflower_1080p_30fps_normal - Works normally.
bbb_sunflower_1080p_60fps_normal - Desync
bbb_sunflower_2160p_30fps_normal - Does not open
bbb_sunflower_2160p_60fps_normal - Does not open
jellyfish-60-mbps-hd-h264 - Desync
jellyfish-60-mbps-hd-hevc-10bit - Does not open
jellyfish-400-mbps-4k-uhd-hevc-10bit - Does not open

my config.txt

$this->bbcode_second_pass_code('', 'initramfs initramfs-linux.img followkernel
dtparam=audio=on
gpu_mem=320
dtoverlay=vc4-kms-v3d,cma-512
dtoverlay=rpivid-v4l2
disable_fw_fkms_setup=1
disable_overscan=1
')
Regards...
procobain
 
Posts: 7
Joined: Sun Jan 17, 2021 7:17 am

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby graysky » Fri Jul 23, 2021 12:10 am

Remove gpu_mem=320 ...

Which kodi package?
Can you post a link to your kodi.log with debug mode enabled?
graysky
Developer
 
Posts: 1723
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby procobain » Fri Jul 23, 2021 1:19 am

I disabled gpu_mem=320, it had the same performance.

Log: https://anotepad.com/notes/y9je86f7
procobain
 
Posts: 7
Joined: Sun Jan 17, 2021 7:17 am

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby graysky » Fri Jul 23, 2021 7:00 pm

You appear to be running kodi as your user likely under X11. If so, broken hw decoding is expected. You need to run kodi-gbm using the provided kodi.service.
graysky
Developer
 
Posts: 1723
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby procobain » Fri Jul 23, 2021 10:10 pm

But I'm using kodi.service, I just created a /etc/systemd/system/kodi.service.d/username.conf to run as my user.

Which line in the log did you see that the problem is not being run by gbm?

Regards

My /usr/lib/systemd/system/kodi.service


$this->bbcode_second_pass_code('', '
[Unit]
Description=Kodi standalone (GBM)
After=remote-fs.target systemd-user-sessions.service network-online.target nss-lookup.target sound.target bluetooth.target polkit.service upower.>
Wants=network-online.target polkit.service upower.service
Conflicts=getty@tty1.service

[Service]
User=paulo
Group=paulo
EnvironmentFile=-/etc/conf.d/kodi-standalone
PAMName=login
TTYPath=/dev/tty1
Environment=WINDOWING=gbm
ExecStart=/usr/bin/kodi-standalone
ExecStop=/usr/bin/killall --user paulo --exact --wait kodi.bin
Restart=on-abort
StandardInput=tty
StandardOutput=journal

[Install]
Alias=display-manager.service
')
procobain
 
Posts: 7
Joined: Sun Jan 17, 2021 7:17 am

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby graysky » Fri Jul 23, 2021 11:00 pm

I didn't read past the user name in the log... you are indeed using gbm. The kodi package also provisions the kodi user... is your user in the same groups?

See:
https://github.com/graysky2/kodi-standa ... users.conf
https://github.com/graysky2/kodi-standa ... kodi.rules
https://github.com/graysky2/kodi-standa ... lkit.rules

Also do not recommend using your user. The kodi user is unprivileged and it's generally safer to run as such.

As a simple test, try unmodifying the package and allowing it to run as the kodi user. You can copy over your ~/.kodi/ to /var/lib/kodi/ just be sure your chown -R kodi:kodi /var/lib/kodi after you do it.
graysky
Developer
 
Posts: 1723
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby procobain » Sat Jul 24, 2021 2:02 am

I saw that my user was not in the tty, input and optical groups, after adding and rebooting, the performance was the same.

I had learned on another forum to create this polkit file for my user, it only serves to give power permissions to kodi.

/etc/polkit-1/rules.d/10-kodi.rules

$this->bbcode_second_pass_code('', '
polkit.addRule(function(action, subject) {
if (subject.user == "paulo") {
polkit.log("action=" + action);
polkit.log("subject=" + subject);
if (action.id.indexOf("org.freedesktop.login1.") == 0) {
return polkit.Result.YES;
}
if (action.id.indexOf("org.freedesktop.udisks.") == 0) {
return polkit.Result.YES;
}
}
});
')
The 99-kodi.rules file I don't know. But it would only take away more rights from the user, right, I think this is not my case, my user has more rights, that would not imply performance... (I believe...)

When Arch ARM is installed, it only creates the alarm user, I'll keep my installation and try to run it with the kodi user, I'll look for a tutorial here to see if I'm not doing something wrong.

Regards.
procobain
 
Posts: 7
Joined: Sun Jan 17, 2021 7:17 am

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby graysky » Sat Jul 24, 2021 5:24 am

https://github.com/graysky2/kodi-standa ... kodi.rules

That file gives the video group access to hardware decoding. Your user needs that. The kodi packages will create the kodi user, it is not there until you install one of them.
graysky
Developer
 
Posts: 1723
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby procobain » Sat Jul 24, 2021 9:58 am

I created it in /etc/udev/rules.d/ with the name 99-kodi.rules, then changed it to 99-MYUSER.rules in both cases nothing changed...

Is there any tutorial to install Kodi on arch arm? Is there any command that I can see if I have access to the video hardware without having to play?
procobain
 
Posts: 7
Joined: Sun Jan 17, 2021 7:17 am

Re: Rasp Pi4 2gb - Kodi, does not play 1080p60fps or 2160p30

Postby graysky » Sat Jul 24, 2021 10:59 am

You install the package, edit /boot/config.txt, reboot, and start the service.

$this->bbcode_second_pass_quote('graysky', 'A')s a simple test, try unmodifying the package and allowing it to run as the kodi user. You can copy over your ~/.kodi/ to /var/lib/kodi/ just be sure your chown -R kodi:kodi /var/lib/kodi after you do it.


Please try this as a control experiment.
graysky
Developer
 
Posts: 1723
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Next

Return to Broadcom

Who is online

Users browsing this forum: No registered users and 1 guest