以背景为中心连续旋转图像。

问题描述 投票:0回答:1

是否可以连续旋转图像或一系列图像,并以视频形式输出。ffmpeg? 旋转的图像应在背景上居中。

请看 视频示例.

ffmpeg
1个回答
2
投票

使用 转动 滤镜来旋转图像。颜色 过滤器作为背景,而 叠加 滤镜将图像置于背景之上。

example of rotating image over plain background

ffmpeg -f lavfi -i color=c=00ff00:s=1280x720:d=10 -loop 1 -i image.png -filter_complex "[1]rotate=angle=PI*t:fillcolor=none:ow='hypot(iw,ih)':oh=ow[fg];[0][fg]overlay=x=(W-w)/2:y=(H-h)/2:shortest=1:format=auto,format=yuv420p" output.mp4
© www.soinside.com 2019 - 2024. All rights reserved.