[MEncoder-users] Bits per pixel, bitrate and resolution

Olivier Rolland billl at users.sf.net
Wed Jan 10 11:11:59 CET 2007


Hi folks,

I'm trying to encode an episode of 24 which I want to fit in 400MB at
0.25 bpp. After encoding the audio stream, I determined that I should
use a bitrate of 1200 kbps. I've then detected the cropping parameters
and discovered using calcbpp.pl that I should scale the movie to
576x336 to get the desired bpp.

I then run the following commands:

$ mencoder -nocache -noslices -zoom -mc 0 -nosound -sws 7 -vf
pp=ha/va/dr,crop=704:576:8:0,scale=576:336,hqdn3d=2:1:2,harddup -ovc
xvid -xvidencopts
autoaspect:chroma_opt:vhq=4:bvhq=1:quant_type=mpeg:qpel:turbo:max_bframes=2,threads=2,bitrate=1200,pass=1
-o /dev/null dvd://1
$ mencoder -nocache -noslices -zoom -mc 0 -nosound -sws 7 -vf
pp=ha/va/dr,crop=704:576:8:0,scale=576:336,hqdn3d=2:1:2,harddup -ovc
xvid -xvidencopts
autoaspect:chroma_opt:vhq=4:bvhq=1:quant_type=mpeg:qpel:turbo:max_bframes=2,threads=2,bitrate=1200,pass=2
-o video.avi dvd://1

The problem is that the size of the movie after muxing is less than
the expected 400MB (around 300MB) and if I run midentify on the video
file I get an effective bitrate of 709kbps, that is a bpp of 0.15. If
I increase the resolution with the same bitrate, I get effective
bitrates of 919 kbps in 656x384 and 1085 kbps in 720x416 with a bpp of
0.15 for both.

The same happens whatever the codec (xvid, lavc and x264).

As far as I understand, codecs wont respect the bitrate if less bits
wont decrease quality. I think that is exactly what happens here. What
I don't understand, however, is how to increase the bpp given that
increasing (or decreasing) the resolution don't do the trick.

Thanks for your help,

Olivier



More information about the MEncoder-users mailing list