ffmpeg裁剪视频

发布时间 2023-09-14 19:17:21作者: rivanwang

ffmpeg 命令格式:
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

crop的参数格式为 w:h:x:y  (注意,宽:高 写在前面)
w:h 为输出视频的宽和高,
x:y 标记输入视频中的某点,将该点作为基准点,向右下进行裁剪得到输出视频。
如果x y不写的话,默认居中剪切

示例:
ffmpeg.exe  -i video_2023-09-14_08-19-54.mp4 -vf crop=960:540:0:384 cut-230914-081954.mp4

(-vf 参数 要写在 输出文件名 的前面)