zifeiy

故事的背景是这样的:
我录制了16个视频,名称分别为1.mp4、2.mp4、……\16.mp4。
然而当我想合并视频的时候,下载了一大堆网上的能够合并视频的软件,结果不是不好用就是要收费……
然后我就去下载了ffmpeg。
ffmpeg下载地址:https://ffmpeg.zeranoe.com/builds/
并且将解压后的文件的bin目录的位置加入到了环境变量PATH中。

然后在视频文件所在目录下新建一个文件filelist.txt,内容如下:

file \'1.mp4\'
file \'2.mp4\'
file \'3.mp4\'
file \'4.mp4\'
file \'5.mp4\'
file \'6.mp4\'
file \'7.mp4\'
file \'8.mp4\'
file \'9.mp4\'
file \'10.mp4\'
file \'11.mp4\'
file \'12.mp4\'
file \'13.mp4\'
file \'14.mp4\'
file \'15.mp4\'
file \'16.mp4\'

在命令行执行如下命令:

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

然后,一个合并好的 output.mp4 文件就生成了!

参考链接:https://www.jianshu.com/p/cf1e61eb6fc8

分类:

技术点:

相关文章: