Distorted Audio via HDMI to Vizio TV
#1
Hello folks,

Again I have spent well over a month researching Clipping and or Distorted HDMI audio out from XBMC/Kodi. This seems to have been an issue for some time without any resolve and has been around since mid to late XBMC years.
Has anyone come up with a fix for the issue with Kodi using PulseAudio or ALSA?
Please take note: This is not an issue with any other media player or web browser based media.
The HDMI audio is going directly to my Vizio TV. I have bypassed my Onkyo due to bad capacitors on the HDMI switching board. Something I am repairing myself and has nothing to do with this audio issue.

Apparently it has something to do with the sampling or timing since the distorted clicking sound has very distinctive pattern which can be heard mostly during music, long musical note or tone. The audio also distorts on peaks. I have tried setting levels in Alsa via the terminal and this does not have any effect at all with Kodi. The only changes I can make is via PulseAudio Volume Control. This only adjusts the levels but does not make any difference with the clicking or distortion, it is still there, but just at lower audio levels.

I thought maybe it could be that the output of Kodi was over driving Pulse, in turn over driving the HDMI, but that does not seem to be the issue.
I have also noticed that the voice seems to go out of phase as if to remove the voice and leave the music and other non voice items in the video. This issue is not as annoying as the clipping and distortion.
I have my system updated just about daily and Kodi is set to Nightly.

Here is my current kernel info. LinuKodix HTPC 3.16.0-50-generic #67~14.04.1-Ubuntu SMP Fri Oct 2 22:07:51 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

lspci | grep udio
00:07.0 Audio device: NVIDIA Corporation MCP67 High Definition Audio (rev a1)
01:09.0 Multimedia video controller: Conexant Systems, Inc. CX23418 Single-Chip MPEG-2 Encoder with Integrated Analog Video/Broadcast Audio Decoder


I also tried this change in etc/pulse/default.pa
load-module module-udev-detect tsched=0
This did not make any difference for my situation and actually it makes the distorted clicking sound worse.

Thanks for your time reading this and any help would be greatly appreciated not only by me but others with this ongoing issue.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#2
Post your Debug Log. This sounds like you manually tuned your amplification.

Start with a fresh .kodi as this is file dependently saved in the db.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Hi Fritsch,
Thank You for replying so quickly.

This has going on from a fresh install of XBMC to Kodi. I usually just deal with it, but I am trying to tackle it again since it is getting to the point of being a complete annoyance now.
As stated above, there are others posting this same issue with no resolve. I do not think this is mainly a Kodi issue, but maybe the way it is interfacing with PulseAudio. I am willing to keep at this until we can come up with a working and final fix for this issue without using work-arrounds.
At this point I do have other items added, but this issue occurs even after a fresh install, before the additional add-on packages.
If needed to resolve this issue once and for all, I will remove Kodi and the additional add-on packages, reinstall and do another log. I would hate to go this route again since I have Kodi set to the way I like at this point, but if needed, another clean install it is.

Here is the log file URL:
http://xbmclogs.com/pba698mn0
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#4
Quote:I do not think this is mainly a Kodi issue, but maybe the way it is interfacing with PulseAudio.

Kodi implements a pulseaudio stream. You can see that one in e.g. pavucontrol. Kodi only controls this stream's volume - not touching anything systemwide.

As you say you have the very same issue with ALSA - it's nothing pulse dependend.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
Please provide a minimal Debug Log. In your current I stopped reading after the 100st tvheadend error that is sending broken streams.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#6
Hello again

How do you want the log then? I'm guessing that I need to remove Kodi and just do a fresh install.

As for Alsa, making changes via the terminal using sudo -H alsamixer has no effect to any of Kodi's audio. Having any other audio issues which I have not encountered so far, just the usual audio adjustments that Alsa may used to interface with some other programs. I have not yet had to look for any issues pertaining to Alsa.

My personal thought on Linux's audio and the unholy marriage between Alsa and PulseAudio.
I think the marriage should annulled.
Get both development teams in the same room lock the door and not let them out until they come up with a single audio package for all Linux distros. Of course pipe in coffee and provide three meals of Brain type food a day and no sugar.

All joking aside, this distortion/clicking audio issue takes the enjoyment out of a great home theater package such as Kodi. So where does this issue really lay? Is it within Kodi, PulseAudio or a combination of the two? How do we actually pinpoint and resolve the issue not only for me but others experiencing the same?
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#7
mv ~/.kodi ~/kodi-backup

kodi

turn on debuglogging

reproduce and post the log

This has nothing to do with Linux and ALSA vs pulseaudio ...
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#8
I added a few add-ons to test the audio and the few I added all have distorted and clicking audio.
I have no way of testing Live TV and probably will not use TVHeadend again since it has too many issues.

Here is the second log file link.

http://xbmclogs.com/pusiar3rg

----------------------------------------

This is another log after testing one add-on video source.

http://xbmclogs.com/pd1xjhxuy

Same issue with the audio, this was not a HD video but an old B&W TV show in SD.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#9
Now you even changed your kodi version ...

Quote:18:50:03 T:139887068563200 ERROR: Unable to load librtmp.so.1, reason: librtmp.so.1: cannot open shared object file: No such file or directory
18:50:03 T:139887068563200 DEBUG: Dll librtmp.so.1 was not found in path
18:50:03 T:139887068563200 ERROR: CDVDPlayer::OpenInputStream - error opening [rtmp://sdwfchwqitj2v.cloudfront.net/cfx/st/mp4:videos/nova-science-now/9cce8fdc-eec6-4577-a067-b8a22b9f037f/9764/hd-mezzanine-16x9/Einstein_Brain_FCP-web-16x9.mp4]

you miss librtmp1.

Can you please provide a local audio sample that has this issue, so that I can reproduce?

And after this, do:
Code:
mkdir -p ~/.config/pulse
echo "autospawn=no" > ~/.config/pulse/client.conf
pulseaudio -k

Now run kodi again, verify that ALSA is now used - you need to change your audio device and reproduce with the sample you chose for me to reproduce.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#10
The version change is a result of Post #7
mv ~/.kodi ~/kodi-backup
kodi


After following the above Kodi ran as a fresh installed version and apparently not a Nightly which is updated almost everyday when there is an nightly release. When I ran Kodi from the terminal it ran as a stripped down fresh install minus all add-ons. Sorry, I can't explain the version change. I only see one installed folder in Home as .kodi.


As for a sample,
CDVDPlayer::OpenInputStream - error opening [rtmp://sdwfchwqitj2v.cloudfront.net/cfx/st/mp4:videos/nova-science-now/9cce8fdc-eec6-4577-a067-b8a22b9f037f/9764/hd-mezzanine-16x9/Einstein_Brain_FCP-web-16x9.mp4]
I can't explain why Kodi is trying to open CDVDPlayer when it should be opening a RMTP stream from PBS add-on.

18:50:03 T:139887068563200 ERROR: Unable to load librtmp.so.1, reason: librtmp.so.1: cannot open shared object file: No such file or directory
18:50:03 T:139887068563200 DEBUG: Dll librtmp.so.1 was not found in path

As you can see Kodi is trying to open a streamed RMTP file and apparently it is not on the server where it was requested.

Before I kill Pulseaudio and force Alsa as the source player I do not hear any issues with distortion during a CD, DVD or Live TV play.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#11
Quote:18:50:03 T:139887068563200 ERROR: Unable to load librtmp.so.1, reason: librtmp.so.1: cannot open shared object file: No such file or directory
18:50:03 T:139887068563200 DEBUG: Dll librtmp.so.1 was not found in path
I cannot see what you say I should see - I only see that you do not have the librtmp1 package installed: sudo apt-get install librtmp1

Please follow this advice here: http://forum.kodi.tv/showthread.php?tid=...pid2129970 and bring me a file that I can use to reproduce.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#12
The URL above points to this
Kodi Community Forum
The specified thread does not exist.

As for librtmp1, shouldn't that package have been installed when installing Kodi? If not, maybe that should be a requisite when installing Kodi.
If it was installed along with Kodi, there should have been no reason that it got uninstalled unless it was removed as a Not Needed file during a kernel update, which I doubt would be the case.

It is installed now so lets see what happens. I will kill Pulse and use Alsa as the source player and see what happens as long as this can be reversed to the original setting for Pulse.
I will post an update on my findings after the changes.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#13
Pulseaudio is not running now per the instructions above and there is still distortion.
The only samples without loading the memory and CPU would be the Add-On named MeTV and watch any old B&W shows. You can also try the add-on EEVBlog and play the video "How to design a digital clock"

The distortion is equally the same with HD and SD video with ACC audio. There is less noticeable distortion when the frequency response of the audio track of the video lacks high frequency components. In other words, muffled base to mid ranged audio.

The sample audio would have to be recorded via another device in front of my speakers on my TV. I could pull a audio cable from my VO studio's mixer and use my mics in front of the TV, but this would be overkill and I rather not disturb my VO studio settings just to record a sample of this distortion. Unfortunately this wide screen Vizio TV does not have a headphone output or I would record a sample of the audio and post it somewhere.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply
#14
I bet vlc will produce the same issue, it is the content not our audio engine, has nothing to do with pa nor alsa either.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#15
Well I may have agreed with you on this, but I just took the stream info from #10 and it played flawlessly, no distortion, no clicking and no out of phase audio At least this in my case with the HDMI going from the computer directly to the TV.
rtmp://sdwfchwqitj2v.cloudfront.net/cfx/...b-16x9.mp4

I still think it is a combination of one of the audio programs PA or Alsa and how they are being driven from Kodi. I am leaning towards your comment in reference to content though.
If I play a CD, DVD or live content it seems to be without any distortion or clicking in the audio, but as soon as there is a live stream, or RMTP stream or anything with an ACC codec there is distortion. The ACC icon shows with most streaming content.

The only way that I can think of to test this is to find different sources using different codecs and sort out which has the distortion and which does not and maybe use VLC as a reference.
Is there a way for Kodi to display the different codecs used when any media is playing? If so lets go that route and find the needle in the haystack.
Processor: AMD Athlon™ 64 X2 Dual Core Processor 4000+ × 2
Memory: 2GiB
Graphics: GeForce 7050 PV / nForce 630a/integrated/SSE2
HardDrive: 320 GB
DVB: AVerTVHD MCE A180
Keyboard/Mouse: Wireless
OS Type: 14.04 64-bit Trusty
Kodi: 14.x
Receiver: Onkyo TX-SR606
TV: Vizio 42" LCD
Computer was formerly a Captiveworks 3000 HTPC
Reply

Logout Mark Read Team Forum Stats Members Help
Distorted Audio via HDMI to Vizio TV1