FFmpeg Blurred Background Sidebars Using gblur

This article demonstrates how to use the FFmpeg gblur (Gaussian blur) filter to create professional-looking blurred background sidebars for vertical videos played on widescreen displays. By splitting a single video input into two streams, you can scale and blur one stream to serve as the background canvas while overlaying the original video, scaled to fit, directly in the center.

To achieve this effect, you will use FFmpeg’s complex filtergraph (-filter_complex). Below is the standard command to convert a vertical video (9:16) into a widescreen horizontal video (16:9, 1920x1080) with blurred sidebars:

ffmpeg -i input.mp4 -filter_complex \
"[0:v]split=2[bg][fg]; \
 [bg]scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080,gblur=sigma=30:steps=3[bg_blurred]; \
 [fg]scale=-1:1080[fg_scaled]; \
 [bg_blurred][fg_scaled]overlay=(W-w)/2:(H-h)/2" \
-c:a copy output.mp4

How the Filtergraph Works

Customizing the Blur Intensity

You can adjust the aesthetic of the background sidebars by modifying the parameters of the gblur filter: * sigma: Increase this value (e.g., sigma=50) for a more abstract, heavily blurred background, or decrease it (e.g., sigma=15) to keep background shapes recognizable. * steps: Increase this value to 3 or 4 to eliminate banding artifacts and produce a smoother blur. Note that higher step values require more processing power.