[MPlayer-users] 2 pass divx encoding from .VOB/dvd - Targeted filesize (bitrate) ends up way way wrong

D Richard Felker III dalias at aerifal.cx
Mon Aug 19 23:16:02 CEST 2002


On Mon, Aug 19, 2002 at 10:34:46PM +0200, Øyvind Stegard wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hey
> 
> I'm trying to encode a ~2 hour DVD, targeting two 80 min CDRs (about 
> 1400MB). My problem is essentially that the bitrate I specify to 
> libavcodec is not respected at all and the movie ended up at half of the 
> filesize I had targeted(resulting in rather poor quality). (It turned 
> out to be ~700MB when I specified an average bitrate that should result 
> in a file close to 1400MB (audio stream taken into consideration)). To 
> clear things up, here are the two command lines I used:
> 
> 1. pass:
> mencoder dogma.vob -nosound -ovc lavc -lavcopts 
> vcodec=mpeg4:vbitrate=1400:vhq:vpass=1 -vop scale=672:288,crop=701:429 
> -sws 2 -o /dev/null

-lavcopts vqmin=2, or even 1 perhaps with bitrates this high.
Actually, I believe there *is* a bug in libavcodec where it won't
properly distribute bits on the second pass when the minimum qscale
(vqmin) is already reached on lots of frames, so quality still won't
be ideal, but it should be a lot better.

Also don't use -nosound, that will cause mencoder not to mess with a/v
sync, which could cause the frame numbers in lavc_stats.txt to be
totally wrong for the second pass!! Instead use -oac copy or -oac pcm
(doesn't matter since the output is going to the bitbucket anyway).

> Finally, some more details:
> The movie is 720x576 PAL 25fps, about two hours long. I also got 
> indications (from a reply to a previous post I sent), that the movie 
> probably was a field based interlaced stream. It was ripped using Smart 
> Ripper on a windows box, and the .vob file (concatenated all vobs to 
> one) is about 6GIGs, and contains video, two ac3 streams (one 2.0 and 
> one 5.1), and some subtitle stuff.

You might need -ofps 50 or something. Read the archives. Broken
interlacing will definitely have a huge negative impact on
quality/bitrate.

> Also, when I try to use the external -pass 1/2 parameter (instead of 
> libavcodec internal vpass), the bitrate goes much much higher than it 
> should, so that's a no-no. (Does the external -pass 1/2 really work well 
> with libavcodec ?? It looks very DivX5 oriented)

No, it's broken with libavcodec and should not be used. It might
partially work if you have b frames turned off, but it's still a bad
idea.

Rich




More information about the MPlayer-users mailing list