# smartblur¶

doc

https://ffmpeg.org/ffmpeg-filters.html#smartblur-1

“smartblur” blurs the input video without impacting the outlines. (It is a slightly confusing filter which acts as “sharpen” when giving a negative value to “strength” while it is named “blur”.)

• xxx_radius: radius that specifies the variance of the gaussian filter used to blur the image.

• xxx_strength: strength. a positive value will blur the image whereas a negative value will sharpen the image.

• xxx_threshold: threshold used as a coefficient to determine whether a pixel should be blurred or not. A value of 0 will filter all the image, a positive value will filter flat areas and a negative value will filter edges.

#! /bin/sh
ifn="Grape_Vineyard.mp4"
ifnb="basename \"${ifn}\" .mp4" pref="basename$0 .sh"
#
luma_radius=${luma_radius:-2.0} luma_strength=${luma_strength:-0.5}
#
ffmpeg -y -i "${ifn}" -filter_complex " [0:v]split[0v1][0v2]; [0v1]crop=900:500:30:580,setsar=1, smartblur=lr=${luma_radius}:ls=${luma_strength} ,drawbox=c=blue[b]; [0v2][b]overlay=30:580[v] " -map '[v]' -an "${pref}_\${ifnb}.mp4"