[MPlayer-users] Syncronization problem
Giacomo Comes
comes at naic.edu
Mon Dec 20 19:20:35 CET 2004
On Mon, Dec 20, 2004 at 07:14:15PM +0100, Fabio S. wrote:
> Hi all,
>
> I have a syncronization problem that I am not able to solve. What seems
> strange to me is that it is generated by mencoder itself.
>
> I use mencoder to grab videos from my videocamera.
> Since my machine is not very fast, I use the following strategy:
> 1) I grab a video from my videocam with a very high video bitrate
> and no audio encoding
> 2) I encode the video obtained in 1) compressing audio in mp3 and then
> doing a
> 2pass encoding for the video with a smaller bitrate.
>
> The video I get after step 1) is perfectly syncronized.
>
> After this step the camera is no longer needed and the second step relies
> only on mencoder; nevertheless, the video I get after the second step
> is out of sync and the desyncronization increases from nearly nothing at
> the beginning to 3-4 seconds at the end.
>
> Here are the commands I use:
>
> Step 1:
> mencoder -endpos 1:00:00 -tv driver=v4l2:input=1 -vf pp=lb -ovc lavc
> -lavcopts vcodec=mpeg4:v4mv:vbitrate=6000:mbd=2 -oac copy -o "video.avi"
> tv://
>
> Step 2:
> mencoder -oac mp3lame -ovc frameno video.avi -lameopts cbr -o frameno.avi
> mencoder video.avi -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1600:vpass=1:vhq:mbd=2
> mencoder video.avi -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=1600:vpass=2:vhq:mbd=2
>
> Any suggestion?
Instead of 3 pass encoding try 2 pass (it's equivalent to 3 pass, just a little bit slower):
mencoder video.avi -oac mp3lame -lameopts cbr -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1600:vpass=1:mbd=2 -o newvideo.avi
mencoder video.avi -oac mp3lame -lameopts cbr -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1600:vpass=2:mbd=2 -o newvideo.avi
(remove vhq because it is equivalent to mbd=1 and you have mbd=2 too)
Does it help?
Giacomo
More information about the MPlayer-users
mailing list