ResizeARC
From Avisynth wiki
(Difference between revisions)
m (1 revision) |
|||
Line 29: | Line 29: | ||
[[Category:Shared functions]] | [[Category:Shared functions]] | ||
+ | [[Category:External filters]] |
Revision as of 22:22, 19 May 2013
Function ResizeARC (Aspect Ratio & Compressibility) (from [1])
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 (Aspect Ratio) as possible mantaining MOD32 resolutions, uses bitrate, bpp (bits per pixel) 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) }