[MPlayer-users] vbitrate estimation using 3 pass encoding (divx)

D Richard Felker III dalias at aerifal.cx
Mon Jan 6 01:14:04 CET 2003


On Mon, Jan 06, 2003 at 12:48:42AM +0100, Arpi wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> 
> > (3 pass audio/video/video)
> > mencoder -oac mp3lame -lameopts vbr=3 -ovc frameno -o frameno.avi -dvd 1
> > mencoder -oac copy -ovc lavc -lavcopts 
> > vcodec=mpeg4:vhq:vbitrate=$vbitrate:vpass1 -dvd 1
> > mencoder -oac copy -ovc lavc -lavcopts 
> > vcodec=mpeg4:vhq:vbitrate=$vbitrate:vpass2 -dvd 1
> 
> isn't it vpass=1 and vpass=2 ?
> 
> > in fact, both produce files of the same size, so why even bother with the 3rd 
> > pass?  btw, $vbitrate is coming from the output of the first (audio) pass.
> size doesn't matter, in ideal case size won't change. quality may do.
> 
> > ok, now here is my real question.  suppose i do a first (audio) pass and it 
> > tells me i should use a vbitrate of 635.  ok thats all fine and good, but if 
> > i ended up cropping scaling, or reducing the fps in the other passes, that 

Reducing the fps is a bad idea. It looks really bad and it doesn't
actually help improve compression much at all, since more bits will be
needed to encode the (much greater) differences between consecutive
frames.

> > vbitrate of 635 can now be raised...right?  if so, by how much?  how do i 
> no! that value comes from the length (in time) of your movie and the free
> space left after saving audio on your CD.
> quality may will be raised by scaling etc, see docs.
          ^^^

This is a very good point -- quality may be raised, but not
necessarily. Often scaling the movie down too much will actually lower
quality, even though the average quantizer will decrease, because
quantization artifacts are more noticable to most people at low
resolutions. Personally I always use 640x??? when encoding movies
because I want the vertical size optimized for display on ntsc
television, but in any case I wouldn't recommend going below 512
pixels wide. 576 might even be a good lower bound.

If you can't get the quality you want with sizes in that range, then
IMHO you're much better off to increase the adaptive quantization
parameters or single coefficient elimination rather than scaling to a
smaller size.

Rich




More information about the MPlayer-users mailing list