ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Skip every 3th and 4th frame

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Magnus Fiderson
Skip every 3th and 4th frame
on Mar 1, 2018 at 11:41:54 am

Hi there,

i have 24fps sequenz. My 24fps footage has every 3th and 4th bad frames.
It would be great if it give a script to remove this frames automatically.
I need from 24 frames: Frame 1,2,5,6,9,10,13,14,17,18,21,22

I have found this Script here in the forum:

frameToSkip = 1; // 0,1,2 or 3
currFrame = Math.round(time/thisComp.frameDuration);
currFrame += Math.floor((currFrame - frameToSkip)/3) + 1;
currFrame*thisComp.frameDuration

https://forums.creativecow.net/archivethread/2/726007

It is too difficult for me.
Is there another possibility?

Thanks!!!
😉


Return to posts index

Magnus Fiderson
Re: Skip every 3th and 4th frame
on Mar 1, 2018 at 3:38:34 pm

Hi there,

sry, but i have it by trial and error 😅.
Can i convert this expression to an effect?
Cheers Magnus

n = 2
s = thisComp.frameDuration * n;
sf = Math.floor(time/s) * 2;
fr = time/thisComp.frameDuration;
thisComp.frameDuration*(fr + sf)


Return to posts index

Dan Ebberts
Re: Skip every 3th and 4th frame
on Mar 1, 2018 at 3:48:18 pm

Something like this maybe:

f = timeToFrames(time);
fNew = Math.floor(f/2)*4 + f%2;
framesToTime(fNew)

Dan



Return to posts index


Magnus Fiderson
Re: Skip every 3th and 4th frame
on Mar 1, 2018 at 5:39:35 pm

Oh fine.... a smaller code 😉 Perfect! Thanks Dan


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]