[MPlayer-users] Advice on solving out of sync movie

romildo at uber.com.br romildo at uber.com.br
Sun Mar 16 21:56:53 CET 2003


On Sun, Mar 16, 2003 at 07:10:53PM +0100, Blaz Lorger wrote:
> Jose Romildo Malaquias wrote:
> >
> >I am having problems with mencoder producing movies
> >with good synchronization between audio and video.
> >I am running mencoder 0.90rc4-3.2 on a Red Hat Linux 8.0
> >box. I have also tried mencoder CVS-021210-03:00-3.2
> >with similar results.
> >
> >I need advice on how to proceed to solve this
> >problem (even if that envolves using other tools
> >besides mencoder).
> >
> >I have captured a movie from TV using mencoder (on Linux):
> >
> >$ mencoder -o movie0.avi \
> >  -tv 
> >  on:driver=v4l:device=/dev/video0:norm=palm:width=640:height=480:chanlist=us-cable:channel=9 \
> >  -ovc lavc -lavcopts vcodec=mpeg4:keyint=0:vbitrate=5000 \
> >  -oac mp3lame -lameopts cbr:br=128 \
> >  -vop pp=tn
> >
> >The resulting avi file is about 8 Gb in size.
> >
> >Then with VirtualDub (on Windows) I have deleted the comercials
> >from the avi file, and saved to a new file: movie.avi
> >
> >Now I want to process this avi file to deinterlace the movie and
> >reduce its size to fit in a 800 Gb CD. So I have processed it with
> >mencode (3 passes processing):
> >
> >Pass 1:
> >$ mencoder movie.avi -ovc frameno -oac copy -o frameno.avi
> >
> >Pass 2:
> >$ mencoder movie.avi \
> >  -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=875:vhq:vpass=1 \
> >  -vop pp=lb \
> >  -oac copy \
> >  -o um-sonho-distante.avi
> >
> >Pass 3:
> >$ mencoder movie.avi \
> >  -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=875:vhq:vpass=2 \
> >  -vop pp=lb \
> >  -oac copy \
> >  -o um-sonho-distante.avi
> >
> >The final avi file um-sonho-distante.avi is out of sync between
> >audio and video, in all players I have tried (mplayer, xine,
> >VirtualDub, aviplay, ...).
> >
> >I am clueless on how to solve this problem and achieve my objective.
> >Any help?
> >
> >Romildo
> > 
> >
> I'm using mencoder 0.90rc4 and lame 3.93.1. I have noticed that I get 
> 250 ms audio delay when reencoding audio stream in video files.

Same versions here.

> I was using following audio codec options: -oac mp3lame -lameopts 
> abr:br=64:q=0:aq=0
> Delay improved significantly (60ms) after I changed those options to 
> -oac mp3lame -lameopts preset=64
> Delay has decreased even more (30ms) after adding option -mc 0

The first movie file (movie0.avi) already has encoded (MP3) audio.
I do not want to recode it in the current situation.
 
> Have you checked that synchronization in original file (movie0.avi) is OK?

The synchronization is ok in the original file.

As commented in another message, I have found that only the 3
passes encoding is producing the out of sync effect. So I
solved the problem by doing a 2 passes encoding.

Regards.

Romildo
-- 
Prof. Jos? Romildo Malaquias        romildo at uber.com.br
Departamento de Computa??o       malaquias at iceb.ufop.br
Univ. Federal de Ouro Preto  http://uber.com.br/romildo



More information about the MPlayer-users mailing list