I would like to find a way to blur the top and the bottom of an horizontal video with the same video.
At the moment I have the code to do the opposite:
ffmpeg -i test.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" outpt.mp4
I found this, but the video is not center and I think it's not the good resolution because the video on the side is bigger than the other video.
ffmpeg -i test.mp4 -lavfi "[0:v]scale=1080*2:1920*2,boxblur=luma_radius=min(h\,w)/20:luma_power=1:chroma_radius=min(cw\,ch)/20:chroma_power=1[bg];[0:v]scale=1080:-1[ov];[bg][ov]overlay=0:(H-h)/2,crop=w=1080:h=1920,pad=1080:1920:(ow-iw)/2:(oh-ih)/2:black" -s 1080x1920 outpt.mp4
Finally, I get that: what I have
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.