FFMPEG如何放大然后在一个命令行中缩小 [英] FFMPEG How to zoom in and then zoom out in one command line

查看:739
本文介绍了FFMPEG如何放大然后在一个命令行中缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作具有缩放效果的视频.

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"

这是我的第一个主意,但只是停留在1.2缩放比例上.

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

我希望缩放从1开始,然后一旦缩放达到1.2,然后慢慢缩小到1.0.

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

我该怎么办?

推荐答案

使用

"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"

在每个42帧循环中,这将放大前10帧,并缩小其余的帧.

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

这篇关于FFMPEG如何放大然后在一个命令行中缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