FFmpeg: How to convert vertical video with black sides, to video 16:9, with blurred background sides
How to make this by using FFmpeg?
Example without FFmpeg:
Adobe After Effects
Sony Vegas Pro
I solved!
ffmpeg -i input.mp4 -lavfi '[0:v]scale=ih*16/9:-1,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[bg][0:v]overlay=(W-w)/2:(H-h)/2,crop=h=iw*9/16' -vb 800K output.webm
Input: https://www.youtube.com/watch?v=17uHCHfgs60
Output: http://www.youtube.com/watch?v=CgZsDLfzrTs
I made a universal solution for any type of videos. Suitable for vertical and horizontal videos. It's resizing video to 1080p (you can use it and for 720p) and fills all empty space with blurred video of this.
ffmpeg -i input.mp4 -lavfi "[0:v]scale=1920*2:1080*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=-1:1080[ov];[bg][ov]overlay=(W-w)/2:(H-h)/2,crop=w=1920:h=1080" output.mp4
Result 1:
Result2: