Audio Stuttering and Audio-Video Desync

I found a few threads with similar problems, but I didn’t see any solutions so I thought it might be worth starting a new one. I use a 5 tb seagate external HDD for all my media. I’ve been irregularly experiencing audio stuttering followed by audio-video desync that does not fix itself until I stop the video and restart it from where I stopped. Sometimes I have to do this 2 or 3 times in a row before the video continues smoothly. Any ideas what could be causing this? Do I need to figure out how to post a log?

I think this is the log you might need? Let me know anything else I need to do.
https://paste.osmc.tv/aqayomibip

Try setting the following

Settings>Player>Videos>Adjust display refresh rate> On start/stop

Seemed to do the trick at first try. Ill let you know if it persists. Thank you!

Edit: Literally the same second I replied, it started having the issue again…

Is that hard drive being powered by Vero or does it have its own power supply? If it is bus powered I would try running it from a powered hub. If you don’t have one of those laying around I would recommend copying one of the problem files to either internal storage or a thumb drive and see if the problem persists. You can use the file manager in settings to play from another location without having to mess around with adding a new source location.

Vero powers the drive. I’ll test a flashdrive and see if it works. Is there a reason it only happens sometimes?

It is possible that the drive is not getting quite enough power to work without issue. That test should provide some insight.

After testing with a flash drive, the problem happens just as much.

Are you playing through a bluetooth device when this issue occurs? If so does the same thing happen if your outputting audio to your TV’s speakers? Also is this happening on only certain files or randomly across the board? When this happens if you hit pause for a couple seconds (instead of stopping the file) and then start playing the video again does the problem go away?

I’m playing through my bluetooth speakers when it happens. I’ll give it a try with the tv speakers. It seems to be randomly. I at least haven’t noticed it happening with specific file types or anything like that. I will also try just hitting pause. It’ll be a few hours before I can try these solutions.

So the stuttering stops when I have the audio on HDMI as opposed to bluetooth

Bluetooth audio is still experimental at this time.

Do you have anything I could test run?

It depends whether you installed A2DP or BlueZ-ALSA.

I have BlueZ-ALSA installed.

Please post cat ~/.asoundrc

And can you post debug logs again now you’ve changed refresh rate switching.

@grahamh
I don’t know how to post a shorter log, but the info you want will be on 8/9/2020.
https://paste.osmc.tv/iyuzehumet

osmc@TatesOSMC:~$ cat ~/.asoundrc
#This file describes the bluetooth sinks available for Kodi to play to
#add lines like the following for each BT device (speaker or headphones)

pcm.mybtdevice {
type bluealsa
device “F8:DF:15:B4:27:65”
profile “a2dp”
hint {show on description “Speaker”}
}

#using the MAC of the device (see bluetoothctl) instead of 12:34:56:78:9A:BC
#Use any letters or numbers for the description which will show up in Settings-System-Audio"

If you restart Kodi twice (ie use Power->Exit from the menu twice) then we get to see just the info we need.

In your log, we are getting a lot of this, which is probably related:

2020-08-09 09:37:36.767 T:4029674208   DEBUG: ActiveAE::SyncStream - average error -353.393364 above threshold of 100.000000
2020-08-09 09:37:36.768 T:4029674208   DEBUG: ActiveAE::SyncStream - average error -12.060030 below threshold of 30.000000
2020-08-09 09:37:37.781 T:4029674208   DEBUG: ActiveAE::SyncStream - average error -282.618973 above threshold of 100.000000
2020-08-09 09:37:37.782 T:4029674208   DEBUG: ActiveAE::SyncStream - average error -26.618973 below threshold of 30.000000
2020-08-09 09:37:38.789 T:4029674208   DEBUG: ActiveAE::SyncStream - average error -286.507499 above threshold of 100.000000

Can you play that video again using HDMI audio and post debug logs to see if we get the same issues?

https://paste.osmc.tv/fatiyocuba

I started playing the same file at 11:09:10 on 8/9/20. I took a peak and didn’t see the same errors again.

1 Like

Any idea what was causing it? I’d prefer to use the speaker if possible