ResizeARC

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m (1 revision)
 
(One intermediate revision by one user not shown)
Line 29: Line 29:
  
 
[[Category:Shared functions]]
 
[[Category:Shared functions]]
 +
[[Category:External filters]]

Latest revision as of 23:03, 19 May 2013

[edit] 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)
}
Personal tools