Converting video files to AVI

Two Toned Lighting

AVI is a container that allows to save audio and video using different codecs (AC3, MP3, DivX, Xvid, etc). Originally introduced by Microsoft, nowadays is one of the most video container used and distributed. Although is no the only format available, sometimes we need to convert our videos into avi files, for instance for editing or publishing videos than can be playback on any computer.

Then, lest see how to convert videos files…

Installing the tools

We will be working with two very often used Linux’s commands : ffmpeg and mencoder. In order to install them, just type in a terminal the following:

aptitude install ffmpeg mencoder

ffmepg conversion

This is an example for converting an ogv file to avi using ffmpeg:

ffmpeg -i NesterJ.ogv -vcodec mpeg4 -sameq -acodec libmp3lame NesterJ-ffmpeg.avi

Here we are telling to ffmpeg to convert the NesterJ.ogv file using the mpeg4 video codec, with the same video quality than source (-seq option), with  the libmp3lame audio codec (mp3), into a file called NesterJ-ffmpeg.avi which is a AVI container.

mencoder conversion

The above example can be performed using mencoder as follow:

mencoder NesterJ.ogv -ovc lavc -oac mp3lame -o NesterJ-mencoder.avi

Mencoder will convert the NesterJ.ogv file using lavc video codec (mpeg4), mp3lame audio codec (mp3) into the file NesterJ-mencoder.avi.



  1. #1 by Luis Gallardo on 18/05/2010 - 11:43 am

    @Ursinha You are welcome :)

  2. #2 by Ursinha on 18/05/2010 - 11:24 am

    Thanks! One-liner savers :)

Comments are closed.