High CPU load and choppy playback with some files (Kodi 21.1 Android and Android TV).



This thread duplicates a issue I created on GitHub today.

When playing some videos with Kodi 21.1 Omega (Android and Android TV), there is a heavy CPU load and choppy playback (especially noticeable in scrolling and zooming scenes).
When watching on Android TV, the usual CPU load is about 30-50% (even at 4K), but when watching problematic videos, the load reaches 350% (even if the video is 720p).
When watching on my Android tablet, the usual CPU load is about 10-15% and 180-200% with problematic videos.
Сhanging various audio/video setting in Kodi does not result in any significant changes in CPU load when playing such files.
Such files are consistently observed in some releases (e.g. GameCenterCX videos, links to clippings from which I will give below).
This may be some kind of encoding problem that affects playback in Kodi, and possibly related to a repeating log message “ffmpeg[0x0]: [h264] nal_unit_type: 1(Coded slice of a non-IDR picture)”.
But when playing same files on the same TV in other players, even system player (which can’t be called a quality benchmark), the video plays perfectly smooth.
Test clips: scrolling (preferable), zooming
Full log with various audio/video component logging enabled.