[PATCH] Global AV delay support via advancedsettings.xml

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sebj Offline
Senior Member
Posts: 184
Joined: Nov 2008
Reputation: 0
Post: #61
@a11599

I compiled the patch in beta3 and it still works.

For the time being I can live with compiling my own builds (opens the door for cool stuff aswellBig Grin)

But I'm scared of the day when your patch will not work anymore. Sure I can compile and stuff, but you know, I'm not getting into programming, maybe in another life.

Have you taken recent look at integrating in xbmc directly?

Eden's not out yet, crossing fingers.
find quote
a11599 Offline
Team-Kodi Member
Posts: 305
Joined: Sep 2010
Reputation: 3
Location: Budapest, Hungary
Post: #62
Not yet. But this will not be in Eden for sure. Eden is in feature freeze. But it might be there in Frodo.

My patches (source code) :: Windows installer builds
These builds are unofficial! If you find a bug, make sure it is also present in a recent official build and you can reproduce it before filing a ticket.
find quote
Hack_kid Offline
Fan
Posts: 646
Joined: Jan 2007
Reputation: 4
Post: #63
Actually a1599 there is a bug with your patch, if u have a queue of videos and the first is 24htz and the 2nd is 60 the delay for the 2nd video is what u set for 24htz. I think the problem lies in the delay not being reset at end of video but not sure give it a try I can reproduce it at will
find quote
a11599 Offline
Team-Kodi Member
Posts: 305
Joined: Sep 2010
Reputation: 3
Location: Budapest, Hungary
Post: #64
Hack_kid Wrote:Actually a1599 there is a bug with your patch, if u have a queue of videos and the first is 24htz and the 2nd is 60 the delay for the 2nd video is what u set for 24htz. I think the problem lies in the delay not being reset at end of video but not sure give it a try I can reproduce it at will

Please reproduce and post a debug log. I have an idea, but would like to see what's going on before making the change.

My patches (source code) :: Windows installer builds
These builds are unofficial! If you find a bug, make sure it is also present in a recent official build and you can reproduce it before filing a ticket.
find quote
Hack_kid Offline
Fan
Posts: 646
Joined: Jan 2007
Reputation: 4
Post: #65
as always with pastebin i cant fit the log unless i'm a "Pro" users pffft. hold on trying to figure out another way to do this
find quote
Hack_kid Offline
Fan
Posts: 646
Joined: Jan 2007
Reputation: 4
Post: #66
ok here we go

https://rapidshare.com/files/2600706249/...ay_bug.log
find quote
a11599 Offline
Team-Kodi Member
Posts: 305
Joined: Sep 2010
Reputation: 3
Location: Budapest, Hungary
Post: #67
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?

My patches (source code) :: Windows installer builds
These builds are unofficial! If you find a bug, make sure it is also present in a recent official build and you can reproduce it before filing a ticket.
find quote
ashlar Offline
Donor
Posts: 2,112
Joined: Mar 2006
Reputation: 27
Post: #68
a11599 Wrote:Not yet. But this will not be in Eden for sure. Eden is in feature freeze. But it might be there in Frodo.
Yes. But I still fail to understand how the problem your patch solves can't be considered a bug.

This need for constant delay *is* a bug. This patch is not a feature, it's a correction of a bug. It might be a workaround, fine. But it still fixes a bug, it doesn't introduce any new feature.

If this isn't included in Eden, I think it's a real mistake.

For troubleshooting and bug reporting please make sure you read this first.
find quote
a11599 Offline
Team-Kodi Member
Posts: 305
Joined: Sep 2010
Reputation: 3
Location: Budapest, Hungary
Post: #69
That is the nature of the feature freeze. If someone would find the root cause of this entire delay issue (I had/have theories, but failed to prove them so far) and would come up with a proper fix, that might be a different thing.

My patches (source code) :: Windows installer builds
These builds are unofficial! If you find a bug, make sure it is also present in a recent official build and you can reproduce it before filing a ticket.
find quote
ashlar Offline
Donor
Posts: 2,112
Joined: Mar 2006
Reputation: 27
Post: #70
I'll stop with this last message but again I don't really see how something like this should be affected by a *feature* freeze. To be able to playback material without introducing unwanted delay should be natural for any kind of media player.

XBMC can't do this and hasn't been able for quite some time now. Your patch fixes this problem. It corrects a bug. It does this without going to the root of the problem, which is apparently a really tough nut to crack. But it still manages to fix it. How can this be considered introducing a feature? Whatever "feature" this gets you is a side effect, nothing more.

Is any of the developers capable of explaining it?

For troubleshooting and bug reporting please make sure you read this first.
find quote
Hack_kid Offline
Fan
Posts: 646
Joined: Jan 2007
Reputation: 4
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: 646
Joined: Jan 2007
Reputation: 4
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
Team-Kodi Member
Posts: 2,377
Joined: Dec 2010
Reputation: 25
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
Posting Freak
Posts: 877
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
Team-Kodi Member
Posts: 2,377
Joined: Dec 2010
Reputation: 25
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
Post Reply