0

Is there a way to scale a video over time with ffmpeg ? This is the result that I want:

video result

I have been looking through the documentation and you can change the scale but no over time. Am I missing something ?. There is another "automatic" tool to do this, because I need to do this on a server?

2
  • Do you want to overlay the dynamically scaled result?
    – Gyan
    Commented Jun 18, 2018 at 9:38
  • Yes, I want to overlay the dynamically scaled result.
    – rafaperez
    Commented Jun 18, 2018 at 9:52

2 Answers 2

3

For use in overlaying, you can simulate the intended result using the zoompan filter.

For a (2xW, 2xH) final size over 50 frames, use

ffmpeg -i video.mp4 -i overlaybg.mp4 -filter_complex
         "[0]pad=iw*2:ih*2:color=black@0,zoompan=z='min(pzoom+0.02,2)':d=1:s=2Wx2H[scaled];
          [1][scaled]overlay" output.mp4

Replace 2Wx2H with the calculated numerical values.

0
0

FYI the scale filter now supports animation (i.e. it is evaluated per frame and you can put formulas that are a function of time to describe it).

So a combination of overlaying and scaling will allow you to achieve what you want.

See this example: https://stackoverflow.com/questions/62845459/ffmpeg-scale-down-video-dynamically-squeeze-back-or-zoompan-out-to-smaller-tha

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .