Audio dropouts

I have been trying to get Kodi to work properly for the past 3 weeks. Install was 3 weeks ago, video is good, but audio has frequent drop-outs - 0.5s to 1s every 30s to 180s… The display looks fine and smooth. My current config is as follows:

  • Raspberry Pi 3 B, with Ethernet connection to the router, NAS and TV (no wifi). Install was the version downloaded from OSMC 3 weeks ago - 17.02, something…, official raspberry pi 3 power adapter with 2.5A output

The video display is fine, but i get audio dropouts in both scenarios - HDMI output, and USB-Audio output. This happens for videos from my NAS server, and also for ‘live’ videos streamed from the internet. I have tried the following fixes as mentioned in the forum:

  1. Change power adapter - I switched to another 2.5A adapter - no effect
  2. Change refresh rate and video resolution - no effect.
  3. Overclock CPU to 1.2Mhz, and memory up to 500 - no effect
  4. Change the HDMI output settings - no effect.

I hope that you can help on this - video looks great, but video without good audio is terrible… uploaded the logs to http:/paste.osmc.io/xoguenone

Add this to your advancedsettings.xml

<advancedsettings>
        <cache>
           <buffermode>1</buffermode> <!-- Default is 1 -->
           <memorysize>157286400</memorysize> <!-- Default is 20971520 bytes or 20 MB -->
           <readfactor>5</readfactor> <!-- Default is 1.0 -->
        </cache>
</advancedsettings>

Note that the tags have changed compared to the kodi 16.x
That is what I use on my PI’s. the PI B+ and 2 use 52428800 as memorysize, as they have only 512MB Ram

Thanks - stupid question - How do I add those statement? I am using OSx - Do I do an SSH to the Rasberry pi? What do I use to edit? I don’t really know linux…

Yes. ssh to the PI.

ssh -l osmc kodi.domain.sub

password is “osmc” (correction as per comment) too, and replace kodi.domain.sub by the hostname or the IP of the PI in your lan.
The go to the right directory:

cd .kodi/userdata

Then copy whe Advancedsettings content into your paste buffer and issue a:

cat > advancedsettings.xml

paste the buffer, once done, Hit Ctrl-C
and you’re done.

Check the content with:

cat advancedsettings.xml

it should show you the content you have pasted into.
To activate it, make a:

sudo systemctl restart mediacenter

That should be it. Should work now.

I guess you meant “password is osmc too”

Also suggest to

sudo systemctl stop mediacenter

before you edit that file

yes. Will edit it in my other post.
I tend to copy my public key onto my devices, so I don’t use the password that often :slight_smile:

Thanks! I will try that tonight - on the road now :slight_smile:

It’s better but still getting dropouts. I feel that the interval between dropouts is longer. Should I increase the size of the buffer? i.e., 209715200?

I don’t think it is the buffer.

I remember that there was something with that.
Have you applied all the latest updates?
Try making a:

sudo systemctl restart mediacenter
sudo apt update
sudo apt dist-upgrade
sudo shutdown now -r -t 0

That will update the system, and reboot it.

You are right. Still getting the audio dropouts… not clear what is going on. Version is updated - ver 17.02-2

All packages are up to date.
osmc@osmc:~$ sudo apt dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
osmc@osmc:~$ sudo shutdown now -r -t 0
Connection to 10.0.1.21 closed by remote host.
Connection to 10.0.1.21 closed.
Tecks-MacBook-Pro:

=======

Can you try copy a file to the SD or a USB stick, play off that and let me know if it helps?
Does smsc95xx.turbo_mode=N in /boot/config.txt help?

Added the line into config.txt. Still getting audio dropouts, even with movies played from a usb plugged into he raspberry pi. Though i must say that is is less frequent now - i can get 1-2 mins interval wihout dropouts…

That is weird. I never had issues with my PI 3 and decent movie RIPs.
Don’t have audio dropouts.

Did you try to playback a movies from the PI’s SDCard?
And, what type of movie is it. any chance we could get a mediainfo details listing?

I got it to work, but I am not sure what i have changed :(. I will try to trace back over the next few days. It’s either a video/audio sync issue, or a hardware acceleration issue. Thanks for your help guys!

Now, if only i can get my K380 keyboard to work - need to reconnect manually each time.

Nice to hear that.
I have a mini wireless keyboard, no Bluetooth that works nice out of the box. Never had an issue with it.

Weird. Dropouts are back. Calling it a night :frowning:

We need to know what you really did, to see if it is PI related, or Codec related.

Ok. I think i managed to narrow down the problem. I did a fresh install on a new SD card, updated to the latest version and incorporated all the changes recommended - it had dropouts on the fresh install with different file formats on the Pi usb (mp4 and mkv). After adding in all the recommended changes, it works now on HDMI output for sound wihout any dropouts! Video was workig all the time. My guess is that i did not put in the right hardware acceleration codes in the previous install (I forgot it was case sensitive).

However, I am still encountering audio dropout if I use the USB output on the Pi to my USB-dac. I am using an audio-gd singularity 19 DAC with an Amanero board. Any help is much appreciated!

There, I won’t be able to help. Sorry mate… Never used that.

I found another suggestion on buffermode settings:

*

  •   network>
    
  •       buffermode>1</buffermode> <!-- Default is 1 -->
    
  •       memorysize>157286400</memorysize> <!-- Default is 20971520 bytes or 20 MB -->
    
  •      readfactor>5</readfactor> <!-- Default is 1.0 -->
    
  •   /network>
    

*

What is the difference between buffermode in cache and in network?