Linux 使用 ffmpeg 將 影片 合併

想要將多個影片檔案(mp4)做合併,要怎麼做?

  1. vim merge_video.txt # 多個影片要合成,檔案名稱再自己增加,檔案內容如下:
    file '/path/to/file1.mp4'
    file '/path/to/file2.mp4'
    file '/path/to/file3.mp4'
  2. ffmpeg -f concat -safe 0 -i merge_video.txt -c copy output.mp4