terrense
18th April 2006, 17:58
here's my script.
the size of the clip i generate is 608x336, so the aspect is about 1.8
then i use a variable "r" to store the aspect of the clip and call a condition script.
now the problem is: the conditoin is TRUE, but avisynth does not recognize it as i expected.
what's the problem of my script? does avisynth take "r" as string? how do i convert it to number?
c = BlankClip(color=$009900, pixel_type="yuy2", length=300, fps=29.97).LanczosResize(608,336)
r = c.Width()/c.Height()
function resize480(theclip)
{
v = theclip.LanczosResize(480,272)
v = v.AddBorders(100,0,100,0)
return v
}
myVal = r>1 && r<1.83 ?
\ "resize480(c)" :
\ "v = c.LanczosResize(720,440)
v = v.AddBorders(0,50,0,50)
return v"
eval(myVal)
the size of the clip i generate is 608x336, so the aspect is about 1.8
then i use a variable "r" to store the aspect of the clip and call a condition script.
now the problem is: the conditoin is TRUE, but avisynth does not recognize it as i expected.
what's the problem of my script? does avisynth take "r" as string? how do i convert it to number?
c = BlankClip(color=$009900, pixel_type="yuy2", length=300, fps=29.97).LanczosResize(608,336)
r = c.Width()/c.Height()
function resize480(theclip)
{
v = theclip.LanczosResize(480,272)
v = v.AddBorders(100,0,100,0)
return v
}
myVal = r>1 && r<1.83 ?
\ "resize480(c)" :
\ "v = c.LanczosResize(720,440)
v = v.AddBorders(0,50,0,50)
return v"
eval(myVal)