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("电", "-","子", "=", "书")
相关推荐
神奇霸王龙19 小时前
GPT-Image-2 角色一致性屠榜:2026 五款图生图模型 IP 漫剧实测
人工智能·gpt·tcp/ip·ai·ai作画·prompt·音视频
grey_csdn19 小时前
1930_再论本地大模型处理音视频
ai·音视频
小龙报20 小时前
远控功能哪个全?2026六款远控横评实测
实时互动·音视频·交互
小猴子爱上树20 小时前
电商多语言图片翻译工具,批量翻译视频字幕加智能抠图
python·音视频
pla8888888821 小时前
ERNIE-Image + InfiniteTalk,从文生图到无限时长视频——国产DCU部署:从图像生成到音画同步数字人视频的全链路实现(含完整代码)
音视频
中微极客21 小时前
AI视频生成器技术选型与工程实践指南(2026)
人工智能·音视频
神奇霸王龙1 天前
国产音乐视频 Prompt 三段式屠夫榜:5 个国产视频模型实测对比
人工智能·ai·prompt·音视频·agent·ai编程·agi
神奇霸王龙1 天前
AI视频Prompt结构化实战指南:可灵/万相/豆包
人工智能·ai·prompt·aigc·音视频·ai编程
SEONIB_Explorer1 天前
跨境电商新手零门槛教程:AI 一键生成 TikTok/Ins 投放短视频,5 步 60 秒出片
人工智能·音视频·跨境电商·视频制作·veonib
运营小白2 天前
电商产品链接自动生成视频广告:从“信息搬运“到“链接进、视频出“的工程化思路
大数据·人工智能·aigc·音视频·veonib·电商视频广告·产品链接解析