FFMPEG How to zoom in and then zoom out in one com

2019-08-20 10:57发布

I'm making a video with zoom effects.

I want put in zoom in and then zoom out like beat react effect.

"zoompan=z='if(lte(zoom,1.2),zoom+0.0200,zoom-0.0065)':x='iw/2-(iw/zoom)/2':y='ih/2-(ih/zoom)/2':d=500"

It was my first idea but it just stuck at 1.2 zoom ratio.

I want zoom starts with 1 and then once zoom reached 1.2, then zoom out to 1.0 slowly.

What am i supposed to do?

标签: video ffmpeg
1条回答
时光不老,我们不散
2楼-- · 2019-08-20 11:32

Use

"zoompan=z='if(lte(mod(on,42),10),zoom+0.0200,zoom-0.0065)':x='iw/2-(iw/zoom)/2':y='ih/2-(ih/zoom)/2':d=500"

In each 42-frame cycle, this will zoom in for first 10 frames, and zoom out the rest.

查看更多
登录 后发表回答