ffmpegvideo-editing

How to create zoom in effect using ffmpeg


I am trying to create zooming effect using ffmpeg on a video file.

Here is the code I am using:

ffmpeg -i out.mp4 -filter_complex "crop=(640-t):(480-t)" output.mp4

But it is giving me the undefined constant error.

I know crop accepts iw and ih as the constants but is there any constant for time or any other way to achieve what I am trying to do?


Solution

  • I used the n constant instead. This worked:

    ffmpeg -i out.mp4 -filter_complex "crop=(640-(n*10)):(480-(n*10))" output.mp4