Skip to content

Instantly share code, notes, and snippets.

@sjwilliams
Created May 2, 2014 17:45
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save sjwilliams/4b23f60fc451e7e8c59e to your computer and use it in GitHub Desktop.
Save sjwilliams/4b23f60fc451e7e8c59e to your computer and use it in GitHub Desktop.
FFmpeg: Blur video
ffmpeg -i intro.mov -vf "boxblur=5:1" intro-blur.mov
@SreenikethanI
Copy link

Thanks for this!

@jackyhieu1211-hn
Copy link

Hello . what is the mean 5:1 ?

@hraban
Copy link

hraban commented Nov 10, 2019

@hieuseesaa as far as I understand https://ffmpeg.org/ffmpeg-filters.html#boxblur and from tinkering with it: the 5 is the pixel radius of the (gaussian?) blur effect, while the 1 is the amount of consecutive frames to apply the blur to. increasing the 5 will make it blurrier. Increasing the 1 will make it choppier (not "smoothed out", as you might expect from e.g. a moving average).

@jackyhieu1211-hn
Copy link

@hraban thank you very much

Copy link

ghost commented Oct 5, 2021

  • default values: -vf boxblur === -vf boxblur=luma_radius=2:luma_power=2.
  • blur just a part of the frame: -vf boxblur=w=20:h=20:x=400:y=200.
  • blur just for a few seconds of the video's timeline (example: 00:00:03-00:10:00) -vf boxblur=enable='between(t,3,10*60)'.
  • combine those freely, order is not important (: to separate arguments, = to specify value).
  • f.y.i, enable is available for any filter! (when it makes sense, not much for crop, for example..).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment