24p and audio sync issues

  Thread Rating:
  • 7 Votes - 4.71 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
toby77jo Offline
Member
Posts: 86
Joined: Mar 2010
Reputation: 0
Post: #51
how i install the patch? i have downloaded it but how to install on ubuntu?
find quote
Voyager Offline
Team-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
Location: Belgium
Post: #52
toby77jo Wrote:how i install the patch? i have downloaded it but how to install on ubuntu?

you can only install it if you make your own build.
find quote
toby77jo Offline
Member
Posts: 86
Joined: Mar 2010
Reputation: 0
Post: #53
i am building from svn every day, what is the command to inlcude the patch when i do ./configure make etc?
find quote
Voyager Offline
Team-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
Location: Belgium
Post: #54
toby77jo Wrote:i am building from svn every day, what is the command to inlcude the patch when i do ./configure make etc?

ok, you have to "apply the patch" to the code. Under Windows I use Tortoise SVN and use the "apply patch" function.

In Linux, according to what I found online, you'll have to use the standard Unix "patch" tool as follows:
Code:
patch -p0 < patch_file

Then, run your build as usual.
If unhappy with the changes use svn revert on the modified files.
find quote
Lister of Smeg Offline
Senior Member
Posts: 110
Joined: Mar 2010
Reputation: 0
Location: England
Post: #55
Just a thought, but has anyone tried this?

Disable desktop composition in the properties of the .exe/shortcut. (Compabitility tab).

CrystalP mentioned this in another thread which i promptly tried. It has sorted out my sync issue with 24p content and ATI 5450.

Turn Windows Aero off also has the same effect.

Thanks to CrystalP for this.

HTPC specs:
Samsung 40" ES8000 3DTV, Win8 Pro 64bit, Intel Core i3 530, ATI HD5450, Antec Minuet HTPC Case, 6GB Kingston HyperX DDR3 1333, Gigabyte GA-H55M-USB3
find quote
Voyager Offline
Team-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
Location: Belgium
Post: #56
Lister of Smeg Wrote:Just a thought, but has anyone tried this?

Disable desktop composition in the properties of the .exe/shortcut. (Compabitility tab).

CrystalP mentioned this in another thread which i promptly tried. It has sorted out my sync issue with 24p content and ATI 5450.

Turn Windows Aero off also has the same effect.

Thanks to CrystalP for this.

Yes of course, it resolved the problem described in that thread, namely that 24p video playback became very CHOPPY (like 2-3 fps) when switching auto refresh in combination with Aero turned on.
The problem in this thread is a different one: that both audio and video are smooth, but audio is about 250 ms off from the video. Funny enough a lot of people have that same issue, regardless of the platform (not even a Windows-only thing).
(This post was last modified: 2010-12-03 15:42 by Voyager.)
find quote
Voyager Offline
Team-XBMC Member
Posts: 304
Joined: Apr 2010
Reputation: 4
Location: Belgium
Question  Is the audio sync issue ever going to be addressed? Post: #57
I have the following set up:
- Atom/ION 330
- Windows 7 32 bit
- latest nVidia drivers 260.xx - desktop res 1920x1080 @ 50Hz
- latest SVN Dharma RC
- True full screen
- Aero OFF
- Auto adjust refresh rate ON
- Sync playback to display ON & sync method "drop/dupe audio"

When I play 24p material (I should say, 23.976 Hz), the TV nicely switches to 24Hz and I can now most of the time (but not always!) get perfect lip sync - without the 'patch' mentioned prior in this thread.

History
- I did not experience this sync issue as long as I was sticking to the desktop refreshrate of 50 or 60 Hz (with Auto adjust is OFF).
- The issue started when I started to use Auto adjust refreshrate (to benefit from TV optimization for 24p video)
- With "sync playback to display" turned OFF I was getting the audio sync issue almost everytime for 24p material. I experimented with the patch to always have 250ms delay in this case, and it worked fine.
- Now with "sync playback to display" turned ON (and no patch), there is still a minority of videos where I get a ~200 ms out-of-sync issue. Generally in those cases, I see a rapidly increasing vblanks "missed" counter.

What info do the devs (bobo1on1) need to get to the bottom of this? Thanks!
find quote
djon Offline
Senior Member
Posts: 176
Joined: Oct 2004
Reputation: 1
Post: #58
a11599 Wrote:I also experience this on my Panasonic plasma which has no such video enhancement features. So I have put together a patch, which automatically adds a -250 ms delay (works great for me) to the one which is set for the movie for low fps video modes when sync refreshrate is enabled.

Here it is:
http://pastebin.com/1PKpbx7r

To stress again, this is not a nice solution, just a dirty workaround to fix the behavior on my system, but might also be useful to others. Not tested on anything other than windows, but I think it should work on other platforms also.

ps.: If -250 ms does not suit your setup, you can change -0.25f to the value you prefer in the line which says:
g_settings.m_currentVideoSettings.m_GlobalAudioDelay = -0.25f;

I'd like to be able for XBMC for switch resolution for not just low FPS mode, but a combination of 23.976 FPS AND a non HD resolution. This is because I have no issues with HD releases, but only SD releases.
Is this possible?

Also, why has it been set to check for <=26 ? Shouldn't it be <= 24? I have no issues with 25 fps releases, since this is what I often record TV in.
find quote
a11599 Offline
Team-XBMC Member
Posts: 254
Joined: Sep 2010
Reputation: 2
Location: Budapest, Hungary
Post: #59
Well, you can take the patch and adjust to suit your needs. Smile 26, it is not video fps, but display refresh rate. 25p video is played back at 50 Hz usually, while 24p video is played back at 24 Hz. Therefore, the patch does not kick in for 25p video normally, only if the display actually supports 25 Hz refresh rate (I assumed that should be affected by this bug as well).
find quote
djon Offline
Senior Member
Posts: 176
Joined: Oct 2004
Reputation: 1
Post: #60
Thanks for clarifying my fps/refresh rate confusion.

Do you know if I can find something to check for the currently played video resolution in GraphicContext.cpp, equivalent to when you check for

g_settings.m_ResInfo[res].fRefreshRate<=26.0f

so I can check for this in the if statement before adjusting the audio delay?
find quote
Post Reply