FFMPEG音频视频开发: 命令行完成视频剪切与合成

一、环境介绍

操作系统介绍:win10 64位

FFMPEG版本: 4.4.2

QT版本: 5.12.6

二、操作命令

2.1 合成视频命令

ffmpeg.exe -f concat -i filelist.txt -c copy output.mp4


filelist.txt :存放合成视频的列表
列表格式例如:
file '1_123.mp4'
file '2_123.mp4'
file '3_123.mp4'
file '4_123.mp4'
file '5_123.mp4'
file '6_123.mp4'
file '7_123.mp4'
file '8_123.mp4'
file '9_123.mp4'
file '10_123.mp4'
file '11_123.mp4'
file '12_123.mp4'
file '13_123.mp4'

output.mp4: 合成之后输出的视频名称

2.2 剪切视频

视频剪切命令:
  ffmpeg.exe -ss 10 -t 15 -accurate_seek -i love.flv -codec copy -avoid_negative_ts 1 cut.flv

参数解释: 
  ffmpeg.exe -ss <起始时间-秒> -t <向后截取-秒> -accurate_seek -i <输入视频文件名称> -codec copy -avoid_negative_ts 1 <输出视频文件名称>

猜你喜欢

转载自blog.csdn.net/xiaolong1126626497/article/details/111542583