[英]FFmpeg tile cropping
Use 采用
ffmpeg -loop 1 -i image.png -vf "crop=iw/3:ih/4:mod(n,3)*iw/3:trunc(n/3)*ih/4" -vframes 12 out%d.png
For full coverage of image, the image width has to be divisible by 3, and height by 4. 为了完全覆盖图像,图像宽度必须被3整除,高度必须被4整除。
For square output, set crop height to crop width. 对于正方形输出,将作物高度设置为作物宽度。 The vertical crop leaves some space at top and bottom. 垂直作物在顶部和底部留有一些空间。
ffmpeg -loop 1 -i image.png -vf "crop=iw/3:iw/3:mod(n,3)*iw/3:trunc(n/3)*iw/3+(ih-iw)/2" -vframes 12 out%d.png
(This method requires that ih/4 > iw/3 for desired output) (此方法要求ih / 4> iw / 3以获得所需的输出)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.