[MPlayer-users] yum4mpeg audio sync broken

Fredrik Hubinette hubbe at hubbe.net
Fri Jan 2 23:11:47 CET 2004


No, that's not the answer. Because in my particular case, I have a
movie where the sound is offsetted by ~2 seconds from the video.

If I play the video to the screen, mplayer quickly adjust the video
to sync up with the audio, but when I use yuv4mpeg audio and the
-framedrop flag, the code below actually *prevents* mplayer from
syncing the audio to the video.

I've read mencvcd, and I'm reasonably certain that mencvcd would
create a video with a 2 second lag between the audio and video,
just like my script does. (Unless you use --sync 2.0 or some other
manual fix.)

        /Hubbe

"Jürgen Hammelmann" <Juergen.Hammelmann at gmx.de> writes:

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi, 
>  
> for encoding with yuv4mpeg you have to disable frame dropping in mplayer!!! 
> Look at my TOOLS/mencvcd script how to do it. 
>  
> Ciao, Jürgen Hammelmann 
>  
> > [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. 
> > 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