LibreELEC 9.2 beta 1 video judder and stuttering.

  • As suggested, I'm reposting my message originally in announcement tread:


    I’m running LibreELEC-RPi4.arm-9.1.501 in my Rpi 4.

    I’ve noticed that some video does not play smoothly.

    There is judder, jerkyness and stuttering (lost frames?).

    The odd thing is that no report whatsoever in kodi.log.

    Butthe result is very unpleasant to watch.

    It happens with 23.976fps material and also live-tv @25fps.

    In the first case, kodi switches the tv to 23.976fps in the second one to 50fps (as it should be).

    Kodi.log reports the correct fps switching.

    But Looking to the video playback there’s a lot of strange motion artifacts, as if kodi is processing output to another fps different from the one it is outputting.

    I have configured “Adjust Display Refresh Rate” as “start/stop”.


    TURN AROUNDS:

    a) In version LibreELEC-RPi4.arm-9.1.501 this seems to happen only if I have audio with “Allow Pass Trough” enabled. Disabling it, the video runs fine!

    b) In version LibreELEC-RPi4.arm-9.1.002, I found a turn around by forcing “Adjust Display Refresh Rate” as “always”.


    My TV is a SONY Android TV from 2016.

    Note: I also have a RPi 3, with same configurations, in which all goes very smoothly.



    Hope this can be fixed in the next releases.

    Keep up the great work supporting the Pi 4

    ;)

  • chewitt

    Approved the thread.
  • So once again, the same for me. But the audio workarounds do not work for me with the files i tested.


    Some files just work and others get the frame skipping but i do not really see a difference between the files themself.

  • I'll also repeat my findings:

    1. It doesn't look like the issue is with the video files, the files that stutter on rpi4 play smoothly on other devices with similar settings.

    2. Audio does have something to do with it, when switching the output to analogue only or hdmi+analgue, the issue seems to disappear. However, when subtitles are enabled there is still stuttering, regardless of audio settings.

    3. The issue does not seem to be related to storage read speeds, CPU load or file source. I tried playing the video files from an internal SD card, from an SSD drive connected to USB 3 and via network from a different PC with the video file located on an SSD drive, both wired and wi-fi - the results were the same. While the file is playing the rpi4 CPU load is very low.

    4. The issue is sometimes not easy to detect, it's very sporadic, but it's much more evident when TV refresh rate is adjusted to video file fps, which is 23.976 fps most of the time. Also, Kodi doesn't register skipped or dropped frames during this stuttering.

  • Just to add another voice to the pile: I'm experiencing exactly what krobolbus describes, particularly the part about it not showing in logs at all and being sporadic in nature. I keep using the same sequence, a very regular pan, to test, and sometimes it doesn't judder at all. Frame matching to video is on, matching to display is off (was never needed on Pi). Files can be 24 flat or 23.976, doesn't matter, there's irregular judder.

    I'll try playing with the audio settings kro, thanks for that idea.

  • After some more testings I can do a very educated guess, that the video issues are really related to audio configuration !

    I've previously said that disabling audio pass trough gives me a perfect video experience, but some of you could not confirm this.

    So, I've looked deeper in this issue and found that:


    a) If the audio output has 4.0 or more channels there are always artefacts in video. For both 23.976 and 25 fps (at a video output on 1920x1080).

    b) If the audio output is less than 4.0 (2.0, 2.1, 3.0, 3.1), video plays perfect and smooth.


    So, I'm now forcing 2.1 audio output trough HDMI and either video files and live-tv are playing great.

    This is true for audio pass-trough enabled or disabled - of course that only with audio pass-trough disabled, you can guarantee the output format.


    This is just a quick turn-around to help diagnose this "audio configuration that implies issues in video playback"

  • I even think there is a codec difference:


    * EAC3,AC3 with 5.1 work (at least all that i tested)

    * DTS works sometimes. But all my files that stutter are also DTS 5.1

  • You guys are on to something. I had a chance to test your audio theory and it works. More time and tests need to expand the use cases, but reducing audio output to 2 channels over HDMI immediately cleared up the judder on my go-to test sequence (a long, slow, regular pan). I tried a few different files that I'd tried before and sure engouh, gone there, too. As kro mentioned, I saw the odd judder when subs hadn't been on in a while, but so far I've seen nothing like the judder before. Now to find out what's causing it...Great job narrowing it down guys.

  • I have the same experience with my RPi4, but to me it seems the stuttering is only happening when I have subtitles enabled. I mostly use srt files and today I watched an episode of the shows I watch with subtitles off for 30 minutes, with no stuttering, and then I enabled subtitles and stuttering began immediately. I also think the stuttering only happens when there's actually subtitle text on screen i.e. if there's no talking there's no stuttering.

  • Yes: There is some stuttering with subtitles (not with every subtitles. only some).


    But there is a lot of stuttering if the audio conditions defined above (4 or more audio channels being sent to the tv) even without subtitles.

  • Hey there. First time poster here. Been playing with my Pi4 for a week looking to replace my Pi2 / libreelec and I was having all kinds of issues. This thread helped point me in the right direction to solve some and along the way I found something that may help ya here, nvidias - try changing your audio "output configuration" from "optimized" to "fixed". I was having the same poor playback at 5.1 that went away at 2.0....now I can go back to 5.1. Note the default limit for sampling will be the 48khz displayed a few lines below that setting. I've turned mine up to 192 and so far no issues.


    This morning I was convinced my Pi4 wouldn't handle certain datastreams due to mpeg2 format...Now it's working very well.


    T

  • To add my voice to the mix I'm also noticing stuttering and juddering on Pi4, with newest LibreElec on videos with 5.1 audio in all formats (AC3, EAC3, and DTS). I'm using an external USB sound card and I do set the audio to 'Fixed' at 48KHz. This setup, and these videos, have been playing fine on a 3B+ for months.


    I've also noticed that, sometimes when the juddering starts the audio channels suddenly get randomly mixed up - eg center becomes left, left becomes subwoofer, etc etc - this happens during playback and then it gets stuck like that. Sometimes even a reboot doesn't cure it. There's nothing whatsoever in the kodi log.

  • To add my voice to the mix I'm also noticing stuttering and juddering on Pi4, with newest LibreElec on videos with 5.1 audio in all formats (AC3, EAC3, and DTS). I'm using an external USB sound card and I do set the audio to 'Fixed' at 48KHz. This setup, and these videos, have been playing fine on a 3B+ for months.


    I've also noticed that, sometimes when the juddering starts the audio channels suddenly get randomly mixed up - eg center becomes left, left becomes subwoofer, etc etc - this happens during playback and then it gets stuck like that. Sometimes even a reboot doesn't cure it. There's nothing whatsoever in the kodi log.


    that is basically the same behaviour I've got.

    Try forcing 4.0 audio output (or less) and confirm that Judder disappears.

    (Stutter will continue on some subtitles - if you use them)



    Yes. Ir works fine with Pi 3.

    Waiting for new betas for pi4 :)

  • I think I'll just have to wait for new Betas before I try anything else, this system isn't useable in it's current state and I don't have a separate setup I can use for testing. I've also now started getting random, deafening, audio static sometimes on playback start and I fear for the safety of my speakers :) Glad I'm not alone; we were warned this was alpha status for Pi4, so I'll try again at the next beta.

  • Exactly the same problem here....all multichannel formats.
    Audio settings to "fixed" doesn't solve the problem for me, but it seems much better. Still testing subtitles, pass-through and stereo.
    All files play perfectly on 3 B with 9.1.501.

    BTW, every sampling rate above 48KHz ends in total video stutter disaster here ( apart from all other video and audio settings).

  • i guess i have the exact same issue, but there is a solution that i found.


    if you run the pi in any 60hz resolution, everything will be fine. 1080p @ 60z or 2160p @ 60hz.


    the 60hz removes absolutely ALL judder for all video types and audio profiles, and with and without subtitles. just my two cents.

  • Can confirm the subtitle related dropouts too...once enabled there are heavy, really heavy stutters about every 20-30 seconds with all kind of subtitles, closed, containered or external.


    The 60Hz solution doesn't seem to work for me. Are you talking about the GUI or the whitelist resolutions?

  • i guess i have the exact same issue, but there is a solution that i found.


    if you run the pi in any 60hz resolution, everything will be fine. 1080p @ 60z or 2160p @ 60hz.


    the 60hz removes absolutely ALL judder for all video types and audio profiles, and with and without subtitles. just my two cents.

    that is odd. You can not have judder free when watching 23.976fps or 25 / 50 fps movies at 60hz.

    There is no direct conversion. These formats should be played at native refresh rates configured in the white list.