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

相关推荐
manjianghong862 分钟前
制作高质量AI视频需要哪些步骤
人工智能·音视频·ai视频·ai应用
CodeOfCC37 分钟前
C++ 实现ffmpeg解析hls fmp4 EXT-X-DISCONTINUITY并支持定位
开发语言·c++·ffmpeg·音视频
Java程序员 拥抱ai2 小时前
SpringBoot + FFmpeg + Redis:视频转码、截图、水印异步处理平台搭建
spring boot·redis·ffmpeg
老兵发新帖3 小时前
无人机视频检测方案--增加实时推流,并支持开关可配置
音视频·无人机
却道天凉_好个秋3 小时前
OpenCV(五十一):视频前后景分离
人工智能·opencv·音视频
EasyCVR3 小时前
视频汇聚平台EasyCVR筑牢运动场馆可视化智能监控防线
音视频
给算法爸爸上香15 小时前
yolo tensorrt视频流检测软解码和硬解码
yolo·ffmpeg·视频编解码·tensorrt·nvcodec
迈火19 小时前
APISR IN COMFYUI:提升ComfyUI图像超分辨率的强力插件
图像处理·人工智能·计算机视觉·stable diffusion·aigc·音视频·midjourney
qq_3106585121 小时前
webrtc源码走读(五)核心引擎层——传输模块
服务器·网络·音视频·webrtc
dwp11471706071 天前
在Windows上基于MSYS2 UCRT64工具链编译ffmpeg源码
windows·ffmpeg