DEV Community

Sixtus Anyanwu
Sixtus Anyanwu

Posted on

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.

Top comments (0)