ffmpeg - Zoompan IN and Out alternately I'd like to apply a Zoompan effect but instead of zoom in or zoom out, I'd like to mix both of them: the zoom will start with zoom in, and, after some period of time, the zoom continue with zoom out, and so on, alternatively.

While I'm thinking how to archieve this, has someone some tips?

Thanks !
You need to use state e.g.

ffmpeg -i src.png
 -vf zoompan=d=300:z='if(gte(zoom,2)+eq(ld(1),1)*gt(zoom,1),zoom-0.04*st(1,1),zoom+0.04+0*st(1,0))'
o.mp4


This expression zooms from zoom=1 to zoom=2 in steps of 0.04. Remember, zoom is initialized to 1. The above will create 6 loops.

In st(store) and ld(load) functions, the first argument is variable id (0 to 9), and the second is the value.