因此,我使用ffmpeg将视频转换为1920 * 1080像素,我发现了两种方法,第一种是将视频拉伸至1920 * 1080,但是看起来有点拉伸。我为此使用了以下命令:
So I'm using ffmpeg to convert a video to 1920*1080 px, I found two ways to do so, the first one would be to stretch the video to 1920*1080, but then it looks kinda stretched. I used this command for this:
./ffmpeg_darwin -i SRC -vf scale=1920:1080,setdar=16:9 DEST另一个选项与没有setdar的选项相同,但这只是将分辨率调整为从(1728 * 1080)。
The other option is the same without setdar but this just adapts the resolution to the one it started from (1728*1080).
我想用黑色边框填充宽度的192个像素。有某种选择吗?还是有另一个命令行可以实现这一目标?
I would like to fill the 192 pixels of the width with a black border. Is there some kind of option to do so? Or is there maybe another command line that could achieve this?
感谢您的帮助:)
推荐答案使用
-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,setsar=1"缩放比例将确保其输出适合1920x1080。然后,便笺簿将其填满。
The scale will ensure that its output fits within 1920x1080. The pad then fills that out.
更多推荐
如何在视频中添加黑色边框
发布评论