erspicu
31st March 2007, 10:40
I write a avisynth, part content like following
w = float (Width)
h = float (Height)
rate = int ((w / h) * 1000)
srate = w / h
( rate >= 1740 && rate <= 1800 )? Eval("""
LanczosResize(480,272)
"""):Eval("""
""")
( rate < 1740 )? Eval("""
new_w = srate * 272
new_w = int (new_w)
new_w = new_w - (new_w%4)
LanczosResize(new_w,272)
add_w = (480 - new_w)/ 2
AddBorders(add_w,0,add_w,0)
"""):Eval("""
""")
( rate > 1800 )? Eval("""
new_h = 480 / srate
new_h = int (new_h)
new_h = new_h - (new_h%4)
LanczosResize(480,new_h)
add_h = (272 - new_h)/ 2
AddBorders(0,add_h,0,add_h)
"""):Eval("""
""")
this can auto add boarder to make a right size aspect.
but some movies files like vob .mpg(mpeg2),it has it specially
AR (720x480 by pixel , it's 3:2 ,but in fact it's 4:3 or 16:9).
so my avisynth script is lost right aspect.
is there any possiable to get movie correct AR info?
avisynth Clip Properties seems no AR info .....
w = float (Width)
h = float (Height)
rate = int ((w / h) * 1000)
srate = w / h
( rate >= 1740 && rate <= 1800 )? Eval("""
LanczosResize(480,272)
"""):Eval("""
""")
( rate < 1740 )? Eval("""
new_w = srate * 272
new_w = int (new_w)
new_w = new_w - (new_w%4)
LanczosResize(new_w,272)
add_w = (480 - new_w)/ 2
AddBorders(add_w,0,add_w,0)
"""):Eval("""
""")
( rate > 1800 )? Eval("""
new_h = 480 / srate
new_h = int (new_h)
new_h = new_h - (new_h%4)
LanczosResize(480,new_h)
add_h = (272 - new_h)/ 2
AddBorders(0,add_h,0,add_h)
"""):Eval("""
""")
this can auto add boarder to make a right size aspect.
but some movies files like vob .mpg(mpeg2),it has it specially
AR (720x480 by pixel , it's 3:2 ,but in fact it's 4:3 or 16:9).
so my avisynth script is lost right aspect.
is there any possiable to get movie correct AR info?
avisynth Clip Properties seems no AR info .....