[MPlayer-users] Re: [MEncoder] Synchonization lost when using Vorbis in a OGM
Jonathan Rogers
jonner at teegra.net
Sun Jun 29 16:30:57 CEST 2003
Rodolfo J. Quesada wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
>
> This is my first post to this list... As I had been looking for a long
> time how to deal with a problem I got recently...
>
> I'm trying to compress some VOBs copied with vobcopy, and after that,
> dump the audio, convert it to Vorbis, and mux it all, with ogmmerge to
> get a nice OGM.
>
> The problem is, that those VOBs after starting mencoder, keeps saying
> that there was duplicate frames, enters and leaves telecine mode, it
> jumps from 23.976 to 29.970 in those changes... All of that things are
> expected by the nature of the DVD, when I got to the final AVI, with an
> AC3 audio track (-oac copy), the A-V sync is always around 0.000, with a
> few tens of milliseconds changes... That's still fine...
>
> Then I dump the PCM audio...
>
> cat *.VOB | mplayer -vc null -vo null -ao pcm -aofile audio.wav
>
> And I get a pretty big PCM file... Then I encode it...
>
> oggenc -q0 audio.wav
>
> And got an audio.ogg file...
>
> Then, I merge it...
>
> ogmmerge -A video.avi audio.ogg -o pelicula.ogm
>
> And when I play it with MPlayer, the sync ratio jumps up to 15 seconds,
> in some scenes where the telecine mode was enabled... It gets
> desynchronized all the way, in the plain old 29.970fps scenes, the audio
> is synced, but not in the 23.976 ones... I tried it in Windows Media
> Player 6.4, and those scenes not synchonized get blurred or stoped, and
> follows the audio synchronizations nicely, but the video quality is not
> appealing at all... Pretty ugly in fact...
>
> So, the question, somebody has faced this problem before? It can be
> solved?... I really love OGM... The audio is so sweet, even at a -q0
> ratio...
>
> These are the lines of the encoding, I have tried the detc filter, and
> othe options as well...
>
> cat *VOB | mencoder -sws 1 -fps 29.970 -ofps 29.970 -sid 0 -vop
> scale=512:384,pp=lb -aid 129 -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:v4mv:vbitrate=650:vpass=1:vqscale=2 - -o /dev/null
>
> cat *VOB | mencoder -sws 1 -fps 29.970 -ofps 29.970 -sid 0 -vop
> scale=512:384,pp=lb -aid 129 -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vhq:v4mv:vbitrate=650:vpass=2 - -o video.avi
>
> (Any suggestion about those settings will be very apprecied, I try to
> get the best quality!!!)
>
> After hours of trying with no good results at all, I finally decided to
> get the audio in MP3... I was expecting the same problem... But the A-V
> sync ratio was fine!!! And the sound quality its not so bad at all...
> But I just have this doubt... :(
>
> Thanks a lot! ;)
I just discovered the -mc option. It seems to be the key to our dilemma
and I feel silly for not finding it before. If I specify "-mc 0.01" or
"-mc 0.1", sync stays rock solid. I can't believe none of us tried it
during our previous discussion.
If I understand Mosu's explanation of what ogmmerge does when there's an
empty frame in an input AVI, it makes perfect sense. The resulting OGM
has fewer frames than the input AVI, since ogmmerge doesn't make empty
frames. Instead, it says something like "the last frame had a duration
of x milliseconds." When mplayer is demuxing, it thinks the framerate is
constant. When such a message comes along, it immediately throws mplayer
out of sync. The default value for -mc must not be enough to allow
mplayer to play video at 23.976 fps when it thinks the framerate is
29.97 fps.
Jonathan Rogers
More information about the MPlayer-users
mailing list