How can i resize a video to 480 pixels high in AviSynth, while maintaining aspect ratio? Assume, for simplicity sake, the Bilinear resize.
i've tried:
source = DirectShowSource("TheClip.avi")
resized = BilinearResize(source, target_height=480)
return resized
But that gives the error
Script error: Invalid arguments to function "BilinearResize"
Note: The reason i don't supply a width
is that i don't know a width. The script is being used by a media server, that now forces the use of AviSynth in order to perform resizing. i don't know the size of any video that anyone might choose to play - but i do know i need it resized to x480.
i presume AviSynth can do something like:
resized=BilinearResize(source, source.width*480/source.height, 480)
but that also fails:
Resize: YUY2 destination width must be even
i could keep going, trying to find a way to AddBorders or Crop, to make the width mod4, mod8, or mod16. Or i could ask here and maybe there already is a way to perform aspect-preserving scaling.