user27767: I'm trying to do a smooth zoom in to the center of a 4k video over the duration of that video, so basically zooming in 2.13x so that the zoom in stops when the zoom is equivalent to an HD file (4096 / 1920 = 2.13). 
I'm having trouble finding out how I can control the length of the zoom in effect dynamically, for different video lengths. 
Here's the command I have so far: 
ffmpeg -i "{filepath}" -vf "scale=w=(4096*4):h=(2160*4), zoompan=z='min(pzoom+0.00213,2.13)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1920x1080" "{output1}"
I'm guessing I need to do a calculation on the # of input frames and adjust the pzoom ratio accordingly, but I'm unsure how the pzoom ratio actually works. 

user1871: pzoom is the calculated zoom value for the previous frame. It is initialized to 1 at the start of filtering. So, if total no. of frames is X, your zoom expr should be
z='min(pzoom+(2.13-1)/X,2.13)'


27767: <p>I'm trying to do a smooth zoom in to the center of a 4k video over the duration of that video, so basically zooming in 2.13x so that the zoom in stops when the zoom is equivalent to an HD file (4096 / 1920 = 2.13). </p>

<p>I'm having trouble finding out how I can control the length of the zoom in effect dynamically, for different video lengths. </p>

<p>Here's the command I have so far: </p>

<p><code>ffmpeg -i "{filepath}" -vf "scale=w=(4096*4):h=(2160*4), zoompan=z='min(pzoom+0.00213,2.13)':d=1:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=1920x1080" "{output1}"</code></p>

<p>I'm guessing I need to do a calculation on the # of input frames and adjust the pzoom ratio accordingly, but I'm unsure how the pzoom ratio actually works. </p>
 1871: <p>pzoom is the calculated zoom value for the previous frame. It is initialized to 1 at the start of filtering. So, if total no. of frames is X, your zoom expr should be</p>

<pre><code>z='min(pzoom+(2.13-1)/X,2.13)'
</code></pre>
