Friday, September 26, 2008

Join avi files in linux

The easy way is to use avimerge. Still I include both methods.

Method 1 :

source :

Merge, join two or more avi files

For all this to work you need the transcode package. So install (or make sure that it is there)

yum install transcode


1. Open up a terminal
2. Go to the directory where the files are (this is just to make things simpler)
3. Assuming that the file you want the result to be is named foo.avi, and you have two smaller files you want to merge (in order) named foo1.avi and foo2.avi, enter the following command:

avimerge -o foo.avi -i foo1.avi foo2.avi

Method 2 :

source :

How to join multiple .avi or .mpg files

sudo apt-get install mencoder mplayer

Now that the hard part is out of the way, we’re going to make use of the wonderful cat command. I’d renamed each Bloodspell video as b1.avi - b7.avi. Now to string them all end to end.

cat b1.avi b2.avi b3.avi b4.avi b5.avi b6.avi b7.avi > bloodspell.avi

Now we’re 2/3 of the way there! Stringing together .avi files can cause a breakdown in the sync between video and sound. So, we’ll use mencoder to sort things out.

mencoder -forceidx -oac copy -ovc copy bloodspell.avi.avi -o bloodspell_final.avi

No comments:

Print chess board in command line

The following bash one-liner will print a chess board in a terminal (the script works for the shells bash and ksh only) for (( i = 1; i ...