Skip to content

Instantly share code, notes, and snippets.

@sergiks
Created April 22, 2020 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sergiks/f2e31a85acd276d0975cb901000d4bd3 to your computer and use it in GitHub Desktop.
Save sergiks/f2e31a85acd276d0975cb901000d4bd3 to your computer and use it in GitHub Desktop.
ffmpeg filter for blurred background

Source: "FFmpeg: convert any video to square 1:1 video with blurred side bars"

"[0:v]split=2[blur][vid];[blur]scale=L:L:force_original_aspect_ratio=increase,crop=L:L,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[vid]scale=L:L:force_original_aspect_ratio=decrease[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment