Image and sound freezes for a few seconds while playing videos randomly (ActiveAE - large audio sync error)

  • Ho there,


    I'm experiencing this issue from the first day after a fresh install of LibreELEC 9.2.5 (Kodi 18.8 Leia) on my Rapsberry Pi4B.

    Randomly (but several times per video) image and sound freeze and (after a few seconds... 5 or 6) continue further forward (not where it froze). If I go backwards and force to display the lost time I can watch it so I think that is not a problem of the video file corruption. Freeze times are random (not at the same time with the same video).


    Looking at the log files, freeze times matches with a bunch (more than 300 per freeze) of warning messages:

    Code
    2020-09-27 16:06:17.731 T:2990429040 WARNING: ActiveAE - large audio sync error: -22790.950967
    2020-09-27 16:06:17.781 T:2990429040 WARNING: ActiveAE - large audio sync error: -22790.902373
    2020-09-27 16:06:17.781 T:2990429040 WARNING: ActiveAE - large audio sync error: -22740.900152

    Looking for info I've read a guy that solve this issue creating an advancesettings.xml file giving more memory to the video cache but I don't know if I'm pointing to the right direction and this is not working for me.


    Please, any idea? It is very frustrating due I've never had these issues with my old Raspberry Pi 2B that played exactly the same videos with the same USB stick smoothly... And now I'm using the RapberryPi 4B with 4Gb and it is worse :(


    I really appreciate any help you can provide.

  • Hi Da Flex,


    I'm a newie and I'm not sure if the log that I have is level 2 (I think so). If you need another kind a log, please tell me how can I generate it.


    In the meantime, thank you so much for your attention and participation.

    Files

    • log.txt

      (599.78 kB, downloaded 9 times, last: )
  • You're currently at log level 0, which is fine for me. In the future, switch to log level 2 by adding this line to advancedsettings.xml:

    Code
    <loglevel>2</loglevel>

    This error appears right before starting the movie, but I don't know whether it's relevant:

    Code
    2020-09-27 15:40:31.274 T:3011285008 NOTICE: VideoPlayer::OpenFile: /var/media/XBMC/Pelis/Jumanji Welcome to the Jungle (2017).avi
    2020-09-27 15:40:31.279 T:2530136944 NOTICE: Creating InputStream
    2020-09-27 15:40:31.306 T:2530136944 NOTICE: Creating Demuxer
    2020-09-27 15:40:32.443 T:2530136944 NOTICE: Opening stream: 0 source: 256
    2020-09-27 15:40:32.444 T:2530136944 NOTICE: Creating video codec with codec id: 12
    2020-09-27 15:40:32.448 T:2530136944 ERROR: CMMALVideo::Open Failed to commit format for decoder input port vc.ril.video_decode:in:0(MP4V) (status=3 EINVAL)

    The error is related to AC3 audio decoding at non-pass-through mode:

    Code
    2020-09-27 15:40:32.452 T:2530136944 NOTICE: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder ac3
    2020-09-27 15:40:32.453 T:2530136944 NOTICE: Creating audio thread
    2020-09-27 15:40:32.453 T:2478416752 NOTICE: running thread: CVideoPlayerAudio::Process()
    2020-09-27 15:40:32.453 T:2504958832 NOTICE: CDecoder::Open - fmt:0
    2020-09-27 15:40:32.464 T:2478416752 NOTICE: Creating audio stream (codec id: 86019, channels: 6, sample rate: 48000, no pass-through)
    2020-09-27 15:40:32.856 T:2504958832 NOTICE: CDVDVideoCodecFFmpeg::CDropControl: calculated diff time: 41708
    2020-09-27 16:05:54.673 T:2478416752 NOTICE: CVideoPlayerAudio::Process - stream stalled
    2020-09-27 16:06:17.636 T:2990429040 WARNING: ActiveAE - large audio sync error: -22740.888226

    You can try to enable pass-through mode at the audio settings. Then AC3 will be decoded by the receiving device, not by RPi.

    Flexin' vinyl, jammin' break beats. 8)

  • Due to your RPi 2B experience and internal dev conversation, I'll move this thread to the Bug Reports sub-forum.

    Flexin' vinyl, jammin' break beats. 8)

  • If pass-through doesn't work, remux your files to MKV format by using mkvtoolnix or similar. That's approved to work.

    Flexin' vinyl, jammin' break beats. 8)

  • If pass-through doesn't work, remux your files to MKV format by using mkvtoolnix or similar. That's approved to work.

    Pass-through doesn't work. Test failed :(


    But trying to set the log to level 2 following your aforesaid instructions, I've realized that my advancedsettings.xml file is not being used due to a bad format. So I've updated the file and now is using my custom video cache memory size. I'm trying to apply same solution as detailed here.


    I'm playing the movie again right now (without pass-through, but with a bigger video cache memory). Test results in a while (cross fingers)

  • Good news!


    At least, the movie was played without problems in the first attempt! I'll perform more tests in the following days with other kind of movies to verify that problem has been solved but I think that now I'm pointing in the right direction :love:.


    This is the advancedsettings.xml file that I'm using right now:


    Code
    <advancedsettings>
        <cache>
    <memorysize>139460608</memorysize>
    <buffermode>1</buffermode>
    <readfactor>20</readfactor>
    </cache>
    <loglevel>2</loglevel>
    </advancedsettings>

    More info about this file here.


    Thanks Da Flex for the support!