[MPlayer-users] Re: Question on "trans-coding" with mencoder...
D Richard Felker III
dalias at aerifal.cx
Sat Aug 23 08:39:49 CEST 2003
On Wed, Aug 20, 2003 at 07:40:55AM +0200, Rainer Hantsch wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi!
>
> I let a conversion run over night as you recommended:
>
> 1. Concatenating both parts into one big mpg file
> cat part1.mpg part2.mpg > complete.mpg
>
> 2. Extracting the audio track as-is (because it is already MP3):
> mencoder complete.mpg -ovc frameno -oac copy -o frameno.avi
>
> 3. Doing the first pass of video conversion:
> mencoder $ori -oac copy -ovc lavc \
> -lavcopts vcodec=mpeg4:vpass=1:vbitrate=2100 \
> -o /dev/null -vop scale=720:540 -sws 2
>
> 4. Doing the second pass of video conversion:
> mencoder $ori -oac copy -ovc lavc \
> -lavcopts vcodec=mpeg4:vpass=2:vbitrate=2100 \
> -o final.avi -vop scale=720:540 -sws 2
>
>
> What I got is an AVI file which can be played with gmplayer only with option
> -idx (otherwise I cannot skip scenes), while XINE can skip forward/backward
> without problems.
>
> But as I experienced with other similar done conversions too, it happens
> with some files that synchronization is lost when the point of concatenation
> is reached.
>
> Is the above procedure (about how I convert) correct, or should I do something
> different?
AVI files greater than 4 GB (or is it 2?) are not seekable. With such
an insanely high bitrate (2100 for video), I would expect you're going
over that limit. Read encoding-tips.txt for info on how to make a good
encode with reasonable size. At the very least, you NEED -lavcopts
vhq, and you probably need to crop too. Scaling vertically up to 540
is also a bad idea; you'd be better off scaling down horizontal to
640, or just storing the aspect in the header (-lavcopts
[auto]aspect).
As for A/V sync, I would recommend NOT doing pass0 (the audio
prepass). It's buggy, and maybe even moreso with concatenated files
and/or -oac copy. There's no use whatsoever for it anyway, since
you're just copying the audio. So if you try again, delete frameno.avi
and skip that step.
Rich
More information about the MPlayer-users
mailing list