[MPlayer-users] yum4mpeg audio sync broken

Fredrik Hubinette hubbe at hubbe.net
Fri Jan 2 11:07:09 CET 2004


I'm writing a script that uses mplayer as a first step in converting
movies of various formats to DVDs. However, I'm having various problems
with the audio sync, and while reading mplayer.c I came across this
code:


         } else {
             /*
             Well, no blitting is needed, but some devices (such as yuv4mpeg) m\
ust output frame
             otherwise A/V desync will occur. -- Alvieboy
             */
            if (vo_config_count)
                video_out->control(VOCTRL_DUPLICATE_FRAME, NULL);
         }


As far as I can tell, this code is wrong. Frame dropping is done specifically
to *preserve* A/V sync, and the code above prevents that from working.
I also noticed that there doesn't seem to be any code that can generate
extra frames if the audio should fall behind the video.  The code for
this seems to exist in mencoder, but unfortunately mencoder cannot output
yuv4mpeg...

In my script I currently have a workaround that reads the "ct:" part of
the mplayer output and drops frames if ct becomes too large, but it's
a really really really ugly workaround.

  /Hubbe








More information about the MPlayer-users mailing list