Audio delay with 4k content [LibreElec 10.0.1 / RaspBerry Pi 4]

  • Hi guys,

    Since I updated to the final version of LE10, I'm experiencing a delay with audio. It's about 100 ``/ 150 ms with all my 4k content I'm streaming from my NAS.
    I have my Rpi 4 connected to my Sony Receiver and have set audio passthrough through HDMI for all formats as my receiver supports all.

    Any ideas?

    Cheers,

    Rob

  • Go to Best Answer
  • I have the same audio delay problem viewing 4K content.
    I have an Intel NUC8i3BEK, LE10 (special build with 4K UHD HDR support), audio passthrough via HDMI to a Yamaha Receiver.

    Thanks,

    Ray

  • Some further investigations:

    I am using RPi4 4GB RAM. LibreELEC 10.0.1

    My base resolution (at Kodi menu after boot) is 1080p@50Hz. Shows which runs at this mode are synchronous. But every other show, were Kodi needs to swith the TV mode, are asynchronous. For example, 1080p@24Hz audio delayed (too late around 150ms). Also 1080p@30Hz and so on.

    My TV needs around 4 seconds to switch the modes. It is an older one from 2014.

  • Ok I need to retract my last comment. It seems to be, that audio is delayed no matter which TV mode is used. I think every Dolby track (AC3 and E-AC3) is 150ms too late. With DTS I am not sure. Definitively not related if 50p or 24p.

    Maybe someone could crosscheck this. Thank you.

  • Hi there,

    is there already a solution to the problem?

    I have the same problem

    RPi4 2GB RAM. LibreELEC 10.0.1

    -------------------------------------------------------------------------------------

    so... I tested the version LibreELEC-RPi4.arm-11.0-nightly-20211222

    unfortunately no improvement

    Test-Fileinfos:

    h264 mpeg 4 avc

    1920x1080

    codec mpeg aac audio

    stereo

    Edited once, last by HackFresse (December 23, 2021 at 2:15 PM).

  • Does the delay still occur if you connect directly to TV bypassing the AVR?

    That's not possible atm. I have no options to connect my 4k projector directly to my Rpi4 since the Rpi4 has mini HDMI. I don't have an adapter for this unfortunately.


    Ok I need to retract my last comment. It seems to be, that audio is delayed no matter which TV mode is used. I think every Dolby track (AC3 and E-AC3) is 150ms too late. With DTS I am not sure. Definitively not related if 50p or 24p.

    Maybe someone could crosscheck this. Thank you.

    Jep, 150ms seems about right.

    I have my Rpi4 connected to my AVR and the AVR is connected to my 1080p TV and my 4k projector.

    I have the Kodi resolution set @ 1080p/24 and whitelisted the resolutions my projector supports.

    When viewing 4k content, the resolution is changed from 1080 to 4k when starting a movie.

    The audio delay occurs with all my content.

    Edited once, last by lobbie1978: Merged a post created by lobbie1978 into this post. (December 23, 2021 at 3:18 PM).

  • Ok I need to retract my last comment. It seems to be, that audio is delayed no matter which TV mode is used. I think every Dolby track (AC3 and E-AC3) is 150ms too late. With DTS I am not sure. Definitively not related if 50p or 24p.

    Maybe someone could crosscheck this. Thank you.

    Pretty sure this is occurring outside of kodi/pi (i.e. the processing of audio/video is different which can be true when using an AVR).

    I have an Onkyo AVR and Pansonic TV and have no issues with a/v sync whether passthrough is enabled or not.

    You can adjust the audio offset when playing a video and then select "set as default for all videos" for it to always be applied.

    There may also be similar adjustments available through AVR or TV menus.Video processing options like motion enhancement may be adding video delay, and are best disabled.

  • I know my setup really well and I did not change anything over the last years except upgrading to LibreELEC Version 10.0.1. I also have an Apple TV and DVB-C Receiver and all need the same audio delay offset produced from my TVs processing algorithms, which I corrected in my AVR. And this worked also well with LibreELEC 9.2.8. So no I am pretty sure it is not outside LibreELEC/Kodi/RPi4...

  • You can work around general audio delays via advancedsettings.xml:

    Code: /storage/.kodi/userdata/advancedsettings.xml
    <advancedsettings>
      <video>
        <latency>
          <delay>+150</delay>
        </latency>
      </video>
    </advancedsettings>

    Restart kodi using command systemctl restart kodi

  • My little experience of many years with kodi, LE, CE and Android tells me that when audio delay occurs the problem is related to hardware video decoding and/or processor power. Introducing a permanent delay in the kodi system is not the solution because usually the SD contents work well (the patch would advance the sound in many cases), and they are decoded without problems.

    I can only say that on my cheap LE 9.2.6 x86_64 server, which can only hardware decode h264 and h265 content up to 1920x1080 and it works fine. If I want to watch 4K content without hearing the noise of the server fans or use kodi 19, I have to use my small and cheap clients with CE or Android 9.

    Merry Christmas!

    Edited 8 times, last by elonesna (December 30, 2021 at 9:52 AM).

  • You can work around general audio delays via advancedsettings.xml:

    Code: /storage/.kodi/userdata/advancedsettings.xml
    <advancedsettings>
      <video>
        <latency>
          <delay>+150</delay>
        </latency>
      </video>
    </advancedsettings>

    Restart kodi using command systemctl restart kodi

    That's awesome, I'll try that. Thank you!

  • I've noticed this 'sometimes' in OSMC's latest (Kodi v19) on the Vero 4k+ (UHD, HD content with a +100ms sync required), however it's completely inconsistent and doesn't seem to have a rhyme or reason... I've dealt with audio & framerate synch issues in the past and I'm over it these days :D Be warned it's a deep rabbit hole to go down!

  • I'm still having this audio delay problem on my pi4, none of the above solutions/hints fix the problem.

    With libreelec 9.2 my pi4 worked very well, the audio problem starts with libreelec 10, so I think it is not a hardware problem.

    Are there any other things I can try to fix it?

  • One more question: In an older forum entry relating to LE7 I found the hint to disable "sync playback to display". May it help for LE10 also? Where can I find this option in the menu?