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("电", "-","子", "=", "书")
相关推荐
沃虎Chinty-0317 小时前
音频变压器核心技术解析:噪声隔离、阻抗匹配与信号平衡转换
音视频
有味道的男人1 天前
电商效率翻倍:用 Open Claw 对接小红书视频详情接口,一键抓取商品全量信息
音视频
AI科技摆渡1 天前
三步极速对接 Grok-Video-3 视频生成 API
人工智能·音视频
新缸中之脑1 天前
用Remotion构建AI生成视频
人工智能·音视频
Likeadust1 天前
视频高清直播点播/音视频点播/云点播/云直播EasyDSS一体化云平台重塑智慧校园数字协作生态
音视频
aovenus1 天前
FFmpeg 官网及文档
ffmpeg
aovenus1 天前
FFmpeg 工具介绍
ffmpeg
EasyGBS1 天前
国标GB28181视频AI算法分析平台EasyGBS支持地址免登录!开启“绿色通道”
音视频
Never_every991 天前
8 个高清 4K 视频素材网址!无水印可商用
大数据·前端·音视频·视频
常利兵1 天前
从0到1,开启Android音视频开发之旅
android·音视频