FFmpeg – zoom into video clip over N seconds with an easing

I am looking to zoom into a video clip using FFmpeg. The zoom should take place over N seconds and with an easing function controlling the zoom speed.

I have solved this for the above but only with a linear function controlling the speed:

zoom_speed = (zoom_factor - 1)/(frames_per_second * N)

I can then input the zoom speed as follows:

zoom = min(pzoom + zoom_speed, zoom_factor)

where zoom_factor is the amount I wish to zoom in by.

How could this be accomplished using an easing function controlling the zoom speed (for instance a cubic easing) and completing the zoom in N seconds?

Read more here: Source link