故事的背景是這樣的:
我錄制了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
文件就生成了!