I'm trying to take an image, and apply a slow 'zoom' to the image (think Ken Burns). The animation looks correct, but the image looks extremely low resolution (when the original image is a 5k still). Why is this? Command below:

ffmpeg -loop 1 -f image2 -i 'IMG_8444_edit.jpg' -vf "zoompan=z='zoom+0.001" -c:v libx264 -preset fast -t 5 -crf 22 -s 1920x1080 -y 'zoomout.mp4'
  • Do you have a sample of the problem that you can post? – Michael Liebman Dec 15 '16 at 1:14

zoompan, by default, scales output to 1280x720 (and at 25 fps).


ffmpeg -loop 1 -f image2 -i 'IMG_8444_edit.jpg' -vf "zoompan=z='zoom+0.001:s=WxH,scale=hd1080" -c:v libx264 -preset fast -t 5 -crf 22 -y 'zoomout.mp4'

where WxH is your required output resolution from the filter.

| improve this answer | |
  • Yes awesome! That was the trick! Question: it looks like the pan zoom filter has some other parameters such as input resolution... If I set that to the size of the still image, would that increase the output quality even further? – M Leonard Dec 15 '16 at 20:44
  • No, you can use the input width and height in expressions, but zoompan will work with the original resolution before it resizes. – Gyan Dec 16 '16 at 5:16

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.