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")

相关推荐
EasyDSS14 分钟前
私有化视频会议系统/视频高清直播点播EasyDSS一体化视频平台赋能各行业数字化高效协同
音视频
科研前沿4 小时前
镜像视界浙江科技有限公司的关键技术突破有哪些?
大数据·人工智能·科技·算法·音视频·空间计算
东方佑6 小时前
VideoBlockTokenizer:视频色块语义token化器的设计与实现
音视频
Black蜡笔小新7 小时前
国标GB28181之后,视频监控EasyCVR的下一个“统一战场”在哪里?
音视频
沃虎Chinty-038 小时前
音频变压器选型与应用:三大核心功能深度解析
音视频
互联科技报9 小时前
2026年第一季度短视频矩阵视频混剪头部工具市场动态深度解析
人工智能·矩阵·音视频
Digitally9 小时前
如何将 iPad 上的视频无损传输到 Mac
macos·音视频·ipad
码流怪侠9 小时前
FFmpeg 开发实战全解析:从入门到精通(附完整代码示例)
ffmpeg·音视频开发·视频编码
AI25122410 小时前
AI视频生成技术解析:主流软件原理与选型指南
人工智能·音视频
ting945200011 小时前
微软 VibeVoice 万字深度解析:从原理、架构、部署到行业落地,重新定义长音频 AI
人工智能·架构·音视频