How to keyframe zoompan filter in ffmpeg? I am trying to animate an image position and scale on top of  background video. Moving between frames, say, 1 and 15. And scaling from frame 24 to frame 42.

overlay filter does its job moving the image at a time well.

I'm lost with the zoompan filter. Here's my current filtergraph:

video.avi &gt;-----------------------------------&gt;|-------|
                                               |overlay|-&gt; out.mp4
image.png &gt;-&gt; scale &gt;-&gt; zoompan &gt;-&gt; zoompan &gt;-&gt;|-------|


Scale up the image 10 times for jitter-free zoompan. The first zoompan is set to z=1 and enabled till start of zoom (frame 24). Second zoompan increments zoom by a step to reach from 1 to 2.3 in 18 frames (24..42). I would add third zoompan to keep the image at 2.3. If second one is prolonged further it starts looping the zoom-in effect. 

ffmpeg -i $FOOTAGE -loop 1 -i $IMAGE -filter_complex \
"
[1:v]
  scale=10*iw:-2
  ,zoompan=
    z=1
    :d=1
    :s=500x100
    :enable='lt(n,24)'
  ,zoompan=
    z='min(zoom+1.3/18,2.3)'
    :x='iw/2-(iw/zoom/2)'
    :y='ih/2-(ih/zoom/2)'
    :d=19
    :s=500x100
    :enable='gte( n, 24)'
[name];
[0:v][name]
  overlay=
    x = '1005 - 250 + 80 - min( 80 * n / 15, 80)'
    :y='406-50'
    :enable='lte(n,130)'
" -t 7 -y  -hide_banner out.mp4


How can zoom an image between certain keyframes somewhere in the middle of the sequence? I.e. zoom goes from 1 to 2.3 between frame A and frame B.
With loop added, you are generating a video stream from the image. Now, zoom is applicable within the processing loop of a single frame, and pzoom for video streams. Also, zoompan doesn't have timeline editing support, no enable won't work. So,

ffmpeg -i $FOOTAGE -loop 1 -i $IMAGE -filter_complex \
"
[1:v]
 zoompan=
    z='if(gte(in,24),min(pzoom+1.3/18,2.3),19.3/18)'
    :x='iw/2-(iw/pzoom/2)'
    :y='ih/2-(ih/pzoom/2)'
    :d=1
    :s=500x100
[name];
[0:v][name]
  overlay=
    x=1005-250-3*n
    :y=406-50
    :enable='lte(n,173)'
" -t 7 -y  -hide_banner  out.mp4