Create Blurred Sidebars in FFmpeg

This article demonstrates how to convert a vertical (portrait) video into a horizontal (landscape) format with blurred sidebars using a single FFmpeg command. By combining the split, scale, gblur, pad, and overlay filters, you can create a professional-looking background that mirrors and blurs the main video to fill the empty side spaces.

The FFmpeg Command

To apply this effect, run the following command in your terminal. This example converts a vertical input video into a standard 1080p (1920x1080) landscape video with blurred sidebars:

ffmpeg -i input.mp4 -filter_complex "[0:v]split=2[bg_raw][fg_raw];[bg_raw]scale=1920:1080,gblur=sigma=20[bg];[fg_raw]scale=-1:1080,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:color=none[fg];[bg][fg]overlay=0:0" -c:a copy output.mp4

How the Filters Work Together

The filtergraph processes the video stream through a pipeline using five distinct filters: