Paspberry Pi 4, 4GB of RAM: Seeking within video files is buggy

  • I want to first of all thank the devs of Kodi, and LibreElec.

    I have Libreelec 10.0.0 installed, my first install ever. I have auto-updates turned on, as is the default, and no notification has come through to upgrade to 10.0.1 (and my sense is to wait to upgrade, as there is still seems to be bugginess wrt RPi 4's). And there doesn't seem to be an easy way to force the upgrade to 10.0.1 from within the Kodi GUI, when I change the updates from "auto" to "manual". So I left it at "auto".

    I've been doing some 1-hour-long desktop recordings using OBS, saving to .mp4, and also alternatively .mkv (which is the default for OBS), 30fps. Sometimes the videos are 1080p, sometimes 720p. I left the encoder setting at the default - "Software (x264)".

    Whether I set the resolution of Kodi itself to 1080p, or 720p, it doesn't matter.

    I always have "seeking" problems in LibreElec 10.0.0. As in, fast forwarding and rewinding (2x, 4x, 8x, 16x, and 32x), or even 10-second seeks (+10, -10) lead to some very strange effects. The timeline gets all out of whack: my position within the file can go way outside the boundaries of the 1 hour. Like I can be at -6:00:00, but I'm at the start of the file! Or if I come out of a fast forward, my position jumps back a minute or two. Or the timeline reports my location incorrectly to where I actually am in the file.

    I'm seeking around using the this inexpensive USB-connected OSMC remote control.

    I watched the CPU usage through SSH, using htop (from the system-tools package). The CPUs aren't even all that busy. 3 of 4 CPU cores idle, and the one somewhat-busy core only is busy to like 20%-ish, even during seeking. Yet the load average is always like 1.5!!

    Is there an iotop, to see if my very decent quality, known-to-be-good-shape-from-Rasberry-Pi-OS Sandisk Ultra MicroSD card is the bottleneck? Apparently not.

    In config.txt, I safely bumped my partitioned video RAM to 300MB, the CPU MHZ to 2000, and GPU MHz to 750, using this guide. None of this helped:

    Code
    gpu_mem=300
    over_voltage=6
    arm_freq=2000
    gpu_freq=750

    What if I put my files on a USB stick (Sandisk Ultra Flair, known to be good), and plugged it into one of the USB 3 ports of the RPi 4, then played the files right off the USB stick? Did that help? No. So we can't blame the MicroSD card.

    Edited 2 times, last by esbeeb (January 6, 2022 at 4:22 PM).

  • There was a recent fix that affected seeking.

    It may (or may not) help your issue.

    It's been backported to Matrix, but isn't in LE yet.

    It should be in LE nightly builds if you wanted to test (ideally on a spare sdcard).