Mencoder is an extremely powerful video converter that is capable of converting video from almost any format to any other format. One of the simplest exercises to do with Mencoder involves joining two videos to make a single video.
To join the videos all you need are the videos and Mencoder installed on your system. You can install Mencoder on your Ubuntu box using the command
sudo apt-get install mencoder
Now lets say you plan to join videos a.mpg and b.mpg to a video c.mpg
Go to the command line (to the folder containing the videos) and execute the command –
mencoder a.mpg b.mpg -ovc copy -oac copy -o c.mpg
Thats it! You can join more videos with a single shot but remember that the order in which you have listed the videos the final video will be created in the same order.