[MEncoder-users] Target file size too big wrt bitrate

Joey Parrish joey.parrish at gmail.com
Fri Apr 6 23:39:52 CEST 2007


On 4/6/07, Mariusz Zynel <sysadm at amikom.com.pl> wrote:
> I'm encoding a movie from DVD to DIVX in three passes. First the
> audio is encoded:
>
> mencoder -ovc frameno -o frameno.avi -oac lavc -lavcopts
> acodec=ac3:abitrate=96 -alang pl -aid 131 some_file
>
> Then two passes to encode the video stream go:
>
> mencoder -o /dev/null -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=980:vhq:vpass=1:turbo -vf scale=640:360 some_file
>
> mencoder -o movie.avi -ffourcc DIVX -oac copy -ovc lavc -lavcopts
> vcodec=mpeg4:vbitrate=980:vhq:vpass=2 -vf scale=640:360 some_file

Try this:
mencoder -o movie.avi -ffourcc DIVX -oac copy -ovc lavc -lavcopts
vcodec=mpeg4:vbitrate=980:vhq:vpass=2 -vf scale=640:360 some_file
-audiofile frameno.avi

I think that without -audiofile option, your -oac copy is copying the
_original_ audio track from some_file.  If the original is much larger
than your re-encoded 64 kbit, then this might account for the
difference.

I think older versions would load frameno.avi automatically.  New SVN
does not seem to.  From the manual:

> −frameno-file <filename> (DEPRECATED)
>
> Specify the name of the audio file with framenumber mappings created in the first
> (audio only) pass of a special three pass encoding mode.
> NOTE: Using this mode will most likely give you A-V desync. Do not use it.
> It is kept for backwards compatibility only and will possibly be removed in a
> future version.

So if you want the old behavior, you could use -frameno-file
frameno.avi.  However, since it is noted that you could lose sync, I
would suggest instead -audiofile.  In my brief tests just now, I did
not seem to lose sync this way.

--Joey



More information about the MEncoder-users mailing list