[PATCH] Global AV delay support via advancedsettings.xml

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hack_kid Offline
Fan
Posts: 567
Joined: Jan 2007
Reputation: 2
Post: #71
a11599 Wrote:Ok. Would you please check something? If you change around line 518 in xbmc\cores\dvdplayer\DVDPlayer.cpp this:
Code:
SetGlobalAVDelay(g_graphicsContext.GetVideoResolution(), false);
to this:
Code:
SetGlobalAVDelay(g_graphicsContext.GetVideoResolution(), [u]true[/u]);
Does it fix the issue?

ok found a line similar it says the same thing except after getVideoResolution there is RefreshRate i switched it to true and am compling. will repot back. sorry for the delay in posting just got a new phone, been tinkering Smile
find quote
Hack_kid Offline
Fan
Posts: 567
Joined: Jan 2007
Reputation: 2
Post: #72
damn sadly it didnt work, i think it has something to do with the parsing of the advanced settings xml. when i set the delay for 60htz to anything but 0 it just adds that number to the 24htz delay example: 24htz delay is 200 6htz is 5 result 205
find quote
negge Offline
Fan
Posts: 417
Joined: Dec 2010
Reputation: 5
Location: Finland
Post: #73
I just stumbled upon a short clip which has absolutely no audio lag (as far as I can tell, and I've gotten pretty good at it) even though the file is 23.976 fps and the refresh rate is set to 24Hz. I'll try to examine the logs when comparing to a lagging clip and see if I can find anything, will post back if so.
find quote
meridius Offline
Fan
Posts: 709
Joined: Jul 2010
Reputation: 1
Post: #74
Hi all

I just have problems with DTS when using 24hz its seems to be out by 205ms. The strnage thing is i have no problems with AAC, Dolby digital, Mono and stereo with 24hz its just DTS tracks.

another thing i found strange is i have 1 movie with a MONO DTS track so it just has 1 channel and that plays perfect at 0ms at 24hz. so it might be somthing to do with how many channels in the DTS track that effects this.

I also used the BBC test program which was in DTS and i recorded my tv screen with my ipad and then played it back in imovie which showed me how to get a perfect sync with my sound to picture.

I had to set it to 200ms but i reckon its between that and 210ms

get no problems at 60hz on anythig just 24hz

just hope this problem can be fixed in future updates

hope this helps
find quote
negge Offline
Fan
Posts: 417
Joined: Dec 2010
Reputation: 5
Location: Finland
Post: #75
That might just be it. I watched a couple of episodes of Spartacus yesterday. It has DD5.1 audio and I didn't notice any audio whatsoever. I'm gonna have a look at the logs later.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,023
Joined: Sep 2011
Reputation: 252
Location: Canada
Post: #76
Hmmmm... these are very worthwile observations. Can you guys pls continue to post your findings as to whether this seems to be just a DTS issue?

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
negge Offline
Fan
Posts: 417
Joined: Dec 2010
Reputation: 5
Location: Finland
Post: #77
I just tried playing a file with DD audio and one with DTS. Looking at the logs this is the only interesting piece I found:

Code:
19:26:16 T:2833431408   DEBUG: CDVDPlayerAudio:: synctype set to 0: clock feedback
19:26:16 T:2833431408   DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(32000.000000, 1)
19:26:16 T:2833431408   DEBUG: CDVDPlayerAudio:: Discontinuity - was:152.902000, should be:0.000000, error:-152.902000

This happens on both files.

Edit: Here's (http://pastebin.com/raw.php?i=DrcQgvHr) a full partial log from when first playing a file with DD5.1 audio (which doesn't seem to lag, although I'm honestly not 100% certain) and a movie with DTS sound which IIRC lags.
(This post was last modified: 2012-02-19 19:40 by negge.)
find quote
sebj Offline
Senior Member
Posts: 171
Joined: Nov 2008
Reputation: 0
Post: #78
Interesting info.

Great to see movement in this area.

My sync problems, however are codec agnostic.Confused

Every single 23.976 file has to have audio corrected, be it dts,acs or mono aac.

The patch works flawlessly in my setup.
find quote
negge Offline
Fan
Posts: 417
Joined: Dec 2010
Reputation: 5
Location: Finland
Post: #79
In my case it seems the "discontinuity" value from the logs is the amount I need to delay the audio by. Of course it's practically impossible to be sure of that since nobody can hear a 1ms lag, but I usually set my delay to somewhere between 150 and 200 depending on source.
find quote
DDDamian Offline
Team-XBMC Developer
Posts: 3,023
Joined: Sep 2011
Reputation: 252
Location: Canada
Post: #80
It's not unusual to see one Global Sync at the start of playback as well.

System: XBMC HTPC with HDMI WASAPI & AudioEngine - Denon AVR-3808CI - Denon DVD-5900 Universal Player - Denon DCM-27 CD-Changer
- Sony BDP-S580 Blu-Ray - X-Box 360 - Android tablet wireless remote - 7.1 Streem/Axiom/Velodyne Surround System
If I have been able to help feel free to add to my reputation +/- below - thanks!
find quote
Post Reply