[英]How to blur side of horizontal video with ffmpeg
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
So I have this: 1 And I would like to have this: 2所以我有这个: 1我想有这个: 2
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最后,我明白了:我有什么
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.