Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Variable Frame Rate with Posterize Time

  • Variable Frame Rate with Posterize Time

  • Daniel Hashimoto

    January 15, 2021 at 9:17 pm

    I am attempting to “automatically” convert video of humans moving to look like a variable frame rate like in animation: Low frame rates when not much in the image changes, and high frame rates when the motion is more grand.

    I was able to use Time Difference and a 1×1 Mosaic to create an reference copy of my footage that is black when there’s no motion, and white when there’s lots of motion. Using sampleImage I can easily get a value into an expression that varies from 0 to 1 (basically a delta on amount of movement). I then converted this sample based expresssion into keyframes so things are baked.

    I’d like to now interpolate this baked 0 to 1 value to produce a varying framerate of 8fps to 24fps.

    I tried this:

    T= (my 0 to 1 value);

    (linear(T, 0, 1, 8, 24))

    and this

    T= (my 0 to 1 value);

    Math.floor(linear(T, 0, 1, 8, 24))

    and the result is close to what I was going for – but due to the non-cumulative result the expression is giving me, I get random time skips backwards a few frames here and there just by when the posterize time is changing.

    I can’t quite think of how to force the posterize time to never skip backward – or more likely, how to convert my 0 to 1 range number into something that cumulatively time remaps? In some way that the effect is revealing new frames and the framerate determined by the interpolation. I’d love a dynamic solution so I could apply it to any piece of footage I threw in and calculated the movement amount variable from. Thanks in advance for any help – and I’m sorry to break anyone’s brain.

  • Dan Ebberts

    January 15, 2021 at 9:52 pm

    I think what you’re going to need is a time remapping expression that adds up your sampleImage keyframe values for all frames prior to the current time and uses that to calculate how much time has elapsed. Could get pretty slow if your comp is long though…

  • Daniel Hashimoto

    January 20, 2021 at 4:48 am

    Thanks, Dan.

Viewing 1 - 3 of 3 posts

Log in to reply.

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