Macbook Pro random Audio glitches
#1
Good Day,

I have recently set up my old Macbook as a dedicated HTPC using XBMC. Very nice I have to say, so thanks to everyone involved. Unfortunately I have some seemingly random audio issues that I can not pin down. I have tried to solve this for more than a week now and can not get any further.

Anyway the hardware:

Model Name: MacBook Pro
Model Identifier: MacBookPro7,1
Memory: 4 GB
Boot ROM Version: MBP71.0039.B0E
SMC Version (system): 1.62f7


What happens is that seemingly at random intervals the audio suddenly gets a few seconds out of sync , starts jittering and cutting out and stays that way. Sometimes restarting XBMC helps, sometimes it doesn't and the whole problem shows up again soon after. This has happened on the same Machine using the following combinations: Os X Yosemite with 13.2 Gotham and 14.0 Helix Beta 1 and OS X Mavericks with Helix Betas 1, 2 and 3. I usually control Kodi using Yatse on my Android phone. It happens with all three sound output types: Audio via HDMI, Audio passthrough via HDMI and analogue out via the headphone connector.

I think I have systematically tried out almost every Audio setting and various Video playback settings. Including hardware acceleration on and off. No result. Sometimes the problem doesn't show up for a while and then suddenly it does over and over again.

The only things the machine is used for besides XBMC (Kodi), is as a NAS and sometimes running "Transmission" in the background. No Idea if there could be any relation to the problem. I do connect to the machine using rdp and have noticed that when I do the framerate indicator doesn't stay at a constant 24 fps but that value goes up and down slightly. Also when I set XBMC to adjust the TVs refresh rate to match Video the fps indicator doesn't stay at a constant 24 fps but also wanders slightly. The TV does support the 24 Hz just fine though.

The logs:

Here is one debug log where the problem seemed to happen randomly:

http://pastebin.com/RmrUk6KA

And here is one where it started just after switching on "Adjust display refresh rate to match video" in the settings:

http://pastebin.com/SYuzTCSa

Well, thanks for taking the time reading this.
Reply
#2
Your remote control app hammers the webserver - do you have the problem also when yatse is turned off? Also do you have sync playback to display turned on in system->video->playback? If so - try turn it off.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Hmh,interesting. I found all those webserver requests in the logs a bit weird as well. I'll try with the remote off for a while and see what happens. Maybe I'll just use the official XBMC remote app for a while.

No I usually don't have "Sync playback to display" turned on in the settings. Usually I don't even have "Sync display refresh to video on", since I have the feeling that also causes some issues. Although I am not entirely sure about that. As I said the problem seems to happen so randomly that so far I could never reliably reproduce it. And everytime I got my hopes up that it was solved it happened again suddenly.

Thanks for looking into the logs for me. I'll keep trying without Yatse remote and report back.
Reply
#4
No, unfortunately not using Yatse anymore didn't solve the problem entirely. Today I suddenly had the out of sync and glitch problem again. After watching an h264 mkv file for about 15 minutes suddenly the audio was out of sync. I enabled logging and restarted Kodi to watch the same file from the beginning. Now the audio was out of sync pretty much right from the start and started glitching.

One way to pretty much certainly trigger audio glitches on my system is to enable either "Adjust display refresh rate to video" or "Sync playback to display" in the video settings. Note that both were disabled in this specific case though as I usually always have them disabled.

The debug log of this instance can be found here:

http://pastebin.com/Xkdv3E3H

Sync issues seem to be starting at around 18:27:01.

Reguards, F
Reply
#5
With Sync playback to display Enabled did you also select:

-A/V sync method - - Video Clock (Resample audio) Huh

If this is not selected then yes as you have found Audio will get out of sync.

When a video is playing press the "O" key and leave it up.
With the above settings enabled see if the CPU % is hitting 100% or you get lots of dropped (drop) and skipped (skip) frames.

You could also try Settings > System > Video output > and try switching Display Mode from Window to Full Screen, and make sure Vertical blank Sync is Always enabled just in case.

Further info on refresh rates and issues with pre - Intel Haswell Macs can be found here:

https://forums.plex.tv/index.php/topic/9...-x-thread/

Reply
#6
(2014-11-22, 06:23)wrxtasy Wrote: With Sync playback to display Enabled did you also select:

-A/V sync method - - Video Clock (Resample audio) Huh

Yeah, I tried every possible combination of those two settings.

Quote:With the above settings enabled see if the CPU % is hitting 100% or you get lots of dropped (drop) and skipped (skip) frames.

The CPU doesn't hit 100%, but the framerate suddenly becomes irregular. Mostly between 18 and 26 fps.

