Join two .avi Videos with Mencoder/Mplayer

A lot of videos available from various sources are often encoded as .avi files close to 700MB in order to fit on a singleCD-R. This works out just great, but sometimes vids are split into two 700MB .avi files to fit two CDs so you get a Coolest-Movie-EVER_-_[2010][xVid](mp3)_dUff-mAn_CD1.avi and another but with “CD2” instead.

Well I tend to just let these vids chill on my hard drive where space isn’t an issue, so I’d rather just have one 1.4GB vid file instead. In order to cleanly join two halves of a .avi together I use MEncoder in the following command:

mencoder -oac copy -ovc copy -idx -o Final_Big_Output_File.avi First_Half_Video_File.avi Other_Half_Video_File.avi

So, Final_Big_Output_File.avi = the big output file to be created,

First_Half_Video_File.avi = the path to the first half of the video,

and Other_Half_Video_File.avi = the path to the file with the second half.

Note: This method assumes that both halves have the same codec, resolution, etc.

MEncoder is usually packaged with its close friend MPlayer which is available on pretty much any platform. I’ve successfully tested this command on Arch Linux with MEncoder 1.0rc2-4.3.1 and Windows XP with MEncoder 1.0rc2-4.2.1 (just grabbed a binary from MPLayerHQ) – besides, this is a popular method.

I know there are other ways to combine two .avi s but this was the cleanest and most reliable for me, if you have any others worth looking into please leave a comment.

Leave a Reply

Your email address will not be published. Required fields are marked *