[MEncoder-users] 2pass: auto-calculation of bitrate?

Ilya Zakharevich nospam-abuse at ilyaz.org
Sun Nov 23 04:58:34 CET 2008


[A complimentary Cc of this posting was NOT [per weedlist] sent to
James Hastings-Trew 
<mencoder-users at mplayerhq.hu>], who wrote in article <4714C1BE.8050901 at shaw.ca>:

> A better approach than trying to find some arbitrary average value 
> across a number of unrelated movies which all have different compression 
> needs is to "sample" each movie and compress then with a constant 
> quality factor.
  ^^^^^^^^^^^^^^

What's this?   Quantizer?

> Encode 5% of a movie by compressing 10 scenes at regular 
> intervals throughout the movie with a constant quality factor, and then 
> use the size of the resulting file x 20 as an estimate of how big that 
> movie will likely be at that quality factor, and then derive your 
> bitrate based on that.

Why not do something much more direct?  Like a two-pass option - but
not with "target bitrate", but with "target average quantizer"
(whatever meaning is appropriate)?  Or maybe it is possible now?

BTW, a much simpler change: could not MEncoder emit such an "achieved
average quantizer" after a two-pass run with current semantic (of
"target bitrate")?  At least, it would help with chosing bitrate when
downscaling a lot (such as to a cellphone format).

> For example, consider two movies from the exact same genre - "Doom" and 
> "28 Days Later". A bitrate derived from that simple calculation above 
> would be way too high for "Doom" because that movie was done on quality 
> film stock, using locked down cameras (because of the special effects 
> work) and mostly takes place in dark environments (large areas of the 
> image are simply black for many scenes). That same bitrate would be way 
> too low for "28 Weeks Later" because high speed film was used in dark 
> scenes (very high film grain) , much of the action is hand-held camera 
> work (tons of motion vectors per frame), and most of the movie is fairly 
> well exposed (lots of detail, foreground and background throughout). I 
> can't see how your average value would fare any better. An average of 
> what each movie "needs" for bitrate would give you the same end result.

All true, but what is your point?  Do you think that using
bitrate=800000 is going to be better than the "averaging approach"?

One SHOULD have some starting point.  Currently MEncoder is silent
about which levels are good for what...

Thanks,
Ilya




More information about the MEncoder-users mailing list