title: Zooming animation in FFMPEG
body: <p>I need to make a zooming animation for a video input.</p>
  
  <p>Making a panning animation is possible with the <code>crop</code> filter with something like this:</p>
  
  <p><code>"crop=320:240:max(0\\,min(iw-ow\\,n)):0"</code></p>
  
  <p>Where the first two parameters, width and height, are fixed, and the second two parameters, accept frame number <code>n</code> or timestamp <code>t</code> as expression parameters.</p>
  
  <p>But width and height are evaluated only once (and cannot use <code>n</code> or <code>t</code>), so I cannot crop a size in function of time and then apply a <code>scale</code> filter to the original size.</p>
  
  <p>I know I can:</p>
  
  <ul>
  <li>Change the filter after pulling each frame from the buffersink (I'm not in the command line, I'm using the libraries in my software). I'm doing that already, but no for <em>every</em> frame, only by user request in an online application.</li>
  <li>Use <code>geq</code> filter to "apply a generic equation to each frame".</li>
  </ul>
  
  <p>Both approaches seem expensive. Is there another filter or approach I could use? </p>
  
  <p>Note that I'm using zeranoe FFMPEG libraries in Windows. I'd rather not develop my own filters or modify FFMPEG source.</p>