DEV Community

Sixtus Anyanwu
Sixtus Anyanwu

Posted on

2

How To Blur a Video using FFmpeg’s BoxBlur Filter

To apply a box blur effect to a video using ffmpeg, you can use the boxblur filter. Here's an example command:

ffmpeg -i input.mp4 -vf "boxblur=10:2" output.mp4
Enter fullscreen mode Exit fullscreen mode

Let's break down the command:

  • ffmpeg: The command-line tool for handling multimedia processing.
  • -i input.mp4: Specifies the input video file (replace input.mp4 with the actual filename or path).
  • -vf "boxblur=10:2": Specifies the video filter chain. The boxblur filter is used with two parameters: the first parameter 10 represents the blur radius, and the second parameter 2 represents the number of iterations.
  • output.mp4: Specifies the output video file (replace output.mp4 with the desired filename or path).

Adjust the values of the blur radius and iterations to achieve the desired blurring effect. Higher values will result in a stronger blur.

Make sure you have ffmpeg installed on your system and accessible from the command line before running the command.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay