Playback consistently speeds up after set amount of time

  • Hello,


    I have been using LibreElec on a Raspberry Pi for many years, most recently on a Pi4. Recently, I upgraded to the latest version of LibreElec/Kodi and have noticed something very strange. Consistently, after about ~40 min of constant playback, the audio starts glitching while the video starts speeding up as if it was 1.5 speed. This becomes the way playback functions until I fully stop the playback of the video and then restart the video. I first thought this was due to overheating but even after ensuring the temperature of the device was sound, this continues. Thining resources, I don't see a noticible load on the CPU, hoving around a ~2.3 during even 4k playback and memory usage is quite minimal, barely using near 1GB in a 4GB system. This seems to occur no matter the quality of the video, 1080 or 4k.

    Of note, I have also observed this while watching shorter video files but in succession, making it a constant 40-ish minutes of playback. However, if I stop the stream and then start the next episode, the issue seems to not happen.

    Below I just have basic informatoin of the Kodi version and kernel version. I am unsure where else to look as the log doesn't seem to push out any other information at the moment. Any help or suggestion on where to go from here would be greatly appreciated.

    Thanks!

    Code
    tablekodi:~ # grep Kodi /storage/.kodi/temp/kodi.log 
    2022-08-02 18:01:06.479 T:788      INFO <general>: Starting Kodi (19.4 (19.4.0) Git:19.4-Matrix). Platform: Linux ARM 32-bit
    2022-08-02 18:01:06.479 T:788      INFO <general>: Using Release Kodi x32
    2022-08-02 18:01:06.479 T:788      INFO <general>: Kodi compiled 2022-03-05 by GCC 10.2.0 for Linux ARM 32-bit version 5.10.95 (330335)
    2022-08-02 18:01:06.479 T:788      INFO <general>: FFmpeg version/source: 4.3.2-Kodi
    
    
    tablekodi:~ # uname -a
    Linux tablekodi 5.10.95 #1 SMP Sat Mar 5 15:50:44 CET 2022 aarch64 GNU/Linux
  • Ah, that's a neat little tool. Here is the resulting link:

    http://ix.io/47d3

    Looks like we do hit the consistent issue @ around `19:24`

  • I'm not sure what the issue is, but (unrelated) I did notice that you've set the 'desktop' resolution to 4K which probably isn't going to give you the best GUI experience. Using 1080p and the whitelist to switch to 4K modes only when needed will be faster/smoother/better.

  • However, if I stop the stream and then start the next episode, the issue seems to not happen.

    thinking about your issue some more:

    I could image that sort of a buffer/mechanic/cache in LE/Kodi "see's" an error or such and could self repair/heal it for some amount of time until it can't anymore ( after playing a movie for 40 min ?)

    maybe this:

    2022-08-09 18:34:51.981 T:797 DEBUG <general>: ActiveAE::SyncStream - average error of -94.787318, start adjusting

    I could image that this error increases of time and self healing mechanics take all the power, resources (here: somehow not the CPU) are "contentrated" on audio processing and lowered on video until audio catches up. all power goes again on previous lowered video processing and you'll notice a (temp. ? ) speedup in video play.

    IOW: the box seems to "loop" somehow somewhere on audio/video/etc. processing...

    Questions (cause I couldn't fetch it out of your description)

    - test allways with the same video ! -

    1. what happens with local videos (otherwise smb seems to be involed) ?

    2. when playing a video and the issue occured, does the same video after a restart of the video play without issues then ?
    3. and if so: does the first occurence of the issue always happen when the box was fresh started and it was the first video play (of the day)

    theory:

    a buffer/cache/? isn't "configures" after the start of the box and somehow it is "set correct" after the issue occured

    maybe debugging on components (audio/video/etc) ?

    Edited once, last by GDPR-7 (August 13, 2022 at 10:22 PM).

  • - old man with limited (KB range) and slow (1MHz) memory here again -

    thinking somewhat further:

    ...

    4. what does your memory usage looks like before/after the issue occur ?

    => tools: top or htop (sytem-tools addon)

    or

    on a command line: "watch -n3 free -wh" (prints every 3 sec ...)

    Edited once, last by GDPR-7 (August 14, 2022 at 5:26 AM).

  • Just to close some kind of loop on this. I ended up downgrading back to the latest available kodi 18.9 as the issue was starting to become intermittent and frankly frustrating. I had tried most of the troubleshooting steps provided and found no consistent solution.

    At this point the best i can point to is that something with this RPi4 combined with the latest LibreElec just was not happy playing videos. I appreciate the suggestions I was given :)

  • care to mark this thread as resolved (if so), see just under the thread title.

    P.S.

    sometimes it helps to install from the scratch (and -IIRC- is was the recommended way somewhere between some stable LE releases, see the forum menu point "Blog")