Crackling/glitches when playing audio, video ok
#1
Hello!

I am using Kodi 17 on QNAP 451+ with HDStation. I have a small problem with audio. When playing audio files I can hear some small glitches from time to time (once a few seconds). There are no glitches/crackling while watching movies. The problem was present on all Kodi versions I tested (kodi 17 beta 5, kodi 17 beta 3, and kodi 16). Currently I am using kodi 17 beta 5.

I've tried increasing cache and setting caching for internal filesystem but didn't solve the problem. I've also tried changing players, but it doesn't help either. I am using ALSA output, I've turned pulse audio off. The output is via stereo DAC connected to USB port of QNAP. In Kodi it's selected as SPDiF.

I attach a log.
The system is 64bit Quad-core Intel® Celeron® 2.0GHz, 2GB RAM
HDStation is virtualized Ubuntu LTS 14.04 but I think it has some features trimmed.

I would appreciate any kind of help, I am struggling with this issue from a month and I can't find any solution.

Thanks
Wojciech
Reply
#2
There is a new setting: stream noise in expert menu. Can you disable that? Any change?
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Thanks for the reply.
I've just checked, but changing noise setting doesn't seem to make any change. There are slight glitches with noise both on and off.
I've also double checked if the videos are playing fine. I've played some concerts to have constant music output but there were no glitches.

Update:
After listening to some more concerts - there are glitches on video playback but they are less frequent and they seem to be present only on stereo sources. When the source is 5.1 and is mixed down to stereo there seem to be no issues.

I am wondering if it may be caused by some CPU down throttling? I can't change CPU governor, but is it possible to add some constant load on CPU to prevent throttling?
Reply
#4
If you remove the dac (most of them have shitty Linux drivers) all fine? Same with a default Ubuntu?
Edit: Load you can test with: dd if=/dev/zero of=/dev/null
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
I can just route the audio via HDMI to TV and then back to the DAC (optical). In such case it seems to be fine, but it will probably need some more testing. I just don't want to have tv on all the time I listen to the music.

I haven't tried running default Ubuntu on QNAP. I may try installing it in the evening.
I was playing audio to the same DAC from an old laptop with Ubuntu and it was fine.
Reply
#6
What do you mean by "dd if=/dev/zero of=/dev/null"? Where to put this code?
Edit: Sorry, for the stupid question. I used ssh to execute the command on the unit.

Unfortunately it didn't solve the problem.
Reply
#7
I didn't try running other ubuntu as it will run as VM in QNAP system and the server has only 2GB ram, so it is a bit to little.
When I play audio using other player (Clementine) under the same system (HDStation) there are no glitches.

I've also tried setting Kodi from SPDiF to Analog hoping that it will use the same default mixer as Clementine but there were glitches as well. I am not sure but they may have been less frequent than in SPDiF setting, however I wouldn't bet on it.

Nevertheless I think that the device is capable of playing without glitches as other player can do it so it may have something to do with Kodi.
Reply
#8
Free world means: you can think whatever you want :-)
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Thank you for all your help.
If I have some time and ideas I will try to fix the issue. Until then I will just have to get used to those glitches.
Once again thanks a lot Smile
Reply
#10
Hi again!

I've upgraded RAM (now it is 8GB) and installed Ubuntu 16.04 and I had the same problems. I tested Kodi with both ALSA and PulseAudio. I checked using very long buffers in PulseAudio and using interrupt based playback (tsched=0 in PA config). None of these solved the problem. It was the same on Ubuntu and in HDStation.

Is there anything else I can try? It really makes me nervous...

Thanks
Wojtek
Reply
#11
Nope.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply

Logout Mark Read Team Forum Stats Members Help
Crackling/glitches when playing audio, video ok0