ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

time remap, play segment of time then skip ahead another segment

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Tyler Jordan
time remap, play segment of time then skip ahead another segment
on Apr 4, 2017 at 11:37:15 am

Hi All,

Having a little trouble with this one, hopefully someone can help. I have a comp with one really long video in it. What I would like to do is play 1 second, then skip ahead to the next minute and play the first second of it, then skip ahead to the next minute and play the first second, and continue to the end.

Just in case its worth mentioning the fps is 30 also.

Here's what I've been noodling with so far, however it pauses for a second rather than playing.

Thanks!

n = 1798; // play every nth frame
m = 30; // play for this long

f = timeToFrames();
p = Math.floor(f/m);
framesToTime(p*n)


Return to posts index

Dan Ebberts
Re: time remap, play segment of time then skip ahead another segment
on Apr 4, 2017 at 5:34:31 pm

I think it would be something like this:

Math.floor(time)*60 + time%1;


Dan



Return to posts index

Tyler Jordan
Re: time remap, play segment of time then skip ahead another segment
on Apr 5, 2017 at 7:04:05 am

Thanks Dan, that did the trick! Sometimmes it's the simplest lines that get the most confusing to come up with!

Cheers


Return to posts index

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