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("电", "-","子", "=", "书")
相关推荐
weixin_69065474几秒前
#龙迅LT6911D 高性价比IC ,功能适用于HDMI转两 PORT MIPIDSI/CSI,分辨率高达4K。
音视频·信号处理
ViiTor_AI13 分钟前
AI 语音克隆入门指南:如何用 3 秒音频生成真实人声?
人工智能·音视频·语音识别
步达硬件42 分钟前
【Matlab】把视频里每一帧存为单独的图片
开发语言·matlab·音视频
ViiTor_AI1 小时前
2026 年 AI 配音工具深度对比:视频旁白与有声书为什么越来越依赖语音克隆?
人工智能·音视频·语音识别
步达硬件2 小时前
【Matlab】修改视频尺寸
前端·matlab·音视频
TheNextByte13 小时前
将视频从电脑传输到Android (超简单指南)
android·电脑·音视频
_chirs20 小时前
编译不依赖动态库的FFMPEG(麒麟国防 V10)
arm开发·ffmpeg
给算法爸爸上香20 小时前
yolo目标检测线程池高性能视频tensorrt推理(每秒1000+帧)
yolo·目标检测·音视频·线程池·tensorrt
大学生小郑21 小时前
sensor成像的原理
图像处理·音视频·视频
熊猫钓鱼>_>1 天前
从零到一:打造“抗造” Electron 录屏神器的故事
前端·javascript·ffmpeg·electron·node·录屏·record