[MPlayer-dev-eng] [PATCH] vdpau fixes and timing enhancements

Dan Oscarsson Dan.Oscarsson at tietoenator.com
Thu Apr 23 09:33:22 CEST 2009


On 2009-04-20 at 19:57 +0300 Uoti Urpala wrote:
> At least the sync-to-video part is clearly not OK. As discussed
> previously this is a bad implementation, and there are enough problems
> that it's not suitable for inclusion on a "until someone writes a proper
> one" basis either. On the code side it interferes with other features.
> For users it's nontrivial to use, requiring them to study documentation.
> It adds several options that should not be needed. Removing those
> options later would cause problems again. 

I guess the nontrivial use is the timing correction option. I know. I
will move that so it is handled without user interaction. The leaves one
option for enabling syncing movie to display rate.

Though I will split my patches into the vdpau patches and the timing
patches.

But I would like to discuss if my timing handling is a bad
implementation. What problems exist? Have any of you tried my patches
and seen problems?

I did a quick test with mplayer running a 23,976 Hz movie om my TV set
to 23,976Hz.

Standard mplayer: starts with audio out of sync, and that value
increases slowly. If you add option -framedrop, mplayer will drop frames
(normally several in a row) every time audio delay is more than 100 ms.

My code, in no drop mode: starts with audio in sync (this is due to my
code doing video decode before audio decode), and then slowly going out
of sync. Option -framedrop gives same results as in standard case.

My code, drop on max delay: audio in sync, about one frame drop per 36
seconds.

My code, drop on max delay, sync speed to display rate: audio in sync.
about one frame drop per 10 minutes.

My code, drop on max delay, sync speed to display rate with timing
correction: audio in sync. Practically no frame drops.

If you play a 25hz move on the 23,976hz display rate, standard mplayer
get much worse problems while my code that sync to display rate will
slow down move to 23,976hz and play it fine.

-
So mplayer is not usable for me on a display running at 23,976hz unless
my patches have been applied. I know many more have the same problem.

Uoti suggested changing audio for each frame to fix the audio out of
sync problem, that would still result in changing the speed of the
movie. The difference is that it has be be calculated every frame and
changed every frame. My way is simpler.





More information about the MPlayer-dev-eng mailing list