ffmpeg视频滤镜:网格-drawgrid

滤镜介绍

drawgrid

官网链接 =》 FFmpeg Filters Documentation

drawgrid会在视频上画一个网格。

滤镜使用

参数
复制代码
x                 <string>     ..FV.....T. set horizontal offset (default "0")
   y                 <string>     ..FV.....T. set vertical offset (default "0")
   width             <string>     ..FV.....T. set width of grid cell (default "0")
   w                 <string>     ..FV.....T. set width of grid cell (default "0")
   height            <string>     ..FV.....T. set height of grid cell (default "0")
   h                 <string>     ..FV.....T. set height of grid cell (default "0")
   color             <string>     ..FV.....T. set color of the grid (default "black")
   c                 <string>     ..FV.....T. set color of the grid (default "black")
   thickness         <string>     ..FV.....T. set grid line thickness (default "1")
   t                 <string>     ..FV.....T. set grid line thickness (default "1")
   replace           <boolean>    ..FV.....T. replace color & alpha (default false)
  • x,y 网格的左上角的位置
  • width(w),height(h) 表示一个网格中一个单元(小网格)的宽和高
  • color(c) 网格的颜色
  • thickness(t) 网格线的宽度
  • replace 是不是也在alpha上也画网格
案例

原图

复制代码
ffmpeg -y -i ffm_media/liuyifei.jpeg  -filter_complex "drawgrid=width=100:height=100:thickness=2:color=red@0.5" result/drawgrid/drawgrid_test_default.jpg
复制代码
ffmpeg -y -i ffm_media/liuyifei.jpeg  -filter_complex "drawgrid=w=iw/3:h=ih/3:t=2:c=white@0.5" result/drawgrid/drawgrid_test_001.jpg
复制代码
## 祝你好运
 
hope("大神多多指点")
topic("有问题可以交流呀")
concat("球球QUN", "61480", "9646")

相关推荐
FrameNotWork4 小时前
HarmonyOS 6.1 云应用客户端适配实战(二):Native Window 视频渲染
华为·音视频·harmonyos
2023自学中4 小时前
imx6ull 开发板 推流ov5640数据,虚拟机用 ffplay 拉流播放
linux·音视频·嵌入式·开发板
天天进步20154 小时前
Python全栈项目--基于深度学习的视频目标跟踪系统
python·深度学习·音视频
EasyDSS6 小时前
私有化音视频系统/视频高清直播点播EasyDSS重塑企业视频门户新生态
音视频
byte轻骑兵7 小时前
【LE Audio】CAP精讲[13]: Central侧LE连接建立全流程解析
人工智能·音视频·cap·le audio·低功耗音频
EasyDSS7 小时前
视频直播点播/音视频点播/云点播/云直播EasyDSS一体化音视频平台赋能企业数字化转型
音视频
俊哥工具10 小时前
电脑怎么玩手机APP?超简单新手教程
pdf·电脑·word·excel·音视频
FrameNotWork10 小时前
HarmonyOS 6.1 云应用客户端适配实战(五):日志调试与问题排查
华为·音视频·harmonyos
2501_9422792513 小时前
视频转文字听不清、整理慢如何高效解决?
音视频
码农阿强13 小时前
PixVerse 全系列视频生成模型技术架构详解 + Python 基于 StartAPI.top 接口实战调用
python·ai·架构·音视频·ai编程