ffmpeg视频滤镜:均值模糊-boxblur

滤镜简述

boxblur

官网链接=> https://ffmpeg.org/ffmpeg-filters.html#boxblur

这个滤镜会使图片或者视频变得模糊,他可以针对色度和亮度进行模糊。

滤镜的使用

参数
复制代码
boxblur AVOptions:
   luma_radius       <string>     ..FV....... Radius of the luma blurring box (default "2")
   lr                <string>     ..FV....... Radius of the luma blurring box (default "2")
   luma_power        <int>        ..FV....... How many times should the boxblur be applied to luma (from 0 to INT_MAX) (default 2)
   lp                <int>        ..FV....... How many times should the boxblur be applied to luma (from 0 to INT_MAX) (default 2)
   chroma_radius     <string>     ..FV....... Radius of the chroma blurring box
   cr                <string>     ..FV....... Radius of the chroma blurring box
   chroma_power      <int>        ..FV....... How many times should the boxblur be applied to chroma (from -1 to INT_MAX) (default -1)
   cp                <int>        ..FV....... How many times should the boxblur be applied to chroma (from -1 to INT_MAX) (default -1)
   alpha_radius      <string>     ..FV....... Radius of the alpha blurring box
   ar                <string>     ..FV....... Radius of the alpha blurring box
   alpha_power       <int>        ..FV....... How many times should the boxblur be applied to alpha (from -1 to INT_MAX) (default -1)
   ap                <int>        ..FV....... How many times should the boxblur be applied to alpha (from -1 to INT_MAX) (default -1)

注意一下,lr和luma_radius是一个参数,lr是luma_radius的缩写,后面的类似。

  • luma是亮度,亮度的值越大,视觉上会越模糊,这个值最大是min(w,h)/2
  • chroma是色度,这个值越大,图片的颜色越淡,这个值最大是min(w,h)/2
  • luma_power和choma_power这个是迭代次数,即反复的再图片上执行均值模糊操作
使用

原图

明度和亮度都最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=min(h\,w)/10:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_02.jpg
复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=1:luma_power=1:chroma_radius=min(cw\,ch)/10:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_08.jpg

色度最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=min(cw\,ch)/10:luma_power=1:chroma_radius=1:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_09.jpg

亮度最大值的时候

复制代码
ffmpeg -y -i ffm_media/gee_short.jpg -filter_complex "boxblur=luma_radius=10:luma_power=5:chroma_radius=1:chroma_power=1" /data/work_space/result/boxblur/boxblur_test_06.jpg

色度和亮度都比较小的时候

复制代码
## 祝你好运
 
hope("大神多多指点")
topic("有问题可以交流呀")
concat("求求QUN", "61480", "9646")
相关推荐
CyL_Cly3 小时前
Bilidown下载 1.2.7 bilibili视频下载
音视频
非凡ghost3 小时前
AIMP(音乐播放软件)
前端·windows·音视频·firefox
sir56565564 小时前
即梦生成的视频无水印保存方法分享
音视频
小手智联老徐5 小时前
OpenClaw 2026.4.11 :记忆导入革命、视频生成升级与多平台体验优化
音视频·ai写作·openclaw
步达硬件6 小时前
【MATLAB】读取视频,提取视频每一帧特征值并存成EXCEL,并保存个别图像
matlab·excel·音视频
reasonsummer6 小时前
【教学类-160-05】20260412 AI视频培训-练习5“豆包AI视频《幼儿园之父:福禄贝尔(英声中字)》+豆包图片风格:伦勃朗(古典油画)竖版”
音视频·豆包·通义万相
m晴朗6 小时前
ffmpeg(2)-音频相关知识
ffmpeg·音视频
sp_fyf_20246 小时前
【大语言模型】 AVGen-Bench:一个用于文本到音频-视频生成的多粒度、任务驱动型评估基准
人工智能·深度学习·神经网络·机器学习·语言模型·数据挖掘·音视频
山栀shanzhi7 小时前
【FFmpeg实战】手撕音频转码:WAV转AAC的全链路解析与C++实现
ffmpeg·音视频·aac
lq12332107 小时前
视频AI超分辨率转换器Topaz Video Pro 1.3.1
音视频