Quote:You could also try Settings > System > Video output > and try switching Display Mode from Window to Full Screen, and make sure Vertical blank Sync is Always enabled just in case.

Tried that as well. Smile

Quote:Further info on refresh rates and issues with pre - Intel Haswell Macs can be found here:

https://forums.plex.tv/index.php/topic/9...-x-thread/

Thanks for the link, interesting read.

Regards, F
Reply
#7
Have you tried a SMC Reset ?

http://support.apple.com/en-us/HT201295

Otherwise give this a go too:

Download this OSX program and run the problem video files through it.

http://www.emmgunn.com/mp4tools/mp4toolshome.html

Settings for MP4 tools:

- Both Video and Audio - Passthrough
- Settings - Extract Tracks
- Track Selection - All Tracks
- Device - General
- Media Type - Movie

NOTE: anyone else reading this and having issues with video files is advised to follow the above procedure.

It works for both my Mac and my RPi with problem video files.

Reply
#8
(2014-11-22, 20:23)wrxtasy Wrote: Have you tried a SMC Reset ?

http://support.apple.com/en-us/HT201295

Hmh, no. I'll give that a go later


Quote:Otherwise give this a go too:

Download this OSX program and run the problem video files through it.

http://www.emmgunn.com/mp4tools/mp4toolshome.html

Settings for MP4 tools:

- Both Video and Audio - Passthrough
- Settings - Extract Tracks
- Track Selection - All Tracks
- Device - General
- Media Type - Movie

NOTE: anyone else reading this and having issues with video files is advised to follow the above procedure.

It works for both my Mac and my RPi with problem video files.

They are mainly mkv files. Also as far as I can tell it isn't really related to any specific files. But then I could be wrong.

Thanks for the hints. Smile
Reply
#9
Well, I already thought I was lucky, since I haven't had any audio issues for almost a week now and then suddenly today things started acting up again. I am once again out of ideas. Since apparently no one else has these issues maybe it is a specific hardware problem.

One thing I have noticed is that the person in this thread seems to be running very similar hardware.

Anyway in case any of the developers are still interested I'll keep posting the debug logs. Smile


Debug log


Regards, F
Reply
#10
1833.23:04:13 T:4554567680 NOTICE: ES: Client from 192.168.1.100 timed out <- what is that?
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#11
Hmh, according to the DHCP client table some android device in my local network. Let me check the mac addresses to find out which one.

Okay, seems to be my android phone that runs the official xbmc remote app, that I use to control Kodi. Again some remote problem apparently. Weird. Seems this remote caueses less problems than Yatse, but still does under certain circumstances. I still have no clue though why this would cause the audio stream to be suddenly out of sync by a few seconds.

Any idea what I could do except for using no remote at all? Personally I would prefer using my phone to control Kodi, rather than getting an extra standalone remote.

Thanks again for looking into this. Must be a busy time for you guys right now.

Regards, F
Reply
#12
What also might be interesting to note is that this message shows up a few times between 22:54:26 and 23:11:10. The time the audio went audibly out of sync must have been some time between 23:34:00 and 23:40:00 though iirc.

Most likely here:

23:39:08 T:4505968640 DEBUG: CPullupCorrection: detected pattern of length 1: 41708.33, frameduration: 41708.333333
Reply
#13
Does no using the remote app fix the audio issue? I suppose no? PullupCorrection is really out of my paygrade ... (i never understood it and its not somethinge i am willing to dive in).
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#14
No idea whether not using the remote app fixes the problem entirely to be honest. I would have to try not using any remote app for an extended period of time. As I said, sometimes I don't have any audio glitches for quite an extended period of time. Which makes finding the culprit quite difficult.

I have switched from using Yatse as a remote to the official XBMC remote a while ago (beginning of this thread) and this has indeed greatly reduced how frequent these glitches occur. It doesn't seem to have solved it entirely though. So yeah, it is possible that something on the remote side triggers this whole thing. As long as it happens only very rarely it is not that of an issue. Restarting Kodi usually fixes it. But when it happens more frequently it greatly reduces viewing pleasure. Smile

Which is sad, because otherwise Kodi really is as sweet as it gets. Really nice work guys. Both powerful and nice and easy to work with. Which is something most big commercial companies don't manage to achieve. I guess if I can't solve this problem at some point I'll either try installing a different OS other than OS X on this machine or get a different device entirely to install Kodi on.

Anyway, thanks as usual and I hope I didn't stretch that paygrade too far. Wink
Reply
#15
Hope its not a Hardware issue, something simple like failing RAM would be the best.

The test instructions are here:

http://www.macworld.com/article/2362040/...ix-it.html

Reply

Logout Mark Read Team Forum Stats Members Help
Macbook Pro random Audio glitches0