ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 8051|回复: 1

使用ffmpeg将图像任意角度旋转

[复制链接]
发表于 2017-6-19 14:46:39 | 显示全部楼层 |阅读模式
有一种需求,将图像旋转任意角度,下面看一下滤镜帮助信息,rotate滤镜可以解决这个需求,angle或者a就是设置一下角度:
[AppleScript] 纯文本查看 复制代码
rotate AVOptions:
  angle             <string>     ..FV.... set angle (in radians) (default "0")
  a                 <string>     ..FV.... set angle (in radians) (default "0")
  out_w             <string>     ..FV.... set output width expression (default "iw")
  ow                <string>     ..FV.... set output width expression (default "iw")
  out_h             <string>     ..FV.... set output height expression (default "ih")
  oh                <string>     ..FV.... set output height expression (default "ih")
  fillcolor         <string>     ..FV.... set background fill color (default "black")
  c                 <string>     ..FV.... set background fill color (default "black")
  bilinear          <boolean>    ..FV.... use bilinear interpolation (default true)



下面旋转一个30°角度图像看一下效果
[AppleScript] 纯文本查看 复制代码
ffmpeg -i ~/test/objectC/facebook.mp4 -filter_complex "rotate=a=30" /root/a.mp4


效果图如下


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复

使用道具 举报

发表于 2018-9-7 16:57:30 | 显示全部楼层
旋转图片的话如何设置没有被覆盖的区域为透明颜色
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-23 20:59 , Processed in 0.051155 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表