0

I searched for a FFmpeg command to blur part of a video, and found the following:

ffmpeg -i short.mp4 -filter_complex 
       "[0:v]split=2[v0][v1]; 
        [v0]crop=200:200:60:30,boxblur=10[fg]; 
        [v1][fg]overlay=60:30[v]" -map "[v]" 
    -map 0:a -c:v libx264 -c:a copy -movflags +faststart filtered.mp4

(cut-cat minimal video editing bash script)

Unfortunately, I can't blur the part of the video that I want to blur. So, I took a picture with the same resolution and color so that someone may help me understand what to do, and perhaps even explain what the numbers in the code above mean or refer to.

Here's the picture:

enter image description here

https://i.ibb.co/4fZNcgN/ask-368-X320-WHITE-BLURED.png

  • Welcome! Please share your answer so that others may benefit. There is nothing wrong with answering your own question and marking it as accepted. – Michael Liebman Apr 28 at 18:45
0

The above command line was copied from FFmpeg - Apply blur over face which also provides a good explanation:

Note: The x and y offset numbers in overlay (60 and 30 in this example) must match the crop offsets.

What this example does:

  • Crop the copy to be the size of the area to be blurred. In this example: a 200x200 pixel box that is 60 pixels to the right (x axis) and 30 pixels down (y axis) from the top left corner.
  • Blur the cropped area.
  • Overlay the blurred area using the same x and y parameters from the crop filter.

So: the 200:200 is the size of the blurred area and 60:30 its position relative to the top-left corner. The input v is split into two streams v0 and v1 where v0 is blurred and the result is named fg. Streams v1 and fg are composed to the final stream v.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.