Convert WMV into AVI with Ubuntu

linuxscrew large logo

Actually this tip is applicable to any Linux distribution mencoder can be run at (like Ubuntu, Debian, Fedora, Suse and even Slackware 🙂 )

MEncoder is a free command line video decoding, encoding and filtering tool released under the GNU General Public License. It is a close sibling to MPlayer and can convert all the formats that MPlayer understands into a variety of compressed and uncompressed formats using different codecs

Here is the fastest way to perform wmv to avi conversion:

  1. Ubuntu:
  2. sudo apt-get install mencoder
    mencoder infile.wmv -ofps 23.976 -ovc lavc -oac copy -o outfile.avi

  3. Fedora:
  4. sudo yum install mencoder
    mencoder infile.wmv -ofps 23.976 -ovc lavc -oac copy -o outfile.avi

Information improvisation: Sign up with http:///70-461.htm for getting incredible online exam and . We also provide best and Best Wishes.


Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

21 thoughts on “Convert WMV into AVI with Ubuntu”

  1. hi! I’m new on Fedora and I don’t know what “infile” is, say if my file is on desktop what do I write for infile and outfile (location) in mencoder infile.wmv -ofps 23.976 -ovc lavc -oac copy -o outfile.avi?
    a reply please

    Thank you very much



  2. Thanx for these commands. If someone want to convert to .avi (XVid) then instead of this command you can use this one

    mencoder -ovc xvid -oac mp3lame -srate 44100 -af lavcresample=44100 -xvidencopts fixed_quant=4 Outfile.avi -o Newfile.avi

  3. Fred, your desktop is located at /home/USERNAME/Desktop, so modify the command to match:
    mencoder /home/USERNAME/Desktop/infile.wmv -ofps 23.976 -ovc lavc -oac copy -o /home/USERNAME/Desktop/outfile.avi

    Using mencoder, you can convert practically any format to any other. While you’re on the command line, you might try:
    man mencoder

    THis will show input/output, frame rate, screen ratio and tons of other options.

  4. Hey there,

    thanks for your awesome program. Works like a charm! One thing: is it possible to make the imagequality better. I just converted a wmv to an avi, but the quality is pretty bad. Any way to improve this?


  5. How do I open MEncoder after installing it? I’ve searched around my system files and not found it, nor is it showing up under my programs through the start menu. I’m using the newest version of Ubuntu, and to be honest it confuses me alot… Computers aren’t really my thing, so if you could simply explain this to me I would be very grateful. Alternately, I tried running the command to run MEncoder to convert my video, and nothing happened. I’m fairly certain I had my location/file names input correctly, so I’m lost as to where I need to go or what I need to do from here…

  6. This is a nasty command that will search your system for the wmv’s and make an avi copy of it in that same directory.
    # find / -type f -name “*.wmv” -exec mencoder {} -ofps 23.976 -ovc lavc -oac copy -o {}.avi \;

  7. .ogv TO .avi

    mencoder input.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi

    .flv TO .avi

    mencoder input.flv -o output.avi -oac mp3lame -lameopts cbr:br=64 -srate 22050 -ovc xvid -xvidencopts fixed_quant=6

    .mpeg TO .avi

    mencoder input.mpg -ovc xvid -oac mp3lame -xvidencopts bitrate=800 -o output.avi

    .mp4 TO .avi

    mencoder -oac copy -ovc copy input.mp4 -o output.avi

    .wmv TO .avi

    mencoder input.wmv -ofps 23.976 -ovc lavc -oac copy -o output.avi

    Enjoy porn! 🙂

  8. I’m having a problem with the command on a Centos system:

    ffmpeg -i 20100706_0900_Time_Will_Tell.mpg -f avi -vcodec xvid -acodec mp3 -ar 22050 /tmp/20100706_0900_Time_Will_Tell.avi

    This gives me the following error:
    Unknown encoder ‘xvid’

    ffmpeg -version gives:

    FFmpeg version SVN-r22794-snapshot, Copyright (c) 2000-2010 the FFmpeg developers
    built on Apr 5 2010 13:50:59 with gcc 4.1.2 20080704 (Red Hat 4.1.2-48)

    Am I missing something ?

  9. I used this command to batch convert a bunch of .WMV’s to xvid.

    find ~/VIDEOS type -f -name “*.WMV” -exec mencoder {} -ovc xvid -oac mp3lame -srate 44100 -af lavcresample=44100 -xvidencopts fixed_quant=4 copy -o {}.avi \;

    Just substitute ~/VIDEOS for whatever dir you want to search.

  10. You can do it this way too:
    find /DirectoryWhereFilesAreLocated type -name “*.wmv” -exec ffmpeg -i {} {}.avi \;

Leave a Reply

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