'Invalid radius value in BlurMask Ffmpeg

I'm using boxblur filter to blur specific area of video using cropping library, when i fire command sometimes it works well but sometimes it's showing me error. Command and error are as below:

ffmpeg -ss 00:00 -t 02:43 -i input.mp4 
-filter_complex crop=28:24:20:14,boxblur=25[fg];[0:v][fg]overlay=20:14,
-vcodec libx264 output.mp4

This is throwing error - Invalid luma_param radius value 25, must be >= 0 and <= 12

In this command crop=... can be vary according to user need and boxblur=25 is static. So, if the error is related to boxblur then the question is why sometimes it works or if this was not the problem then what is the problem and solution?



Solution 1:[1]

boxblur value must be less than or equal to the lesser input dimension (width or height) divided by 2. By input I am referring to the input given to boxblur: which in your case is coming from the crop filter. So if crop=28:24 then boxblur max value is 12. If crop=20:100 then boxblur max value is 10.

Solution is to use boxblur before crop:

ffmpeg -ss 00:00 -t 02:43 -i input.mp4 -filter_complex "boxblur=25,crop=28:24:20:14[fg];[0:v][fg]overlay=20:14" -c:v libx264 output.mp4

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 llogan