Functions Index :: M :: MoveOverlay
Module:
Definition:
MoveOverlay(clip base, clip ovl, int "f_start", int "f_end", int "x_start", int "x_end", int "y_start", int "y_end", float "opac_start", float "opac_end", clip "mask", string "mode", bool "greymask", string "output", bool "ignore_conditional", bool "pc_range")
Description:
Continuously animates a clip's position and opacity [1] between a start and end frame, while in parallel overlays it on a base clip. The clip is animated along with it's mask (a full white as default, if none specified), thus allowing the application of any overlay mode supported by Overlay().
Arguments:
base: The base clip on top of which the size animated ovl clip will be overlayed.
ovl: The clip to animate its size and overlay on top of base clip.
"f_start" (Optional, defaults to 0): The frame from which the animation will start.
"f_end" (Optional, defaults to base.Framecount-1): The frame where the animation will end.
"x_start" (Optional, defaults to Round(ovl.Width/2)): The starting position of the center [2] of the animated ovl clip on the horizontal (x) axis.
Thus if x_start is not specified the left side of ovl clip will be, taking into account possible scaling, on top of the left side of base clip (same behavior with Overlay).
"x_end" (Optional, defaults to x_start): The ending position of the center of the animated ovl clip on the horizontal (x) axis.
"y_start" (Optional, defaults to Round(ovl.Height/2)): The starting position of the center [2] of the animated ovl clip on the vertical (y) axis.
Thus if y_start is not specified the top side of ovl clip will be, taking into account possible scaling, on top of the top side of base clip (same behavior with Overlay).
"y_end" (Optional, defaults to y_start): The ending position of the center of the animated ovl clip on the vertical (y) axis.
"op_start" (Optional, defaults to 1.0): The starting opacity value of the animated ovl clip.
"op_end" (Optional, defaults to op_start): The ending opacity value of the animated ovl clip.
"mask", "mode", "greymask", "output", "ignore_conditional", "pc_range": They have the same functionality as in the Overlay() standard Avisynth function. See the Avisynth documentation for details.
Examples:
bs = AVISource(...)
ov = AVISource(...)
# Move from 10,10 to 320,240
# change occures between frames 20 and 100
ovs = MoveOverlay(bs, ov, 20, 100, 10, 320, 10, 240)
# zoom out from 960x720 to 320x240
# scale base clip to double size to avoid clipping
# (will feed result to PolygonAnim to animate position)
ovp = ResizeOverlay(bs, ov, 10, 100, 960, 320, 720, 240, 2.0)
[1]: This is an intermediate filter used by LineAnim and PolygonAnim filters. Nevertheless it may be useful on certain occasions and thus it is provided as a "public" AVSLib filter.
[2]: Animation filters treat parameters specifying overlay clip's (x,y) position as if they correspond to its center and not to its top-left corner as Overlay() does.
While this may seems odd, it does make the calculation of (x,y) paths simpler because in the general case size will also be animated. If this convention was not used then at any path point a correction would had to be made for the changing size of the animated clip at both x and y.
See the tutorial "Understanding animation filters" for details.