Function ResizeARC (AR & Compressibility)
From http://www.doom9.org/index.html?/gknot-basics.htm
It's a bit guesswork as you cannot predict compressibility of your movie but here's some hints:
* It's not a good idea to go below 0.20 bits/(pixel*frame)
* If you go above ~0.35 you might not be able to reach your desired filesize
* If you go for 1 CD stay close to 0.20
* If you go for 2 CDs stay around 0.27
* If TV bits/(pixel*frame) is below ~0.13 you should raise your bitrate (and go for more CDs).
This function respects AR as possible mantaining MOD32 resolutions,uses bitrate, bpp and the resize function specified as parameters.
Usage: ResizeARC(860, 0.2, "FastBilinearResize")
function ResizeARC(clip c, int bitrate, float compressibility, string resizefn)
{
ratio = c.width./c.height
res = bitrate*1000./(compressibility*c.framerate)
nhtemp = sqrt(res./ratio)
nwtemp = nhtemp*ratio
nh = nhtemp - nhtemp%32
nw = nwtemp - nwtemp%32
return resizefn(c, nw, nh)
}