[MPlayer-users] yum4mpeg audio sync broken

D Richard Felker III dalias at aerifal.cx
Fri Jan 2 20:26:26 CET 2004


On Fri, Jan 02, 2004 at 02:07:09AM -0800, Fredrik Hubinette wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> 
> 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.

No, it's not. This code is to handle avi files with duplicate frames.
If you're getting a/v desync, something else is wrong.

> 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.

vo_yuv4mpeg really doesn't work. You should try mencoder with rawyuv
avi output instead.

Rich




More information about the MPlayer-users mailing list