View Single Post
Old 13th August 2013, 13:29   #2  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by MrJ View Post
For every 1920 x 1080 frame I have, I want to cut out a 1280 x 720 one. I can crop in avisynth as long as I want the crop to be in the same place in each frame. However with this crop I want the top left hand corner (or centre of the 1280 x 720 frame) to change with time (or framenumber).
...
The equation for how many pixels to crop is in the form p = ax^2 + bx + c where x is frame number and I know constants a, b, c.
Use ScriptClip() to crop at a per-frame varying position.
Outline:
Code:
... #source filter
ScriptClip("""
  x = current_frame
  Crop(...) # parameters based on x
""")
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote