Video format : converting MOV to MPEG ??
lgrover at zoominternet.net
Thu Nov 24 17:39:07 UTC 2005
Vincent Trouilliez wrote:
> I just took about 10 little video clips with my digital camera, they are
> very crap quality of course, (blurry picture, and only 320x240, and only
> 15fps IIRC, and can last only 35 seconds each, maximum), yet they take
> lots of space, about 8MB each, way too big (75MB in all) to share them
> with my friends via e-mail or even upload them, as although I have
> broadband downstream, upstream is only 128kbps... and I am not very
> I reckon these clips, if properly compressed in MPEG, could drop the
> size down to well under 10MB for sure, which is a lot more manageable,
> without deterioring the quality the slightest bit (seeing as it's quite
> low to start with).
> I search in the Application Installer for a general purpose video
> editing program, thinking I could just import the videos and save them
> as MPEG, but I can't see anything suitable.
> IIRC, there are command line tools to handle audio/video
> encoding/decoding, but unless someone who knows his onions with these
> tools can take my hand, I have zero chance of succeeding I think...
> Can't we just have "Adobe Premiere" for Linux, or something ?! ;-)
I'm not an expert, so beware, my explanations (below) may well be
"MOV" does not describe a single video format. MOV is a container
format, which can hold audio and video information, and sometimes
other data as well. The audio and video information inside a
container (like MOV, AVI) can be compressed in a number of different
ways -- using a number of different codecs (compression/decompression
algorithms). So the the video in the MOV files you get from your
camera might already be stored using one of the mpeg codecs!
For example, my wife's digital camera can capture video. The video
files from her camera are MOV's, but the video is encoded using the
H263+ codec, at least, that's what mplayer says when I play the videos:
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh263] vfm:ffmpeg (FFmpeg H263+ decoder)
Now, you may be able to transcode your videos so that they are
smaller, depending on the audio and video codecs in the original file.
I transcoded one of my wife's videos using mencoder (the transcoder
mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 \
-of avi 100_5314.mov -o 100_5314.mpeg4.avi
Explanation of command line options:
encode to MPEG-1 layer 3 audio (aka, mp3) using lame
encode using libavcodec
encode using MPEG-4 (DivX 4/5)
use AVI container format
output file name
and here's a comparision of the resulting file size with original file
grover at sleek:~/tmp$ ls -l 100_5314.*
-rw-r--r-- 1 grover grover 7248407 Oct 31 2003 100_5314.mov
-rw-r--r-- 1 grover grover 3300420 Nov 24 12:14 100_5314.mpeg4.avi
The transcoded file is less than 50% of the original file size.
Transcoding video is not simple. There are several container formats,
many choices for audio and video compression (codecs), and many
options for each codec. If you're going to do this in linux, you
really need to do some reading. Pick the program you are going to use
(I recommend mencoder or transcode) and become familiar with its
manpage. For general information in audio and video formats and
codecs, it's hard to beat wikipedia. Here are a few links which
should get you started:
More information about the ubuntu-users