[MPlayer-dev-eng] A-V sync improvement attempt

ubitux ubitux at gmail.com
Mon Mar 22 14:45:03 CET 2010


Hi,

I've a video with a audio stream which starts 15 seconds after the
beginning of the video; this is not well supported with mplayer. Indeed,
each second, there is a 100ms readjustment, so it takes a while to get the
video fully synchronized.

We can handle the situation using forward/backward controls, -mc, or any
-delay like options. But it's not the default behavior, mplayer should
handle that.

Here is an extract to see the issue:
http://yozora-irc.net/~ubitux/vids/hoshi-no-koe-av-sync.avi.

And this is the temporary bad "fix" who actually solves the problem, but
simply skips the problematic part:

Index: mplayer.c
===================================================================
--- mplayer.c   (revision 30945)
+++ mplayer.c   (working copy)
@@ -2070,7 +2070,7 @@
            if (default_max_pts_correction >= 0)
                max_pts_correction = default_max_pts_correction;
            else
-               max_pts_correction = mpctx->sh_video->frametime*0.10; // +-10% of time
+               max_pts_correction = mpctx->sh_video->frametime;
            if (!between_frames) {
                mpctx->delay+=x;
                c_total+=x;

I'm not friendly with the video/audio problematics, so the patch was just
an attempt to have a quick fix about the issue...

If no one wants to correct this in the proper manner, can you just give me
a hint or two about this?

Regards,

-- 
ubitux



More information about the MPlayer-dev-eng mailing list