3 Ways to Join/Merge .AVI video files in Linux:

3 Ways to Join/Merge .AVI video files in Linux:

1.) avimerge

Issue the avimerge command as such:

$ avimerge -i b1.avi b2.avi b3.avi b4.avi b5.avi b6.avi b7.avi -o output.avi

2.) mencoder

Issue the mencoder command as such:

$ mencoder -oac copy -ovc copy file1.avi file2.avi file3.avi -o output.avi

3.) cat & mencoder

Issue the cat command to string together or concatenate the binary .avi files:

$ cat foo1.avi foo2.avi foo3.avi > output.avi

(this will string all binary .avi files first but the sync of audio and video might likely be broken, so follow the next instructions below to fix it.)

after issuing the cat command and getting the final file output from it, issue the following meconder command from the mplayer package:

$ mencoder -forceidx -oac copy -ovc copy input.avi -o output.avi

- Where input is the source file and output the outcome file.
- the $ sign at the start of the command is to signify the terminal's prompt, no need to type this in.
- The order you set the files to be joined or merged from left to right will be the sequence it will playback as one video file.
- Though for me avimerge is my preferred tool for this task.
- If the header file is broken in the final .avi use the avifix command part of the transcode package, as such:

$ avifix -i input.avi


$ avifix -i input.avi -f 30,1

(this changes the header of the file input.avi and sets the frame rate to 30 fps.)


Post a Comment