Kodi Community Forum

Full Version: [RPi4] Choppy playback for some AVC files only when using HW acceleration
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've noticed one weird issue when using my Raspberry Pi 4. I've spotted that for some AVC videos playback is choppy (it feels like playback stops/rewinds every each few seconds). This behavior occurs only when hardware acceleration is enabled. When I disable it playback is smooth.

I'm using Arch Linux ARM with following versions of packages:
1) Kodi 19.4 - https://github.com/graysky2/xbmc/tree/gs-gbm_matrix - commit 51a36cca9f6dd2bc717e41153fb2d0aa9caf11ca
2) Linux kernel - 5.15.48 - https://github.com/raspberrypi/linux - commit b34bf3273cfe492daa04fc57eb88782df1714a66
3) Firmware - https://github.com/raspberrypi/firmware - 329af8a59d91ea023ce3e2566e2ccd4ec0624438

Hopefully attached video samples will reproduce the issue:
https://drive.google.com/file/d/1LRjvM8H...w7RAf/view

If it's a wrong place to report an issue please let me know. Any other suggestions are welcome, thanks.
Got a debug log?  Run mediainfo on the clip and post here.
(2022-06-21, 20:23)dobo Wrote: [ -> ]I'm using Arch Linux ARM with following versions of packages:

Linux Arch is not really our typical Linux expertise area. Arch will typically have compiled and tweaked their own release of Kodi in their repositories., or in your case, the repo of Graysky2.

Does Kodi show it is using hw acceleration during your videos? Does LibreELEC have the same choppy problems with those videos?
Just tested the samples on LE and they played back smoothly. This was from my own build of Matrix branch.

The issue sounds like something that was fixed in ffmpeg a couple of months back.
If GraySky could identify what version of ffmpeg I can find out if it is missing the fix.
@popcornmix - Kodi Matrix on Arch ARM is using Kodi's tagged 4.3.2-Matrix-19.2 ffmpeg which is patched with an older version jc-kynesim/rpi-ffmpeg/release/4.3/rpi_main I believe.  I can kick it to use the latest one if that is the root cause of this problem.

EDIT: on my RPi4B aarch64 running out latest kodi-rpi package (19.4-4), I can play all 3 of these clips without any distortion.  This is on a 4k monitor.  Suspect something in the op's setting?

Please post /boot/config.txt and /boot/kodi.config.txt

Also please post a debug log
Sorry for late reply. I can clearly see small hiccups/stutters every few seconds. I don't have any fancy featuers enabled in the settings. The only one besides default ones is "Adjust display refresh rate" set to "Always". I've got 50 Mhz whitelisted and the video is 50 FPS. I haven't spotted any issues with other videos (and I watch TV/movies on my setup daily) - only with those samples which I've attached. Maybe they are not visible at first sight but they are annoying when watching the whole show. My TV supports 4k60 but I use 1920p50.

/boot/config.txt:
 
Code:
# See /boot/overlays/README for all available options

dtoverlay=vc4-kms-v3d,cma-512
dtoverlay=rpivid-v4l2
#dtoverlay=disable-bt
#dtoverlay=disable-wifi

initramfs initramfs-linux.img followkernel

disable_overscan=1
disable_fw_kms_setup=1

hdmi_ignore_cec_init=1

# Uncomment to enable bluetooth
#dtparam=krnbt=on

[pi4]
# Run as fast as firmware / board allows
arm_boost=1

kodi.log:
https://paste.kodi.tv/fepokosasu.kodi
There are no warnings/errors shown in the log after starting video playback. Do you want me to enable any specific debug logs?
(2022-07-20, 20:22)dobo Wrote: [ -> ]kodi.log:

2022-07-20 20:17:25.251 T:11950 INFO <general>: Disabled debug logging due to GUI setting. Level 0.

Always enable debugging in Kodi and restart the application when you are going trouble-shooting.