Log in

View Full Version : How to make AddBorder- and Resize Values Dependend on Frame Numbers?


kilg0r3
13th March 2003, 21:15
AddBorder Zooming

Hi,
this is probabely an impertinent question, For, I cannot even provide a criticizable example. In fact it more could you write me this script question.

What I'd like to do is this

(a) have a clip (e.g. starting credits) play only in the upperleft corner of the screen. With AddBorders(0,0,x,y) this is no problem.

(b) Now comes the difficult part. At the end of the clip i would like the borders to receed and the image to grow until it fills the whole frame.

I would be very glad if anyone had the time, patience and kindness to show me how this can be done. Since I don't know nothing about programming and scripting, such an example could give a good starting point to understand how all this works.

Many thanks in advance.

sh0dan
13th March 2003, 21:20
Use Animate, and RGB mode.

There are examples in quite old threads.

kilg0r3
13th March 2003, 21:25
yes, cool. just found an explanation on avisynth.org too.

But why should i use RGB?

sh0dan
13th March 2003, 21:31
Otherwise you'll probably get errors with invalid resolutions.

kilg0r3
13th March 2003, 21:40
Thank you so much for your help!

kilg0r3
14th March 2003, 11:25
Now, expectedly, I have got a problem.

1. This script does not work because Animate does not allow change of frame size on the outputside. The Author of the Tip on Avisynth.org noted this, but, i tried it anyway. Is there a work around?

#--------------------
Clip = Version().convertToRGB()

Animate(clip, 1,100, "BilinearResize", 300,300, 500,500)
Animate(clip, 1,100,"AddBorders", 0,0,200,200, 0,0,0,0)

return clip
#--------------------


2. What does 'last' mean in the following example?

# Do a gradual zoom into the center of a 320x240 video, starting at
# 1:1 magnification in frame 100 and ending with 4:1 magnification
# in frame 200

Animate(100,200,"BicubicResize",last,0,0,320,240,320,240,last,120,90,80,60,320,240)


3. Is there a way to copy the current frame number in a variable?

Wilbert
14th March 2003, 12:21
This script does not work because Animate does not allow change of frame size on the outputside.
You have to combine it with layer. An example can be found here (http://forum.doom9.org/showthread.php?s=&threadid=37918&perpage=20&highlight=rotate&pagenumber=2). Just remove the rotate stuff.