本文介绍了扩展并缩放人像视频,使长宽比保持不变,黑色边框成为视频的模糊版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个720 x 1280像素的视频.我如何将其扩展和缩放到1920 x 1080,以保持宽高比并且黑色边框是视频的模糊版本,所以您并没有真正注意到它只是一个小的垂直条纹.
I have a 720 x 1280 pixels video. How do I extend and scale it to 1920 x 1080 such that the aspect ratio is being kept and the black borders are a blurry version of the video, so you don't really notice that it's just a small vertical stripe.
示例
我从
ffmpeg -i video720x1280.mp4 -vf "scale=608:1080,pad=width=1920:height=1080:x=656:y=0:color=black" video1920x1080.mp4
推荐答案
使用
ffmpeg -i video720x1280.mp4
-filter_complex
"[0]scale=hd1080,setsar=1,boxblur=20:20[b];
[0]scale=-1:1080[v];[b][v]overlay=(W-w)/2" video1920x1080.mp4
调整boxblur滤镜中的两个值以获得模糊强度.更高=更模糊.
Adjust the two values in the boxblur filter for blur strength. Higher = more blurring.
这篇关于扩展并缩放人像视频,使长宽比保持不变,黑色边框成为视频的模糊版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!