Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 339

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 392

Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /www/wwwroot/blog_qqvbc_com/usr/plugins/Access/Access_Core.php on line 394
ffmpeg按比例剪裁视频 - Joyber 的博客

按宽高比3:4剪裁,居中,保留宽100%,高自适应进行剪裁

#! /bin/bash

ffmpeg -i "$1" -vf crop=iw:iw*4/3 "$2"

按宽高比3:4剪裁,居中,保留高100%,宽自适应进行剪裁

#! /bin/bash

ffmpeg -i "$1" -vf crop=ih*3/4:ih "$2"

说明:
ih:表示原视频高度
iw:表示原视频宽度

iw:iw*4/3 后面还可以跟x,y坐标表示从左上角坐标开始,比如人0,0坐标处开始:

ffmpeg -i "$1" -vf crop=iw:iw*4/3:0:0 "$2"

标签: none

添加新评论