GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Video Concatenate or Join |
20200924 Two mp4 video files can be joined
using ffmpeg with the concat filter. This filter
expects the argument to -i
to name a text file which will
list the files to be concatenated, like concat.txt
file 'input1.mp4' file 'input2.mp4' |
$ ffmpeg -f concat -safe 0 -i concat.txt -c copy joined.mp4 |
Other options include using mencoder.
$ mencoder -ovc copy -oac copy video1.avi video2.avi -o video.avi |
To join multiple avi files into one big avi file we can utilise avimerge:
$ avimerge -i a1.avi a2.avi a3.avi -o a.avi |
I have found this latter approach to get the audio of the second file out of sync!