ffmpeg 视频滤镜:屏蔽边框杂色- fillborders

滤镜描述

fillborders

官网链接 => FFmpeg Filters Documentation

fillborders滤镜有几种方式帮你屏蔽边框的杂色、不好的图案。

滤镜使用

参数
复制代码
   left              <int>        ..FV.....T. set the left fill border (from 0 to INT_MAX) (default 0)
   right             <int>        ..FV.....T. set the right fill border (from 0 to INT_MAX) (default 0)
   top               <int>        ..FV.....T. set the top fill border (from 0 to INT_MAX) (default 0)
   bottom            <int>        ..FV.....T. set the bottom fill border (from 0 to INT_MAX) (default 0)
   mode              <int>        ..FV.....T. set the fill borders mode (from 0 to 6) (default smear)
     smear           0            ..FV.....T.
     mirror          1            ..FV.....T.
     fixed           2            ..FV.....T.
     reflect         3            ..FV.....T.
     wrap            4            ..FV.....T.
     fade            5            ..FV.....T.
     margins         6            ..FV.....T.
   color             <color>      ..FV.....T. set the color for the fixed/fade mode (default "black")
  • left/right/top/bottom 可以分别进行设置,用于控制屏蔽的局域大小
  • mode,这是集中屏蔽方式。我测试了一下,除了fade以外,其他的效果还不错。
  • color,在fixed和fade模式的时候,设置填充使用的颜色。
案例

原图

可以看到图片的上边和下边有黄色的杂色。

复制代码
ffmpeg -y -i ffm_media/gee_garbage.jpg -filter_complex "fillborders=top=30:bottom=30:mode=mirror" result/fillborders_test_006.jpg

我可以通过上面命令来执行屏蔽操作,其中mode用于设置屏蔽模式,不同模式的效果如下:

复制代码
ffmpeg -y -i ffm_media/gee_garbage.jpg -filter_complex "fillborders=top=30:bottom=30:mode=fade:color=green" result/fillborders_test_014.jpg

设置fade模式的填充颜色

复制代码
ffmpeg -y -i ffm_media/gee_garbage.jpg -filter_complex "fillborders=top=30:bottom=30:mode=fixed:color=green" result/fillborders/fillborders_test_015.jpg

设置fixed模式的填充颜色

复制代码
## 祝你好运
 
hope("大神多多指点")
topic("有问题可以交流呀")
concat("球球QUN", "61480", "9646")
include("电", "-","子", "=", "书")
相关推荐
小猴子爱上树20 小时前
跨境图片翻译工具,批量处理商品图视频字幕
python·音视频
2301_8059629320 小时前
在昉星光2(RISC-V)上构建每日短视频自动生成器
音视频·risc-v
xyz_CDragon21 小时前
MiniMax H3 vs Seedance 2.5 vs Kling 3.0:2026 AI视频生成模型横评(排行榜+价格+开源实测)
人工智能·开源·音视频·transformer·minmax h3
程序员老陆21 小时前
FFmpeg libswresample 模块的关键函数swr_convert 到底在干嘛?
ffmpeg·音视频·格式转换·音频重采样
csdnfanguyinheng21 小时前
端到端加密音视频通话系统
音视频
海兰21 小时前
ffmpeg-wasm 完整安装指南(Ubuntu 24.04)
ubuntu·ffmpeg·wasm
show4331 天前
2026小程序端视频转文字技术对比:识别引擎精度实测
小程序·音视频
南山电子nscn2 天前
国巨RT2512系列薄膜精密电阻在音频放大器中的应用及技术优势解析
音视频·薄膜精密电阻
starzy19902 天前
Soloop 智能视频创作全流程实战指南
数据库·microsoft·音视频
xingyuzhisuan2 天前
星宇智算 AI 视频工作台・图生视频(首尾帧)・Vidu:双模型可控动态过渡生成应用
人工智能·计算机视觉·音视频