How to combine videos with FFmpeg

#ffmpeg #cli

  1. Create a text file with the list of videos you want to combine. For example, create a file named videos.txt with the following content:
file 'video1.mp4'
file 'video2.mp4'
  1. Run the following FFmpeg command to combine the videos:
ffmpeg -f concat -safe 0 -i videos.txt -c:v copy -c:a copy output.mp4

Now you have a new video file named output.mp4 that contains the combined videos.