Merge videos ffmpeg

Retour

https://superuser.com/questions/1039678/merge-multiple-video-with-ffmpeg-single-command-line-in-specific-time-without-cu

Use the concat demuxer.

First, create a text file with the filenames.

file '1.mp4'
file '2.mp4'
file '3.mp4'
...
file '13.mp4'
file '14.mp4'
file '15.mp4'

Then, run the concat command.

ffmpeg -f concat -i textfile -c copy -fflags +genpts merged.mp4

For this to work, all videos should have same properties such as codec, resolution, framerate, sample rate, etc.

If they are not, you can encode the concat.

ffmpeg -f concat -i textfile -fflags +genpts merged.mp4