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("电", "-","子", "=", "书")
相关推荐
Coovally AI模型快速验证44 分钟前
超越Sora的开源思路:如何用预训练组件高效训练你的视频扩散模型?(附训练代码)
人工智能·算法·yolo·计算机视觉·音视频·无人机
weixin_436804071 小时前
音频在线预览工具 - 输入URL即刻播放远程音频
音视频
Benny的老巢1 小时前
n8n工作流通过Execute Command用FFmpeg处理音频,报错 stderr maxBuffer length exceeded的解决方案
ffmpeg·音频合成·n8n·n8n工作流·execute command
kaizq2 小时前
AI-MCP本地流媒音频服务器设计与CherryStudio部署应用
音视频·cherrystudio·fastmcp·streamablehttp·本地mcp流媒服务器
thinkMoreAndDoMore3 小时前
audioservice
音视频
TEL189246224773 小时前
IT6517BFN:单芯片DisplayPort转VGA转换器,集成MCU
音视频·实时音视频·视频编解码
TEL189246224774 小时前
IT6516BFN:单芯片DisplayPort转VGA转换器,集成MCU
音视频·实时音视频·视频编解码
Facechat4 小时前
视频混剪-WebCodecs导出视频
音视频
Facechat5 小时前
视频混剪-转场效果是怎么实现的
音视频
18538162800云罗7 小时前
2026 最新矩阵剪辑系统搭建教程(附完整可运行源码
线性代数·矩阵·音视频