Kodi Community Forum

Full Version: Kodi audio/video random glitch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I have a nearly perfect setup going apart from my audio/video which randomly glitches. If you rewind then the glitch will not be in the same place. I can confirm that the file plays perfectly on several other devices. The main culprit is the audio which I've attached debug logs of it occurring several times during The Beatles - "Happiness Is A Warm Gun.flac". The Debug Log: http://xbmclogs.com/pwmdqkr4q seems to show that the flac only plays for 5 seconds, unless I am reading it incorrectly, however the entire song did play and paused several times towards the end. It's driving me nuts.

My System Setup
  • Kodi 14.2
  • Kodibuntu 14.04.2 LTS 64-bit (Clean install + apt-get update, upgrade, dist-upgrade) onto a 60GB internal SSD
  • Intel Celeron 2820 NUC with 8GB ram connected to the router via 1Gb ethernet
  • QNAP TS-420 NAS (192.168.0.6) with all media on it connected to the router via 1Gb ethernet
  • Harmony 515 remote
  • Sony Bravia monitor connected to the NUC via HDMI
  • NAD D3020 USB direct amp (working perfectly with kodibuntu connected to the NUC via USB2 (both analog and digital S/PDIF show the stutter) - never had a issue with it before on windows or ubuntu)
  • Debug Log: http://xbmclogs.com/pwmdqkr4q (Go to the section where The Beatles - Happiness is a warm gun.flac is playing as that song had multiple stops in it)

Thank-you,
Luddite
I spent some time on the settings and made logs of two modes. There is no real difference as far as I can tell however I did manage to mapp the glitches to debug time points.

Here are 2 lots of logs of the flac song "Life's Greatest Fool" by Gene Clarke. I noted the times that I heard a glitch and tried to pinpoint them against the debug log lines.

http://xbmclogs.com/p7dxpwoi8 with no passthru and best match

Glitches @



http://xbmclogs.com/p91zjcepx (this log seemed to also include the previous log however I stopped the logging then used the kodi log uploader befor starting the debuging again. So not sure why the previous log wasn't moved to .old. With passthru and bestmatch

Single glitch @ 0.27 : http://xbmclogs.com/p91zjcepx#line-856
Play from local disk please first and see.
Good tip fritsch. I'll try tonight (about 8 hours).

I did check my network and throughput is not issue and all other devices can stream the same file with no issue but I agree, let's isolate this.
I know about our VFS, which is not the most stable, especially in combination with samba. Also do your tests with v15 nightlies - as 14.2 is the last release we will do for v14.
Hi fritsch,

I discovered the culpit was SMB as after I switched to NFS EVERYTHING improved. No glitches, no stutters, and performance has improved no end.

Thanks for attempting to help and for your suggestion re the local file as that helped me pin point the issue to Samba.

(2015-05-26, 08:08)fritsch Wrote: [ -> ]I know about our VFS, which is not the most stable, especially in combination with samba. Also do your tests with v15 nightlies - as 14.2 is the last release we will do for v14.
Agreed, however I would prefer not to upgrade at this point until there is a stable v15. I've honestly had to much pain and just want to enjoy this :-)

NFS vs SMB
Here are my benchmarks that I just ran. I have the same directory mounted as NFS and SMB. I copy the same file. The first test is NFS and the second is SMB. The difference is clear and kodi enjoys the speed.

kodi@kodi:~/nas$ rsync --progress Download/ubuntu-14.04.amd64.virtualbox.box ub.vbox ubuntu-14.04.amd64.virtualbox.box
792.76MB 100% 98.63MB/s 0:00:07 (xfr#1, to-chk=0/1)

kodi@kodi:~/nas$ rsync --progress SMBDownload/ubuntu-14.04.amd64.virtualbox.box ubsmb.vbox ubuntu-14.04.amd64.virtualbox.box
792.76MB 100% 31.55MB/s 0:00:23 (xfr#1, to-chk=0/1)
That sucks never the less samba wise :-) Thanks for reporting back.
please note that 14.2 uses a very old samba lib. It might be better with v15. Nevertheless, NFS is still the way to go.