PDA

View Full Version : Getting the frame number out


mustardman
9th February 2003, 08:21
I can insert frame numbers as an image into the picture using "ShowFrameNumber" but how can I get that number out so I can do something intelligent with it (like applying some maths).

Is there an eguivilant function that returns an integer, like GetFrameNumber ???

Thanks,
Owen

Richard Berg
9th February 2003, 08:24
Hi mustardman,

This sounds like an interesting feature to add. Do you have any ideas how it might work? Post a sample pseudo-script, for instance.

mustardman
9th February 2003, 10:13
What I had in mind is rather specific, but I can see a use for such a feature for many other things. My application, to position a subtitle on the screen depending on the frame number, so it would move as the frames advanced.

There does not seem to be an increment counter so I can count my way in, and a function like GetFrameNumber would be real good for varying filter parameters as you go (think of the trig functions like sine).

But a script might look like

AVISource(...)
SubTitle("Sliding text", x=GetFrameNumber * 5, y=50)

Obviously more complex to wrap around the number & convert floating numbers returned from trig functions, etc.

Owen.

Bidoche
9th February 2003, 12:10
If you just want to make move some text around.
You should look into advanced SSA possibilities.

hakko504
9th February 2003, 20:46
@mustardman

Check out a nice command called
Animate (http://www.avisynth.org/index.php?page=Animate)!