Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu

A lot of camcorders record in the .mov (Quicktime) format. It has high quality video and depending on the underlying codec it provides a good compression, but it is too proprietary and very often you might not be able to play it on different devices.

AVI on the other hand is more widely accepted format. AVI, like MOV, is a media container that envelops encoded media. In this example we will convert Quicktime video (.mov) to .avi that contains media encoded with mpeg-4.

If you want to preserve the original quality and resolution with pcm_u8 (analog 8bit) audio:

ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 outputfile.avi

Obviously I would prefer something better for the sound so I normally use the mp3 as an audio codec. To do this make sure that you have the libmp3lame0 package installed to do that:

sudo apt-get install libmp3lame0

And then:

ffmpeg -i inputfile.mov -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi

If you want to change the resolution then add the -s option and specify the horizontal and vertical resolution. Make sure to preserve the original aspect ratio:

ffmpeg -i inputfile.mov -s 960x540 -sameq -vcodec msmpeg4v2 -acodec libmp3lame outputfile.avi
Monday, December 28th, 2009 Apple, Linux, Ubuntu

4 Comments to Convert Quicktime Movies to AVI encoded with MPEG-4 (MOV to AVI) with Linux/Ubuntu

  1. we like avi encodec

  2. mkpatel on March 23rd, 2011
  3. we face truble to convert 3d convertion

  4. mkpatel on March 23rd, 2011
  5. This is a batch script made in shell to convert all MOV files in a directory:

    #!/bin/bash

    for i in *.MOV;
    do name=`echo $i | cut -d’.’ -f1`;
    echo $name;
    ffmpeg -i $name.MOV -sameq -vcodec msmpeg4v2 -acodec pcm_u8 avi/$name.avi
    done

    Remember to chmod +x to script in order to be able to run it.

  6. tonic on June 10th, 2012
  7. Had to say, it convert files in present directtory to avi subdirectory.

  8. tonic on June 10th, 2012

Leave a comment

*

Search

 

Archive

May 2013
M T W T F S S
« Apr    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Other