How to Convert AVI to MP4 in Linux using Command Line

Jan 1st, 2011

iPhone Video

If you want to play your AVI videos in your iPhone, iPod Touch or iPad, you must convert them to MP4 or H.264 format.

The following instruction is to let you convert your AVI video files to MP4 files.

1. You must have MPlayer and Mencoder. For more information about MPlayer and Mencoder, please refer Wikipedia at:

MPlayer: http://en.wikipedia.org/wiki/MPlayer
Mencoder: http://en.wikipedia.org/wiki/Mencoder

In Ubuntu, you can use install them as following command:

sudo apt-get install mplayer mencoder

2. If your AVI file is baby.avi and you want to create a MP4 called baby.mp4, you can type following command:

mencoder baby.avi -o baby.mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg

3. You can test the new MP4 file you just created using the MPlayer as below:

mplayer baby.mp4
Be Sociable, Share!
  1. Digisport live
    Mar 20th, 2011 at 10:02
    Reply | Quote | #1

    I don’t get it…Why everybody is so excited about Ipad? Why ipad is better that a notebook?. The laptops are more much more cheapper and they have a lot of extra features. On the Ipad is just shinky. Guys don’t buy it just because they are a trend ask yourself if is useful and is the right price. But in this period is all about marketing.

  2. JNarwhal
    Sep 8th, 2012 at 21:28
    Reply | Quote | #2

    Thank you! Worked like a charm.