Page 1 of 1

Slider controlling frame rate

Posted: November 24th, 2009, 2:14 am
by adinnin
I've got some red footage shot at 125 fps.

I'd like to be able to speed it up and slow it down using a slider !!!

is it possible to set up a slider that controls the frame rate.

I have been trying to add an expression to time remapping.. and I am assuming it's a sum like duration / slider control.

So I tried the base route

L = thisLayer;
t2 = valueAtTime(key(2).time)

t2 / effect("Slider Control")("Slider");

but this isn't working at all..

can anyone give me a point in the right direction


Re: Slider controlling frame rate

Posted: November 24th, 2009, 12:40 pm
by kobyg
Try the following expression for the TimeRemapping,

but before that add 2 sliders to the layer, and name them like this:
1."movieFps" slider - give it the value of the FPS of your movie clip (125 in your example).
2."desiredFps" slider - give it your desired FPS. You can use keyframes to change the value as you desire.

Code: Select all

Td = thisComp.frameDuration;
compFps = 1.0 / Td;
movieFps = effect("movieFps")("Slider");
Tm = 1.0 / movieFps;
fps = effect("desiredFps")("Slider");
x = 0;
n = timeToFrames(time + thisComp.displayStartTime,  1.0 / thisComp.frameDuration);
for (t=inPoint; t<time; t+=Td)
     x = x + fps.valueAtTime(t)/movieFps/compFps;


p.s.: I guess it is possible to extract the original movie FPS from the layer itself, so you will not need to add it using the "movieFps" slider, but I don't know how to do that...
p.s.: This expression will work gradualy slower for longer clips (because of the accumulation calculation)
p.s.: If you are not interested in the sound, turn the small speaker of the layer off (that will save some render time)

Re: Slider controlling frame rate

Posted: December 2nd, 2009, 3:26 am
by adinnin
Sorry... Apologies..

I was so wrapped up in the project.. I forgot to thankyou for this..


Thank you.. much appreciated !!