Using FFmpeg concatenate multiple videos

ApplicationLinux & Mac

Some cameras split a sigle video into multiple files during recoding due to the limitation of the maximum file size in the file system(E.g. maximum single file size for FAT32 is 4GB). In this post, we will take advantage of FFmpeg to merge back our video fragments into a continuous single video.

 

To begin with, we put all our video fragments into the same folder and create a new file called clips.txt. Next, we add the filenames of the video fragments into clips.txt in the order we want to concatenate and seperate them by new lines.

An example of clips.txt.

file 'first.mp4'
file 'second.mp4'
...

Last, running the following command will generate the concatenated video named output.mp4 for us:)

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

One Comment

  1. Thanks for ones marvelous posting! I actually enjoyed reading it, you may be a great author.I will ensure
    that I bookmark your blog and will eventually come back sometime soon. I want to encourage you to definitely continue your great posts,
    have a nice morning!

Leave a Reply

Your email address will not be published. Required fields are marked *