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

相关推荐
三十_A21 分钟前
零基础通过 Vue 3 实现前端视频录制 —— 从原理到实战
前端·vue.js·音视频
愚公搬代码1 小时前
【愚公系列】《AI短视频创作一本通》018-AI语音及音乐的创作(短视频背景音乐的选择及创作)
人工智能·音视频
sweetone12 小时前
LINN莲CLASSIK桌面音响微修
经验分享·音视频
Echo_NGC223714 小时前
【FFmpeg 使用指南】Part 3:码率控制策略与质量评估体系
人工智能·ffmpeg·视频·码率
晚霞的不甘16 小时前
CANN 编译器深度解析:UB、L1 与 Global Memory 的协同调度机制
java·后端·spring·架构·音视频
美狐美颜SDK开放平台17 小时前
多终端适配下的人脸美型方案:美颜SDK工程开发实践分享
人工智能·音视频·美颜sdk·直播美颜sdk·视频美颜sdk
饭饭大王66620 小时前
CANN 生态深度整合:使用 `pipeline-runner` 构建高吞吐视频分析流水线
人工智能·音视频
xmRao21 小时前
Qt+FFmpeg 实现 PCM 音频转 AAC 编码
qt·ffmpeg·pcm
xmRao21 小时前
Qt+FFmpeg 实现录音程序(pcm转wav)
qt·ffmpeg
晚霞的不甘21 小时前
CANN 编译器深度解析:TBE 自定义算子开发实战
人工智能·架构·开源·音视频