PDA

View Full Version : Problems with Animate()


askol
12th August 2005, 22:54
I'm having trouble getting Animate to work properly. Here's what I'm trying to do:

# Sample & Hold on face
clip5 = BlankClip(source1, Round(source1.Framerate*2))
clip5 = Overlay(clip5, Trim(clip1,clip1.framecount+1, 0))

# Add letterbox to face
clip5 = Animate(clip5, 0, clip5.FrameCount()+1, "LetterBox",\
0, 0, 40, 220)

But when this runs in either mplayer of VDub, the software crashes with no error. I'm pretty confused here. If I comment out the line with Animate in it, it plays fine.

mg262
12th August 2005, 23:07
Works for me, if I add

clip5

at the end... if it's not that, shout again.

by the way, why the +1 on the frame counts?

askol
12th August 2005, 23:11
I think I put the "+1"s to deal with the zero indexing, but now that I think about it something looks wrong about that.

I have a "return clip5" at the end of the script, so I still don't know what the problem is. I guess I should've specified that that's only part of the script.

Maybe my install is FUBAR.

Update:

the following script works perfect for me, so I'll dig around in my original example to see what I did wrong.

c1 = ColorBars().KillAudio().Trim(0, 400)

c1 = Animate(c1, 0, 400, "LetterBox", 0, 0, 150, 150)

return c1

Update again:

This is a bit strange. The following segment of code works:
clip5 = Animate(clip5, 10, 20, "LetterBox",\
0, 0, 40, 220)

But this does not:
clip5 = Animate(clip5, 9, 20, "LetterBox",\
0, 0, 40, 220)

If the range of the animation is ten or less, it works. If the range of animation is greater than ten, playback crashes without error.

mg262
12th August 2005, 23:40
is it possible that passing fractional arguments into letterbox causes a problem?

askol
12th August 2005, 23:44
Nope. I tried animating this function with the clip instead of LetterBox and I get the same behaviour.

function Boxer(clip c, float param1, float param2)
{
return c.LetterBox(Round(param1), Round(param2))
}