我一直在努力通过FFmpeg,但我一直无法得到他们的网站上的示例运行旋转。我试图在底部的一个固定点上来回摆动视频 - 想想一个从左向右移动的头(等等)。FFmpeg - 在角度旋转
我正在尝试使用过滤器“rotate”(https://ffmpeg.org/ffmpeg-filters.html#rotate)来做到这一点。试图使用他们的例子,我得到一个错误。
这是我到目前为止有:
ffmpeg -i vid1.mp4 -i vid2.mov -loop 1 -i image.png -filter_complex "\
[2:v]alphaextract, scale=240x160[mask];\
[0:v] scale=240x160, rotate=A*sin(2*PI/T*t) [ascaled];\
[ascaled][mask]alphamerge[masked];\
[1:v]scale=480x360[background];\
[background][masked]overlay=120:20"\
-c:a copy 65B6354F61B4AF02_HD_sq.MOV
我使用的一个例子,企图得到的东西在所有运行“旋转”直接。
的错误我得到的回复是:
[Parsed_rotate_3 @ 0x7ff4476045e0] [Eval @ 0x7fff5b3e3f00] Undefined constant or missing '(' in 'T*t)'
[Parsed_rotate_3 @ 0x7ff4476045e0] Error occurred parsing angle expression 'A*sin(2*PI/T*t)'
[Parsed_rotate_3 @ 0x7ff4476045e0] Failed to configure output pad on Parsed_rotate_3
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
如果我删除“A”,“T”,“罪”等,不旋转实际的工作,但是从所期望的行为为止。
我是否缺少某些东西来揭露那些参数?
非常感谢,非常有帮助。 – connor