HowTo.Gumph.Org

Step by step solutions to IT problems

Join Movie Clips together

If you've ever needed to join film clips (avi,wma,mpg,divx,xvid) without having to install an expensive editing program, then mencoder may just do what you want. It's a free media encoder, part of the free media player mplayer, and best of all it makes joining film clips together a breeze.

One of the great features of mencoder is that as long as the clips are encoded the same, then it can join them very quickly without having to re-encode all the files. This means you won't loose any quality with the joined copy, nor will you have to learn what complex encoder settings to use.

Getting Mencoder

You need to go to the mplayer site and download the latest version. Assuming your using windows, the first thing you'll notice, is that there is no installer for mplayer, just a zip file, which you extract to any folder you like. Thats right, installing mplayer is just a case of extracting the files, and uninstalling mplayer is as simple as deleting the folder you extracted it to.

If you only want to use it temporarily to join some files, then you might as well extract the files to your temp folder.

Because we are just going to be joining clips together without re-encoding them, you don't need to bother downloading any codecs as you won't need them.

Joining the video clips together

Mencoder doesn't have a fancy gui for you to get used to, but is a command line application, meaning we just type the commands in on a command line.

Firstly copy the video clips you want to join, into the mplayer folder, next open a command prompt, and cd into the temp\mplayer folder.

 cd c:\temp\mplayer

To join the files "1.avi" and "2.avi" into the joined file "joined.avi" simply type in the following command

mencoder -oac copy -ovc copy -o "joined.avi" "1.avi" "2.avi"

In the above command -oac copy means "copy the audio stream", -ovc copy means "copy the video stream", and -o "joined.avi" means "output to file joined.avi".

If you want to join more than two clips, then just list as many clips as you want, in the order you want them joined. Remember that the clips need to all be encoded exactly the same, else it won't work.

If your joined clip is going to be larger that 1024Mb ( 1 gigabyte ) then when you come to play back the joined clips, some media players get confused as to how long the clip lasts, so add -noodml to the command line, eg.

mencoder -oac copy -ovc copy -noodml -o "joined.avi" "1.avi" "2.avi"

Also note that most movie players cannot play videos that are larger than 2GB (2048MB) in size, irrespective of whether they are .avi, .mpg or .vob.

It's that simple, and when you are finished you can just delete the mplayer folder, and the application is removed - just remember to move video clips out of the folder first !

Submit to     del.icio.us    digg    reddit    simpy