Kodi Community Forum
Jerky, unwatchable playback in Kodi 14.0 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Mac OS X (https://forum.kodi.tv/forumdisplay.php?fid=56)
+---- Thread: Jerky, unwatchable playback in Kodi 14.0 (/showthread.php?tid=212855)

Pages: 1 2 3 4 5 6


RE: Jerky, unwatchable playback in Kodi 14.0 - dereklad - 2015-01-26

Thanks for the hdmi handshake info..
Ill just recheck all the cables again as i cant do tv firmware..
Its strange how it just happends with mac mini hdmi2
And never once with ps4 in hdmi3 or tv box in hdmi 1..
Mind you with so many connections i soppose somethings gotta give..thanks


RE: Jerky, unwatchable playback in Kodi 14.0 - Memphiz - 2015-01-27

Had the same on one special apple tv2 firmware connected to my lg tv ... green screen flicker here and there.


RE: Jerky, unwatchable playback in Kodi 14.0 - neandertal - 2015-01-29

Anyone knows if this "fix" is included in any new "nightly" builds yet..?
The newly released 26 Januari one?
http://forum.kodi.tv/showthread.php?tid=213108

I´m wondering if I can update yet or not.

Thanks


RE: Jerky, unwatchable playback in Kodi 14.0 - Memphiz - 2015-01-30

all stuff that is in 14.1 is already in nightly builds. Since you didn't link the exact fix you are looking for its hard to say if its in the build from 26th of january. You also could wait a couple of more days - 14.1 release is around the corner.


RE: Jerky, unwatchable playback in Kodi 14.0 - neandertal - 2015-02-03

What.. I´m talking about this build and fix http://mirrors.xbmc.org/test-builds/osx/x86_64/kodi-20150107-01dc700-fixosxvsyncbp-x86_64.dmg

Its what most of the thread and all my prior posts have been about.


RE: Jerky, unwatchable playback in Kodi 14.0 - Memphiz - 2015-02-03

14.1 has it and is out officially (see kodi.tv blog). Also sorry if i don't have the time to readup all threads i am posting in or tracking what users are talking about normally. I just have not the time to do so. Thats why i rely on specific question if asked Wink


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-05

Hate to say this.. but it doesn't look like the patch made it into the official 14.1 build. The problem is back :/


RE: Jerky, unwatchable playback in Kodi 14.0 - Memphiz - 2015-02-05

I hate to say this too but that patch is in the helix 14.1 branch for sure:

https://github.com/xbmc/xbmc/commit/01dc700e1aef86b578cdc31bdd33a54313fa3976

Might be that some otherpart (not osx specific) is missing in helix and we overlooked it. But i don't know as i don't have the overview over the vsync implementation. Fact is that this is the last helix release - so sadly you would need to wait for either 15.0 or pick a nightly build.


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-05

Well, not complaining, just letting you all know that the problem came back with 14.1. I went back to your build posted in this thread and it works again. Like you said, it's probably some other commit that interacts with it, I don't know.

I'll look it over today to see if I can figure it out.


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-06

Reverted a couple commits and going to test tomorrow.. won't be getting home until late tonight.

I'll post here again if I isolate the conflicting commit(s).


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-07

It appears to be a race condition. I set loglevel to 1 in advancedsettings.xml and got it to work once. Second try it didn't. But it explains why it worked more consistently with the debug build.

Working on a patch now.


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-07

Ok so, yeah, here's the problem:

The only place the reference clock is updated is after the device is reset (on setup). When the device reset callback is called, the display might not yet have actually switched. The reference clock is then set to the old (existing) refresh rate.

Later, the display actually changes, and the Cocoa vblank handler notices this and reports it correctly. But nowhere is this fed back to the reference clock.

This can be seen in the logs:

Code:
10:39:09 T:4724957184   DEBUG: CVideoSyncCocoa: cleaning up Cocoa
10:39:09 T:4724957184   DEBUG: CVideoSyncCocoa: setting up Cocoa
10:39:09 T:4724957184   DEBUG: CVideoSyncCocoa: Detected refreshrate: 60 hertz
10:39:09 T:4724957184   DEBUG: CVideoReferenceClock: Detected refreshrate: 60.000 hertz
10:39:09 T:4556988416   DEBUG: CVideoSyncCocoa: Detected refreshrate: 24.000000 hertz, rounding to 24 hertz
10:39:09 T:4556988416   DEBUG: CVideoSyncCocoa: Detected refreshrate: 24 hertz

There is no message from CVideoReferenceClock stating that it changed to 24Hz.

In short: the display change can take some time to occur, but the callback is called immediately.

Still working up a patch for it.. just thought I'd write it up here.


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-07

Well, I tried adding a callback to VideoSyncCocoa for OnLostDevice(), but the problem now is that OnResetDevice() is called before Cocoa_GetCVDisplayLinkRefreshPeriod() returns the real refresh rate.. which means the DisplayReconfigured callback is being called with kCGDisplaySetModeFlag before it's actually finished switching resolutions. I'm kind of learning as I go here, but I'm pretty sure that's not supposed to be the case.

Not sure how to fix this without a deliberate Sleep() now.


RE: Jerky, unwatchable playback in Kodi 14.0 - Memphiz - 2015-02-09

Does the sleep option in settings->video->playback help (somewhere around the refresh rate adaption option). You could also add some printouts to

https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/osx/WinSystemOSX.mm#L572

and

https://github.com/xbmc/xbmc/blob/master/xbmc/windowing/osx/WinSystemOSX.mm#L613

And around there to see if there are more callbacks after the ones which result in the calling of OnResetDevice. (bascically we try to "forward" callbacks which osx gives us).


RE: Jerky, unwatchable playback in Kodi 14.0 - jingai - 2015-02-09

The sleep option in the settings doesn't help it get the refresh rate right the first time around, but it does help the initial A/V sync. The initial sync is wildly off if I don't set the sleep option to about 3 seconds. It's still off a bit even with it initially, but pressing 'm' to bring up the VideoOSD syncs it up.

To be more clear, I think the A/V sync is off any time the refresh rate changes after the playback has already started. If the reference clock is set correctly before playback starts, everything is fine. But if it changes at any point (which is essentially what is happening), it doesn't automatically sync up audio and video. I'm guessing cdvdplayer needs to do something here.

You can see the OnResetDevice callback is called just once when the resolution changes in this log but the refresh rate is still detected as 60Hz for some 4 seconds (not consistently 4, mind you) or so. With the patch I made, it does eventually pick up the new rate, but as you can see in the log, there would have been no additional OnResetDevice in that case to force it to abort the Run() loop. Without my patch, the reference clock would have stayed at 60.