I want to zoom a video into its center using ffmpeg (command line). I tried by using the zoompan filter, but it's using the first frame of the video only. I want the video to be played while zooming in. You can think of the desired effect as zooming in with the camera while filming. Did anyone achieve something like this with a single filter chain?

The only way i can currently think of is to extract every single frame of the video, scale it, crop it, save it, and encode all the images back to a video. But this is not really my preferred way. Any hints? Thanks in advance!


zoompan, by default, is set up to operate upon still images, but it can be made to operate upon videos.

Basic form is


pzoom is the final zoom value for the previous frame. d is no. of instances for each frame of the stream.

  • 1
    Typo. Corrected. – Gyan Mar 6 '19 at 17:10
  • awesome! tried it, now it works like a charm! thanks a lot! :) – datayeah Mar 6 '19 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.