Shining Light Productions - BMP2AVI Documentation

Introduction
BMP2AVI is the fun animation creation utility. Make photo albums, slide shows, claymation, and other animations quickly and easily from a series of still images. Users of BMP2AVI love "Squish," an entertaining set of still images ready for BMP2AVI that shows off what can be done in two hours or less.

AVI2BMP, the reverse of BMP2AVI is included in the package to extract or rip all of the frames and/or audio from an AVI animation. A limited command-line version of BMP2AVI is also available as part of the package for batch processing.

The complete BMP2AVI package is flexible, easy to use, and free to try for thirty days. To purchase a software key, use the purchasing wizard or visit Shining Light Productions' website.
© 2000-2003 Shining Light Productions


Changes
Version 2.0:
Revamped the whole application and gave it a _HUGE_ face-lift. It now has a standard Wizard look-and-feel. Utilizes a variety of new options including the ability to add audio to AVIs as well as dither and set quality options when reducing the number of available colors. Also created AVI2BMP (the reverse of BMP2AVI) and added it to the package.

Version 1.4:
Added support for compression profiles. Compression profiles allow compression options to be specified the first time using the dialog and then never have to be specified again. This allows for automated batch processing as well as increasing productivity!

Version 1.31:
Fixes a really dumb error when the AVI file does not exist. If the AVI did not exist in v1.3, an error message of "Error creating 'output.avi' as an AVI file." when the AVI file that did not exist was attempted to be deleted.

Version 1.3:
Now deletes the old AVI before selecting a compressor. The older versions left the AVI alone, which left spurious data if overwritten with a smaller AVI.
Now reads 1, 4, 8, 16 (5-5-5 and 5-6-5), 24, and 32-bit BMP files. Still no RLE decoding support.
Supports writing of 1, 4, 8, 16, and 24-bit AVIs! A new command-line option has been added to support this. All 16, 24, and 32-bit images are optimally color quantized across the entire AVI when an index-color AVI is created (1, 4, or 8 bit). No dithering is performed to avoid aliasing artifacts.

Version 1.2:
Now reads most BMP files. Handles 1, 4, 8, 24, and 32-bit BMP files. It still can't read RLE-encoded files or 16-bit BMPs, but both are fairly rare to come by these days. BMP2AVI still requires all images to be the same size, but the images can now be any color depth that BMP2AVI supports!
BMP2AVI now has full-fledged application status and the AVI routines are included in LibLink.

Version 1.1:
Smaller file size (10K reduction)...reduced bloat! (Due to compiler issues)

Version 1.0:
Original version


BMP to AVI
BMP2AVI's GUI interface is fairly clean and understandable. This section of the guide is to help those who don't understand terminology such as "Bit depth" get a better feel for what things are.

As always, if something still does not make sense, just try the feature out to get a basic feel for it and that experience will enable you to ask intelligent questions when e-mailing Shining Light Productions for help.


Conversion Options
After the initial introduction/welcome dialog, the next dialog that shows up is the Conversion Options dialog. In this dialog, the starting animation frame, the output AVI, and an optional audio file (WAV) are selected.

The first field in the dialog is where the location of the first frame of the animation is entered. A frame, in BMP2AVI's understanding, is a single Windows bitmap file (BMP). These types of files are easily created with tools like MS Paint, PhotoShop, POV-Ray, and numerous other utilities. The first frame of the animation, therefore, is the first BMP file. BMP2AVI has naming restrictions on the way the BMP file is named. A proper file name consists of a base name (e.g. Squish) followed by a number (01) and the extension (.bmp). An example of a proper file is therefore "Squish01.bmp", which is the first frame of the animation called "Squish" that came with this BMP2AVI package.

The second field in the dialog is where the output AVI filename is selected as well as a few broad options that govern AVI files. Clicking the "Browse..." button opens a dialog that allows for the selection of the output AVI. It is recommended that a name similar to the base name is chosen (e.g. Squish.avi). The next field is where the number of frames per second is chosen. Frames per second, or "fps", is a value that typically has to be tweaked and there is no general rule of thumb per se. However, 24 frames per second (fps) is required for the human eye to perceive a "smooth animation" and 30 fps is recommended to allow for the AVI to skip a few frames without the eye noticing. For the example "Squish" that comes with the BMP2AVI package, a fps of 10 is recommended.

Finally, the bit depth option has to be selected. Bit depth tells how many bits are needed to determine the color of a single color. If the animation is to use a codec (codec = a compressor that makes animations smaller), leave the bit depth at 24 bits. However, it is necessary to experiment to figure out which codec is the best tradeoff of quality versus file size. Shining Light Productions uses smart dithering and/or color reduction technology for 1, 4, or 8-bit images...it may be worthwhile to see if using lower bit depths produces smaller files.

The final field on this dialog offers the option to interleave an audio, or WAV, file. Choosing this option will interleave (keeps audio in sync with the video) the chosen audio file starting at the beginning of the animation. Since there is no control over this, WAV files must be carefully crafted to match the video.


AVI Quality Settings
The AVI Quality Settings dialog only shows up when the Output AVI's "Bit Depth" option in the Conversion Options dialog is 1, 4, or 8-bit. Shining Light Productions has smart color reduction and/or dithering technology that makes images in the animation look roughly as good as the originals.

