ffmpeg:如何添加pixellate效果? [英] ffmpeg: how to add pixellate effect?
问题描述
我需要模糊一些上传的视频并进行编码。
由于模糊,这意味着像素化它们,所以大方块出现并模糊。
I need to blur some uploaded videos and encoded them. Infact by blur, it means pixellate them so "big squares" appear and blur it.
有什么想法我可以做到吗? (ffmpeg会很棒,任何命令行的窗口工具都应该可以)
Any idea on how I can do that ? (ffmpeg would be great, by any command line windows tool should be ok)
谢谢。
推荐答案
FFmpeg可以支持包含pixeliz0r的frei0r过滤器。示例:
FFmpeg can support the frei0r filters which includes pixeliz0r. Example:
ffmpeg -i input -filter:v frei0r=pixeliz0r=0.02:0.02 output
这两个参数是:
- BlockSizeX:一个像素的水平尺寸
- BlockSizeY:一个像素的垂直尺寸
当然,更大的价值当然会创造更大的块。 Zeranoe FFmpeg版本包括frei0r,但是我不确定它是否适用,因为某些用户遇到问题尽管这可能至少在6个月之前,但它在 #ffmpeg IRC中。
A larger value will of course create larger blocks. The Zeranoe FFmpeg builds include frei0r, however I'm not sure if it works as some users were having issues with it in #ffmpeg IRC although this was probably at least 6 months ago.
至于Linux编译很简单。 Ubuntu用户可以按照 HOWTO:安装并使用最新的FFmpeg和x264 ,只需添加 frei0r-plugins-dev 作为依赖,然后将 - enable-frei0r
添加到您的ffmpeg配置中。
As for Linux compilation is simple. Ubuntu users can follow HOWTO: Install and use the latest FFmpeg and x264 and simply add frei0r-plugins-dev as a dependency and then add --enable-frei0r
to your ffmpeg configure.
这篇关于ffmpeg:如何添加pixellate效果?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!