Thread: mplayer vdpau
View Single Post
Old 09-26-09, 06:39 AM   #1195
Registered User
Join Date: Jul 2009
Posts: 11
Default Re: Blu-ray audio desync in 28900+ mplayer SVNs

The problem is how mplayer handles frame display in VDPAU (and some other video outputs). It results in mplayer getting out of A-V sync when refresh rate is nearly the same as fps of movie. To fix this I have patched mplayer to drop frames in VDPAU layer when they cannot be displayed in time to avoid A-V gets out of sync (if frames are dropped it will be displayed on status line)

Also, to avoid having to drop frames, I have added the option -displaysync which adjusts speed of movie to match refresh rate (if within 5% of refresh rate or double refresh rate).
So a 23.976Hz or 25Hz movie will be adjusted to match a 23.976 refresh rate (or a 50hz refresh rate). It will save in the .mplayer directory data that is reused next time to calculate better speed adjustments. Some movies are more unstable and produce less good data, full screen normally gets better results and using VDPAU overlay. When using this option, do not change refresh rate after movie has started as my patches only reads refresh rate when movie starts.

I have used these patches for many months and they works well for me.

You are welcome to try my patches, which I have attached.

To answer Carl Eugen, one reason that seeing 90% of frames twice and the rest once gives bad display is that some TVs (like Sony's) include motion interpolation which will get disrupted by uneven display of frames.
Attached Files
File Type: gz mplayer-vsync-vdpau-09-11.txt.gz (10.4 KB, 161 views)
danoscar is offline   Reply With Quote