FFmpeg滤镜效果--剪切crop

本文介绍了FFmpeg中用于视频剪切的crop滤镜,包括参数w、h、x、y的详细说明,以及如何进行静态和动态的视频剪切操作。提供了命令用例和参考资料,帮助用户理解并实践FFmpeg的视频裁剪功能。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

crop=W:H:X:Y 参数说明

  • w: the width of the output video
  • h: the height of the output video
  • x: the horizontal position from where to begin cropping, starting from the left (with the absolute left margin being 0). defaults to the center (iw-ow)/2
  • y: the vertical position from where to begin cropping, starting from the top of the video (the absolute top being 0). defaults to the center (ih-oh)/2
  • other variables:
    • t: the timestamp expressed in seconds
    • n: the number of input frame, starting from 0;
    • a: same as iw/ih

命令用例

注意:输入必须是视频文件,不能是图片文件。

  1. 静态剪切某个位置
# crop in center   100*100 pixel
ffplay -i input.mp4 -vf "crop=100:100"  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值