The Captian
11th September 2006, 01:36
I need to create multiple overlay of different videos over the same base movie. My problem is that i need the overlayed videos to each move in the own direction/speed. Since "Overlay"s global variables 'ol_x_offset' and 'ol_y_offset' contain only 1 value at once, I can't use them to move several videos at once. I tried to get arround this by creating 1 overlay in "script 1"....the second overlay in "script 2" using "script 1.avs" as the base movie. However, after implamenting several overlays....this becomes very messy.
My next attempt was by nesting the "animate" function like so:
mov1 = Animate(600, 750, "Overlay", baseMovie,ovlMovie1,50,0,mask,.7,
\ baseMovie2,ovlMovie1,50,480,mask,.6)
mov2 = Animate(600, 710, "Overlay", mov1,ovlMovie2,460,-320,mask,.7,
\ mov1,ovlMovie2,460,480,mask,.6)
This introduced a new problem. The overlayed movies are present on the screen both before and after frames they need to be present in. mov1 is present at 50,0 from frames 0 to 600, at witch point the "animate" function begins moving it.
I tried using seperate variables for the x and y values in each overlay (x1,y1 x2,y2) and reading into each of them using seperate .txt files using "conditionalReader". But could not get it to update the variables in the overlay function for each frame.
Is there a way to dynamicy change the variables (x1 = x1+2) for each frame inside "overlay" function. Also, how would i create a loop. I would like to manipulate the placement/movement of several nested overlays using the "Rand" numeric function. I have some programming experience with c++, but having some problems with the specifics of AVISynth.
Thanks in advance for any advice you can give.
My next attempt was by nesting the "animate" function like so:
mov1 = Animate(600, 750, "Overlay", baseMovie,ovlMovie1,50,0,mask,.7,
\ baseMovie2,ovlMovie1,50,480,mask,.6)
mov2 = Animate(600, 710, "Overlay", mov1,ovlMovie2,460,-320,mask,.7,
\ mov1,ovlMovie2,460,480,mask,.6)
This introduced a new problem. The overlayed movies are present on the screen both before and after frames they need to be present in. mov1 is present at 50,0 from frames 0 to 600, at witch point the "animate" function begins moving it.
I tried using seperate variables for the x and y values in each overlay (x1,y1 x2,y2) and reading into each of them using seperate .txt files using "conditionalReader". But could not get it to update the variables in the overlay function for each frame.
Is there a way to dynamicy change the variables (x1 = x1+2) for each frame inside "overlay" function. Also, how would i create a loop. I would like to manipulate the placement/movement of several nested overlays using the "Rand" numeric function. I have some programming experience with c++, but having some problems with the specifics of AVISynth.
Thanks in advance for any advice you can give.