Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Freeze framing between keyframes

  • Freeze framing between keyframes

    Posted by Stephane Levy on March 22, 2022 at 10:09 am

    Hi,

    How can I freeze frame a video layer according to a slider control that takes values 1 or 0 ?

    When the slider takes changes from 1 to 0, then the video freezes. From 0 to 1, freeze again.

    The result would look like stop motion : motion occurs every time the slider’s value switches.

    Thanks.

    Regards.

    Stephane Levy replied 4 years, 1 month ago 2 Members · 6 Replies
  • 6 Replies
  • Filip Vandueren

    March 22, 2022 at 1:25 pm

    Hi Stephane, are the keyframes only ever 1 and 0 ? That makes it a lot easier and faster, as we’d only need to check if a keyframe on the slider occured, not if it has passed an actual threshold (like if it’s animating from 3.2 to 0.66 and you need to know exactly when it hits the 1.0 value)

    Or are there mulitple keyframes of 0, and you only want to progress to the next still only when the value actually flips to 1. etc.

  • Filip Vandueren

    March 22, 2022 at 1:31 pm

    So for the simple case (we don’t actually care what the value of the slider is, just that a keyframe occured), this expression for timeRemapping:

    sl=effect("Slider Control")("Slider");
    nearKey=sl.nearestKey(time);
    nextKeyIndex = nearKey.index - (nearKey.time > time ? 1 : 0);
    valueAtTime(sl.key(nextKeyIndex).time);
  • Stephane Levy

    March 22, 2022 at 1:32 pm

    Hi Filip.

    In fact what I’m trying to do is making lip sync looks like stop motion.

    For this, I convert audio to keyframes, and then I apply an expression to a new layer so that it transforms the audio keyframe value to a step function.

    Then I want to apply freeze frames every time the step value switches to another.

    Transforming the step function to a series to a function that takes only 1 or 0 values is sth I should manage. But in fact if you could answer the question if the input function is a step function, it would be even better!

    Thanks in advance.

  • Filip Vandueren

    March 22, 2022 at 2:09 pm

    Not sure what you mean by a stepping function. Did the expression i provided work ?

    Or are there mulitple repeated keyframes that you want to be able to not count ?

  • Stephane Levy

    March 22, 2022 at 2:14 pm

    I mean a function like this:

    f(x)= a if x is in [t1;t2]

    f(x)= b if x is in [t2;t3]

    etc.

  • Stephane Levy

    March 22, 2022 at 11:51 pm

    Thanks a lot Filip for the expression you provided.

    I had to make some adjustments so that it fits my project, but you pointed the right direction with nearkey / nextkey – yes.

    👍

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy