joining or merging two videos

Source: http://ubuntuforums.org/showthread.php?t=1048316

You will need to convert one of the clips to the format of the other.
Joining can than be done in terminal :

Code:
cat file1.mpg fileconverted.mpg > file.mpg

You can do this also with Avidemux in 2 steps. First step is opening the mp4 clip and convert it to dvd (use the DVD entry under the tab "auto"). Do the same with the mpg video (might be not necessary but it doesn't harm). Then open a new avidemux session. Open the first clip you want. Then append the second (see Append under the "file" tab) and save the result again as DVD.



Also
http://www.learnosity.com/techblog/index.cfm/2008/1/12/Joining-video-files-in-Ubuntu


Ensure you have mplayer & mencoder installed

sudo apt-get install mencoder mplayer

Merge the files together

cat video1.avi video2.avi video3.avi > merged.avi

Reindex the audio and video

mencoder -forceidx -oac copy -ovc copy merged.avi -o merged_final.avi
All done - if you want to convert it to a DVD check out HOWTO Create DVD's from AVI's on Ubuntu.
at video[0-9].avi > merged.avi

is better and faster

if you are more ten video you can try :
cat video[0-9][0-9].avi > merged.avi

thanks for the Reindex the audio and video tips

Misterniark

I'm not even sure if you need to use cat at all....

mencoder -forceidx -oac copy -ovc copy video01.avi video02.avi video03.avi -o merged_final.avi

should work....