The first field of this dialog allows for the selection of how good the quality is of the animation's palette. Images with 8-bits or less use what are called "palettes." Palettes consist of a limited selection of colors. The number of bits determines the number of colors that can be selected. For example, 8-bit images can have 2^8 or 256 unique colors. Therefore, an 8-bit AVI animation can only have 256 colors for the entire animation. The problem is, how much CPU time is willing to be used to get the best quality animation? Since every image in the animation has to be scanned to generate the best palette, time becomes the crucial factor. Therefore, for test runs, using "Normal Quality" is recommended, but for final productions, "Super-Mega-Ultra High Quality" is recommended.

The next option determines whether or not to use smart dithering technology. Combining the highest quality smart color reduction with smart dithering produces the best possible animation at 8-bit or less, but smart dithering may have the negative side-effect of creating jitter (pixels jumping back and forth between frames).


Compression Profile
The Compression Profile dialog only shows up when the Output AVI's "Bit Depth" option in the Conversion Options dialog is 24-bit. This is where a compression profile may be selected to automate the animation creating process.

The only field on this dialog allows for the selection of a compression profile. The "Browse..." button may be used to select a pre-made compression profile or the field may be filled in with the location and filename of a new compression profile to create during the AVI generation process. The field may also be left blank to always manually select a codec during AVI generation.


AVI Generation
The AVI Generation dialog shows the progress of the creation of the AVI. The process may be cancelled at any time by clicking the Cancel button on the dialog. For the most part, this process is automated. However, if a compression profile was not selected and the bit depth was 24-bit, a dialog will show up asking for a codec (compressor) to be selected. Not all of the codecs listed in the dialog are video compression codecs (some are audio and some only decompress). It may take several attempts to find a codec and quality setting that is suitable for the animation being generated so that the quality vs. file size tradeoff minimizes the costs.


AVI to BMP
AVI2BMP's interface is fairly clean and understandable once BMP2AVI has been used. AVI2BMP is designed to provide the reverse of BMP2AVI and extract frames and audio from an animation. The interface is much simpler than BMP2AVI's in that an AVI is selected, what to extract is selected, and then the fully automated extraction process takes place.

AVI2BMP is new to this package, so if something here does not make sense, just try it out first to get a basic feel for it and that experience will enable you to ask intelligent questions when e-mailing Shining Light Productions for help. Also, since this is new to the package, ideas and suggestions are always welcome to make it better.


BMP to AVI (Command-Line)
BMP2AVI is a Console and GUI-based application. It is a bit strange at first to see a dialog box pop up from a console, but it works and most people seem to get used to it (feel free to ask questions...). The syntax for BMP2AVI is:

CmdBMP2AVI StartingBMPFilename AVIFilename FrameRate BitDepth [Profile]

Valid options for BitDepth are 1, 4, 8, 16, and 24. Resulting in 2, 16, 256, 65,536, and 16,777,216 color AVIs respectively.

The optional "Profile" option consists of a filename to store compression information for later use. If this option is not specified, the compression dialog will always be displayed. If it is specified, the compression dialog will display the first time and the file containing the compression profile will be created. Once the profile is created, whenever it is used, the compression information will be used and the dialog will never appear again. Don't manually edit the profile! Always use the compression dialog to create new profiles.

Example usage: Say there are a series of images from engine001.bmp to engine090.bmp in the current directory on the hard drive and the frame rate for this animation should be 24 frames per second at a bit-depth of 8 (256 colors). The command-line would look like:

bmp2avi engine001.bmp engine.avi 24 8

Once the program starts up, it will use engine001.bmp's header information to set up the rest of the AVI (which means all frames should be the same size). The first thing that happens is the first image is loaded into memory and the header is processed to set up the AVI (as well as dumped to the console - mostly for debugging purposes).

Next, a compression options dialog box pops up. Selecting "Full Frames (Uncompressed)" is generally a bad idea unless a BitDepth of 1 or 4 is used. So, select the "Compressor" drop-down box and select the "Indeo Video 5.10" option (or whatever version the system has available - under Windows XP, "Indeo Video 5.10" won't work, so select some other codec that does work). The default 85% compression quality provides fairly decent results (115MB "Full Frame" files become 5-15MB). Remember, the higher the quality, the larger the file. There is a tradeoff between quality and file size (10% quality will generally look awful but will be a fairly small file size). There also tends to be a tradeoff between quality and bit-depth. A really low bit-depth decreases file size but looks bad, while the 24-bit bit-depth has a maximum amount of quality but occupies a lot of space. A good tradeoff tends to be the 8-bit or 16-bit BitDepth options.

When using the 1, 4, and 8-bit BitDepth options, BMP2AVI will make two passes through the BMP files. The first pass involves processing the data for color quantization purposes (that is, make the image colors as optimal as possible) and the second pass involves actually adding the images to the AVIs. The actual color quantization process can take several seconds to process when a large number of varying colors are in the source images.

NOTE: There is a remote possibility that BMP2AVI might crash on large numbers of images and/or colors. If this happens, use the 16 or 24-bit BitDepth options or lower the quality of the input images.

NOTE: Many compressors do not accept the 1, 4, 8, or 16-bit BitDepth options. "Full Frames (Uncompressed)" will accept any BitDepth.


Conclusion
Shining Light Productions is proud to release BMP2AVI as just one more way that Shining Light Productions is still "Meeting the Needs of Fellow Programmers!" We hope that you will be able to use this to aid you in the development of many animations and that you find BMP2AVI to be useful in many other areas as well. Enjoy!

Sincerely,
Thomas J. Hruska, III
Shining Light Productions
"Meeting the Needs of Fellow Programmers"