How to Convert AVI to MP4 in Linux

by Kristen Waters

The Mplayer program includes a utility for converting multimedia from one format to another called MEncoder. The MEncoder utility can be used to convert AVI video files to the MP4 format from the command line. The resulting video can be played on Apple iPods and other handheld devices. The MP4 format is based on the Apple Quicktime container format. MP4 can contain audio only, or audio and video together. However, the standard is to use MP4 to refer to video files and M4A to refer to audio only files.

Step 1

Download and install MPlayer through your distribution's software repository, or from the MPlayer website.

Step 2

Open a terminal window.

Step 3

Type the command "mencoder input.avi -o output.mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg" to convert the AVI video to MP4.

Step 4

Type the command "mplayer output.mp4" to test the video.

Type the command "exit" to close the terminal session.

Items you will need

  • MPlayer, MEncoder

Video of the Day

Brought to you by Techwalla
Brought to you by Techwalla

More Articles