Back to index
Download cvtmovie.sea.hqx (93K)
AVI to Quicktime Converter
Version 1.0 -- 20 February 1997
© Copyright 1997 J. David Eisenberg
based on samples from Apple's QuickTime (TM) documentation, (c) by them
Source is C code written under CodeWarrior Gold 10
This program was designed to help me convert some AVI files which the AVI to QT
Utility wouldn't handle. (The utility kept saying, "an unknown format was used to compress
this file.")
This program has been written, compiled, and tested on a PowerPC only, and has not been
compiled or tested on 68K Macintoshes.
Part A
When you start this program, it will give you a "console interface" that lists
all the compressor codecs in your system. Depending on what's installed in your system,
you may get a different list than the sample shown below:
- Animation (rle )
- Cinepak (cvid)
- Component Video (yuv2)
- Graphics (smc )
- Motion JPEG A (mjpa)
- Motion JPEG B (mjpb)
- None (raw )
- Photo - JPEG (jpeg)
- Planar RGB (8BPS)
- Video (rpza)
- AVI MotiVE (msvc)
- Intel Indeo® Video R3.2 (IV32)
- Intel Raw (YVU9)
- Microsoft RLE (WRLE)
- Microsoft Video 1 (msvc)
And ask you which method the file is stored in (which it uses to decompress video images):
Method to use to decompress AVI > 11
It turns out that the AVI MotiVE method worked for the files I was given. You may have
to experiment with a variety of values to get the results you want. Incorrect values
may cause the program to crash. Be sure you have your original files backed up!
The program then asks you which compression method you would like to use for the
resulting output movie. The 'rpza' format is the standard for QuickTime movies, I believe.
Method number to use to compress output [default 'rpza'] > 10
If you use the same method for decompression and compression, then the program will
proceed to part B; when it does the conversion it will do so by quickly copying the
frames over into a QuickTime format movie.
If you use a different method for compression than decompression, then the program will
have to decompress the movie one frame at a time and recompress it to your output format.
You may choose to see a "preview window" of this process in action:
Show preview window [Y/n] > y
And you may choose the compression quality for the output movie:
- Minimum quality
- Low quality
- Normal quality
- High quality
- Lossless compression
Choose compression quality [default 3] > 3
PART B
The program then asks you (via the standard file dialog boxes) for the names of the
input AVI file and the output movie file.
As the process begins, the program gives you some information about the video and
audio tracks it has detected; for example:
160 by 120, 15 frames per Second
8 bits per sample, 11025 samples per second
It also presents a dialog box showing how many frames have been converted.
You may press the Q key to Quit the conversion process.
The output movie--as far as it
has been converted--will be saved to disk.
You are then returned to the "console interface" and may choose Quit from the File menu.
You will be asked if you want to save the output of the console window. (You probably
don't need to.)
DISCLAIMER
This program comes free, with absolutely no guarantees that it can properly
convert your movie. The program does some minimal error checking.
Therefore: make sure you back up your work unless you feel exceptionally brave
(or lucky).
Feel free to change, modify, or add anything to the source code.
Let me know by email if you like it.
FURTHER NOTES:
This program:
- Converts only AVI frames marked as "db" (bitmap), not "dc" (compressed
bitmap)
- Will compress bitmaps found in ANY video track, in the order that they are
stored in the file. If you have more than one video track in your movie,
you may get a really unpleasant-looking result!
- Presumes a single monaural audio track. 8-bit samples are presumed to be raw data,
16-bit samples are converted from LSB first to MSB first and are presumed
to be two's-complement.
- Has a user interface that is as crude as a cave painting.
Download cvtmovie.sea.hqx (93K)
Back to index