[MEncoder-users] Flamewar topic #38: Auto-selecting bitrate based on resolution, fps, color-depth, etc.

Joe Emenaker joe at emenaker.com
Sat Dec 22 01:39:06 CET 2007

 From following this list for a couple of years, I realize that some 
folks here consider algorithmic bitrate selection to be too much of a 
crapshoot to be worth it.

But to quote Eric Cartman trying to finish off a chocolate cake by 
himself, "Oh, but I must try...".

I'm cobbling together a set of Perl libraries that will make it easy to 
use perl to construct convoluted command-lines for mencoder (ie, stuff 
like being able to specify multiple input files with different crop 
settings, video and audio filters...   auto-selecting the best codec 
based upon what format you want, etc). This is all part of a 
higher-level script that I'm writing designed to make it easy to 
transcode anything for the device you have in mind.

The idea is that you give an input file (or files), a target medium 
(iPod, archos, SVCD, laptop, etc), some quality-vs-size preference (ie, 
"HIGH", "MED", "LOW"), and some quality-vs-encoding-time preference (ie, 
"SLOW", "MED", "FAST") and it would automatically pick some pretty 
sensible settings for encoding.

Picking settings for the encoding-time preference (ie, trell, qpel, 
etc)... that's not hard. What I'm asking the list for are some 
suggestions for auto-selecting a decent bitrate for the various formats 
based upon: resolution, fps, and color depth.

I realize that this isn't going to give optimum results for each movie. 
I'm not trying to write something that's going to transcode each movie 
the perfect amount based upon that movie's characteristics. I'm trying 
to write something that would allow someone to queue up some downloads 
that fed into this script so that, when they woke up the next morning, 
they'd have the movies, encoded fairly well, all set to go onto their 
iPod... or laptop... or blackberry... or whatever.


- Joe

More information about the MEncoder-users mailing list