Massive A/V sync issue on LE11 Nightly

  • Hello!

    This is a problem that has happened a few months earlier on the nightlies and that got fixed, but it is coming back. Well, it may be a different cause with similar results.

    Some streams or files nearly instantly develop massive A/V sync delays. By massive, I mean a few seconds, very rapidly. There is a forceful sync happening once in a while, with a video pause, and then it prodigiously drifts again.

    This debug log was captured while playing 3 different videos:

    1. a local file, mp4 container, avc video, aac audio - massive drift, 2 A/V sync events
    2. a BBC iPlayer (iPlayer_www official add-on) stream - massive drift, 1 A/V sync event
    3. A local file, MKV container, H.264 video, E-AC3 audio - No drift, in sync, always

    Debug log / pastekodi: https://pastebin.ubuntu.com/p/Ch9J5mPYgh/

    Raspberry Pi 4 4 GB RAM

    dual headed - HDMI1 to 4K TV, HDMI2 to old AVR - fixed EDID files

    LibreELEC nightly-20211122-599fb05 (RPi4.arm)

    If you need anything else, shoot, I'm standing-by!

    Nico

  • It's always useful to report when an issue starts with nightlies. If you can report a latest good and oldest bad build it might help narrow it down.

    I've gone back in time.

    Which reminded me of one thing... The bad A/V sync on some videos started when a bad video start (audio start but black screen for 10s) issue got fixed (I didn't report it, it lasted for a week or two, please don't ask me to go back in time that far!).

    I remember reading this and thinking "that may fix my bad video start..." and it did: https://github.com/LibreELEC/LibreELEC.tv/pull/5888 This may be completely unrelated, I'm a numpty.

    A/V syncVideo start with no picture
    nightly-20211119-5e534dGOODBAD
    nightly-20211120-62b201bBADGOOD

    I'm hoping that will help!

    Nico

  • This debug log was captured while playing 3 different videos, using nightly-20211119-5e534d

    1. a local file, mp4 container, avc video, aac audio - massive drift, 2 A/V sync events
    2. a BBC iPlayer (iPlayer_www official add-on) stream - massive drift, 1 A/V sync event
    3. A local file, MKV container, H.264 video, E-AC3 audio - No drift, in sync, always

    Debug log / pastekodi: https://youplala.net/~nico/le10-bad…di-20211119.txt

    Video 1 made the system very angry: no video or sound, screen flickering somehow

    Video 2: 10+ s until the video comes on after a black screen. THERE ARE BAD A/V SYNC issues!

    Video 3: 10+ s until the video comes on after a black screen. No a/v sync issues

    So, worse than I thought previously!

  • The logs show you were playing from NFS. Can you test if you have the same issue when playing from a local USB drive?

    If yes then a short sample file (1 minute or so) that has the issue would be nice.

    20211120-62b201b also includes ffmpeg changes https://github.com/LibreELEC/LibreELEC.tv/pull/5889 and I'm suspecting they could be causing the issue. If that's the case our ffmpeg guru will need a sample to reproduce and analyze the issue.

    so long,

    Hias

  • I just noticed 2 more things in the log:

    The file is a 50fps video, you may need force_turbo=1 in config.txt for smooth playback.

    And you don't seem to have 1920x1080 / 50 Hz in your whitelist so 3840x2160 / 30Hz is chosen - which usually doesn't work well with 50fps files. Add that mode to the whitelist - and better also set kodi gui to 1920x1080/60Hz

    so long,

    Hias

  • oh crap... The whitelist... What a dummy! So sorry!

    I had forgotten to recreate it after a complete reinstall due to a card gone bad...

    Yes, the whitelist fixes it!

    I will also reapply the force_turbo=1

    Thanks, and sorry again for the trouble