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("电", "-","子", "=", "书")
相关推荐
stuartevil7 小时前
零基础怎么用AI文生漫剧做出一条完整视频
人工智能·音视频
极客猴子8 小时前
能提取抖音视频文案的APP推荐:短视频文案工具合集
人工智能·智能手机·音视频·语音识别
cellurw10 小时前
从虚拟化音频架构到板端故障定位:车载 Audio 阶段性工程实践整理
架构·音视频
martindelophy13 小时前
使用 Timeline Studio 制作 AI 视频二创:从高光分析、音乐卡点到 15 秒成片
人工智能·音视频
一个处女座的程序猿17 小时前
Agent之Tool:MoneyPrinterTurbo(一站式 AI 短视频生成工具)的简介、安装和使用方法、案例应用之详细攻略
人工智能·音视频·moneyprinter
总有刁民想爱朕ha18 小时前
零基础Python开发「图片批量转MP4视频」工具,本地离线、免费无水印
开发语言·python·音视频
ai产品老杨18 小时前
视频分析网络穿透项目实战记录:内网摄像头远程调试与跨网接入手册
网络·音视频
qq_2529599719 小时前
2026年视频解析工具推荐:4个在线网站、1个下载Skill和1款视频号下载软件
音视频
'20619 小时前
**写了个自动整理下载视频的脚本:按片名归档、自动重命名、生成目录索引
开发语言·python·ffmpeg·音视频·cctv
殷忆枫20 小时前
嵌入式Linux下基于FFmpeg实现MP4解码为JPG图片(SSD202D交叉编译实战)
linux·运维·ffmpeg