-
Variable Frame Rate with Posterize Time
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.