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

相关推荐
mortimer18 小时前
牺牲质量换效率:视频翻译项目中音画同步模块的深度实现与思考
python·ffmpeg
EasyCVR20 小时前
浅述视频汇聚平台EasyCVR视频编解码与转码技术如何成就视频体验
音视频·视频编解码
EasyGBS21 小时前
EasyGBS视频实时监控系助力实现换热站全景可视化管理
音视频
zgyhc205021 小时前
【Android Audio】安卓音频中Surround mode切换流程
android·音视频
Jonathan Star1 天前
用Python轻松提取视频音频并去除静音片段
开发语言·python·音视频
给大佬递杯卡布奇诺1 天前
FFmpeg 基本数据结构 AVInputFormat 分析
数据结构·c++·ffmpeg·音视频
叶羽西1 天前
FFmpeg常用操作
ffmpeg
给大佬递杯卡布奇诺1 天前
FFmpeg 基本数据结构 AVCodecContext分析
数据结构·c++·ffmpeg·音视频
PWRJOY2 天前
Audio Extractor 视频提取音频工具
音视频