Log in

View Full Version : Animate not working with Layer? (How to to picture-in-picture)


KKLL
1st July 2003, 09:47
I have a long AVI where I want to insert "picture-in-picture" type animations.
Here is what won't work:

main=avisource("c:\test\one.avi").ConvertToYUY2()
pip=avisource("c:\test\small.avi").ConvertToYUY2()

# this works - but I don't want to start from first frame. I'd also like the animation to disappear after frame 30:
Layer(main,pip,"add",255,20,20)
#This does not work - an error is resulted:
Animate(5,30,"Layer",main,pip,"add",255,20,20)

What I would like is Layer (or a different way) to work like this:
Layer(main,pip,start_frame=5,end_frame=30,"add",255,20,20)

The only way that I've found to work is to cut the animation to pices using Trim() and apply the Layer() to them. It is however rather tedious to go through the animation finding frames. Is there a better way?

Wilbert
1st July 2003, 09:51
The only way that I've found to work is to cut the animation to pices using Trim() and apply the Layer() to them. It is however rather tedious to go through the animation finding frames. Is there a better way?
No, I don't think so.

The correct syntax is:
Animate(5,30,"Layer",main,pip,"add",255,20,20 ,main,pip,"add",255,20,20)
but I think this is much slower than Trim+Layer. (I don't think you will get ApplyRange to work with two clips.)

KKLL
1st July 2003, 10:04
Thanks. That was quick!
Animate does not produce an error but it is still the same as using a simple Layer