Posted on One min read

For a project, I had to join videos. Is there a tool that can help me? Yes. ffmpeg.

How to join videos with ffmpeg?

ffmpeg has a concat command you can use. There are 2 modes demux and concat. demux is newer and better while concat is older and is support in older ffmpeg versions.

ffmpeg concatenate

For joining same codec and similar dimensions

Step 1: Create list of videos you want to join in a txt file.

file 'meow.mp4'
file 'woof.mp4'
file 'pewpew.mp4'

Step 2: Execute the following command

ffmpeg -f concat -safe 0 -i vidlist.txt -c copy output.mp4

Step 3: Enjoy the longer video.

Further exploration

[](http://stackoverflow.com/questions/18141055/ffmpeg-commands-to-concatenate-different-type-and-resolution-videos-into-1-video)

[](http://stackoverflow.com/questions/13754802/how-to-use-ffmpeg-to-concatenate-two-videos-of-different-aspect-ratios)