Joining AVI Files In Linux

I happened to grab a video that was split into two AVI files. This isn't a particularly convenient way to watch video. Naturally I wanted to join them, and I naturally use Linux.

The procedure is as follows:
  1. Install mencoder
    1. If using Ubuntu Linux, open a Terminal window and enter the following command:

      sudo apt-get install mencoder

    2. If using Red Hat, open a Terminal window and enter the following command:

      yum install mencoder

  2. Once installed, enter the following command (on a single line):

    mencoder mencoder -oac copy -ovc copy -noodml -o ./joined.avi path-to/file1.avi path-to/file2.avi

    where:

     -oac  copy transfer mode for audio
     -ovc  copy transfer mode for video
     -noodml  don’t write OpenDML index
     -o ./joined.avi  output file
     path-to/file1.avi path-to/file2.avi  files you want to join in that order