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:[email protected]" result/drawgrid/drawgrid_test_default.jpg
复制代码
ffmpeg -y -i ffm_media/liuyifei.jpeg  -filter_complex "drawgrid=w=iw/3:h=ih/3:t=2:[email protected]" result/drawgrid/drawgrid_test_001.jpg
复制代码
## 祝你好运
 
hope("大神多多指点")
topic("有问题可以交流呀")
concat("球球QUN", "61480", "9646")

相关推荐
邪恶的贝利亚2 小时前
深入解析音频:格式、同步及封装容器
音视频
chen_song_3 小时前
WebRTC的ICE之TURN协议的交互流程中继转发Relay媒体数据的turnserver的测试
算法·音视频·webrtc·交互·媒体
恒拓高科WorkPlus7 小时前
局域网视频软件BeeWorks Meet,企业内部安全会议不断线
网络·安全·音视频
mosquito_lover116 小时前
Python实现音频数字水印方法
python·音视频
想躺在地上晒成地瓜干18 小时前
树莓派超全系列文档--(18)树莓派配置音频
linux·音视频·树莓派·raspberrypi·树莓派教程
山河君18 小时前
音频进阶学习二十四——IIR滤波器设计方法
学习·算法·音视频·信号处理
vonchenchen118 小时前
nara wpe去混响学习笔记
机器学习·音视频·音频·信息与通信·信号处理
Yeauty18 小时前
从0到1:Rust 如何用 FFmpeg 和 OpenGL 打造硬核视频特效
rust·ffmpeg·音视频
居然是阿宋19 小时前
深入理解 YUV 颜色空间:从原理到 Android 视频渲染
android·音视频