[MPlayer-users] Audio/video sync... again

D Richard Felker III dalias at aerifal.cx
Mon Nov 10 05:20:40 CET 2003


On Mon, Nov 10, 2003 at 04:57:20AM +0100, Vidar Wahlberg wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> > > Is it only me who's stuck with this problem?
> > 
> > Try with -oac copy or -lameopts cbr and see if the problem goes away
> > with either or both of these. Using cbr is NOT a good idea, but this
> > will tell whether the problem is the elusive 'lame bug' or not. If
> > this fixes the problem, I would recommend downgrading to lame 3.90 or
> > earlier, which definitely does not have such a bug.
> 
> Thanks for a quick answer.
> 
> Didn't want to write too much info in case I'm the only one having this
> problem, but I see that I could've provided more info:
> 
> I've made a script that encodes the video to XviD and simply copies
> the audio (-oac copy). This is done in a 2-pass mode.
> Further I dump the sound with mplayer from the newly made XviD file and
> encode this wave file with oggenc before merging the ogg and the XviD to
> a new ogm file.
> When this is done I'm stuck with the original vob (audio is in sync), a
> encoded movie.avi where the sound is copied and a movie.ogm. So I'm not
> even using lame in the process. However, in both movie.avi & movie.ogm
> the audio seems to have the exact same desync, which is as previously
> mentioned about -200ms to -350ms. Funny thing is that I tried with a old
> Star Trek DVD and there the audio almost was in sync, but that's just
> one DVD out of 6.
> 
> So it boils down to:
> Encode from vob with -oac copy
> Encode from DVD with -oac copy
> Encode from vob with -nosound, then get sound from vob with mplayer,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is definitely a problem. Using -nosound will ruin A/V sync. Even
if you intend to throw away the audio, you MUST enable audio while
encoding. Either use -oac copy or -oac pcm.

> 	encode with oggenc and merge it with the produced XviD file
> Same, just ripping from DVD instead of vob
> "mencoder dvd://1 -o movie.avi -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:vbitrate=1800 -oac copy" (from man page)
> 
> I've only used mplayer, mencoder, oggenc and ogmmerge. The problem is
> before I use oggenc and ogmmerge, as all these methods cause the audio
> to be out of sync.

It sounds to me like your DVD might just be strange, but I'm not sure
why mencoder doesn't correct sync. Have you tried starting the encode
somewhere other than the beginning of the DVD (with -ss or -chapter)
to see if sync is still broken?

Rich



More information about the MPlayer-users mailing list