Video stutter 25Hz Videoplayback with Hardwaredecoding Libreelec 9.0

  • Not sure what kind of "skipping" are you talking about... but If you are trying to play interlaced video - set the proper deinterlace method (VAAPI - motion compensated).

  • Folks

    Can any NUC2820 owners out there confirm the issues I am having with all non 24p/60 content (to 1080p res)?

    Basically, after extensive testing, I am finding all 25/50 content (non interlaced or interlace) is completely borked (i.e. with ongoing extnesive stuttering) - on two separate NUC 2820 setups. I have tried every combination of whitelist/no whitelist and smooth playback settings available. I have tried with two entirely separate systems - both NUC 2820s, but one connected via an amp/receiver and the other direct connected to the TV.

    As far as I can tell Kodi and/or LE 9.02. on this sort of older Intel hardware is totally broken. Kodi 17/LE8 was perfect on the same hardware.

    I would like to get some data on whether others are seeing the same thing or not - do you have essentially completely smooth playback for everything as you had with Kodi 17, or are you still experiencing stutter issues like my systems?

  • Quick test with the latest release I can see - LibreELEC-Generic.x86_64-9.1.002.img.gz - shows no improvement to this issue.

    It's interesting - I can't see an frame drop numbers increasing (in the ctrl-shift-o thingy) - and in the log it's doing what I'd expect (this is for a 25p UKTV show):

    2019-07-26 17:56:46.142 T:140533060278016 NOTICE: Whitelist search for: width: 1920, height: 1080, fps: 25.000, 3D: false

    2019-07-26 17:56:46.142 T:140533060278016 DEBUG: Trying to find exact refresh rate

    2019-07-26 17:56:46.142 T:140533060278016 DEBUG: No exact whitelisted resolution matched, trying double refresh rate

    2019-07-26 17:56:46.142 T:140533060278016 DEBUG: Matched fuzzy whitelisted Resolution HDMI1: 1920x1080 @ 50.00Hz (18)

    2019-07-26 17:56:46.142 T:140533060278016 NOTICE: Display resolution ADJUST : HDMI1: 1920x1080 @ 50.00Hz (18)

    ...so it appears to find the right refresh mode, and it knows what the file is. It claims not to be dropping frames...but it certainly visually looks wrong, with constant stutter. The vsync figure varies all over the place...from 0 to 20ish...

  • Ok, more experimenting...and I think I have beaten it (or more to the point Ross Nicholson has it cracked, here: 111032 – Need to set gt_min_freq_mhz to max value to avoid sync issues on Gemini Lake N5000/J5005)

    It seems this is (still) the problem. The GPU clock speed is not scaling up as it should under load.

    With a NUC 2820, I added this `autostart.sh` script:

    Bash
    (
    echo 750 > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz
    ) &
    nohup script.sh &

    The 750 comes from the output of this command (you should check if you have a different NUC)

    Bash
    cat /sys/bus/pci/devices/0000\:00\:02.0/drm/card0/gt_max_freq_mhz

    This results in immediate playback improvement - the stutter is gone from all my 25p stuff.

    (I updated the bios to 68, and I am in this test using the 9.2 alpha release but it was only this specific fix that had any impact on the issue).

    If I test the GPU (i.e., specifically while playing a hardware decodedc video), with

    Bash
    cat /sys/bus/pci/devices/0000:00:02.0/drm/card0/gt_cur_freq_mhz

    ...it now shows 750 during playback (187 during the Kodi GUI still, though, which kinda surprises me but I guess the GPU is idle until playback occurs maybe?)

    I shall report back if testing shows any/more issues, but I think that's a solid fix, if anyone is still following along.

    Edited once, last by bossanova808 (July 28, 2019 at 2:24 AM).

  • Edited once, last by bossanova808 (July 27, 2019 at 8:53 AM).

  • I've read this thread and have exactly the same issue on Libreelec 9.0.2 on an Asus Chromebox. Specs -

    1.4 GHz Intel Celeron 2955U Processor

    4GB DDR3 RAM, 16 GB SSD HDD

    Intel HD graphics

    Everything worked fine with 8.2.5, but when I upgraded on the weekend many of my SD files ripped from my DVD library now stutter if fps is 60. All videos at 24fps work fine, which is most of my HD Blu ray rips. Like many of you, I've tried every combo of settings, whitelist entries etc with no luck. Since my Chromebox graphics card is Intel based I'm wondering if your solution would work for me but not sure how to implement

  • NDTradd - the instructions are above to make a permanent fix but the easiest test would be:

    Boot your machine (clear out any previous things you've tried and in general you shouldn't need a whitelist unless your scenario is unusual - if you leave it blank Kodi V18 will sensibly auto-select your TV's matching modes just like it did in V17).

    Then, SSH into it

    Run this at the command line:

    Bash
    cat /sys/bus/pci/devices/0000\:00\:02.0/drm/card0/gt_max_freq_mhz > /sys/devices/pci0000:00/0000:00:02.0/drm/card0/gt_min_freq_mhz

    ...which will temporarily set the minimum GPU clock to the maximum GPU clock for that session.

    Then, go & play a video...and the stutter issues should magically be gone just like that.

    If it works for you, follow the full instructions above to make the fix permanent...and post back here so others benefit from your experience!

    I suspect this fix is needed for any Intel graphics box with current LE/Kodi...

  • OK, so I SSHed into libreelec, and it accepted the script, but it made no difference to my videos. Still have major judder at 60fps, although videos streamed from online at 60fps are smooth. If I rerip a DVD and force 24fps it works fine

  • Ok, back to basics - what are you actually trying to do specifically? Are your rips actually of 60hz materials? Or are they actually 24hz? I presume you are trying to achieve 24 playing back at 24, 60 at 60 (i.e. you are using Adjust Display Refresh Rate (vs sync playback to display)).

    If you're trying to playback a 24hz original at 60 (why? you'd only want to do this, really, if your TV can't do 24p, pretty rare these days)...then it's going to use 3:2 pulldown, which is inevitably going to give you some visible judder. But all sorts of things could be going on, depending on the state of your settings (did you clear the whitelist, etc?)

    Basically, we have to work out if your issue is due to a fundamental playback issue like that, or if it is because your GPU is not ramping up properly.

  • I've ripped my entire DVD and Blu Ray collection (200 movies) with Handbrake using the original frame rate setting. In Kodi, Adjust Display Refresh Rate is enabled, and all HD resolutions are enabled in the Whitelist. I'm only interested in ripping movies at their original fps. Everything worked great in Kodi Krypton and previous, videos played silky smooth. But I've tried every version of Leia and always the movies that have an original frame rate of 60fps are dropping every other frame at least. Movies with a 24fps frame rate still play silky smooth. I've always backgraded to Krypton because after trying every conceivable combination of settings, nothing changed, but I've decided to tough it out this time with LE 9.0.2. Interestingly, I sometime borrow movies from the library which I just copy to MKV, watch and then delete. Some of these play at 30fps, which is a little easier to watch, but still with noticeable judder.

  • And you've tried removing everything from the whitelist, right? That's how you get the same behaviour in Krypton , in theory at least. You probably have, just worth checking...

    What's your GUI refresh rate for Kodi?