AVI - Windows Audio-Video Interleaved RIFF
[File Formats]

Collaboration diagram for AVI - Windows Audio-Video Interleaved RIFF:


void imFormatRegisterAVI (void)

Detailed Description


Windows Copyright Microsoft Corporation.
Access to the AVI format uses Windows AVIFile library. Available in Windows Only.
When writing a new file you must use an ".avi" extension, or the Windows API will fail.
You must link the application with "im_avi.lib" and you must call the function imFormatRegisterAVI once to register the format into the IM core library. In Lua call require"imlua_avi".
Depends also on the VFW library (vfw32.lib). When using the "im_avi.dll" this extra library is not necessary.
If using Cygwin or MingW must link with "-lvfw32". Old versions of Cygwin and MingW use the "-lvfw_ms32" and "-lvfw_avi32".
See im_format_avi.h


    Data Types: Byte
    Color Spaces: RGB, MAP and Binary (Gray saved as MAP)
    Compressions (installed in Windows XP by default):
      NONE     - no compression [default]
      RLE      - Microsoft RLE (8bpp only)
      CINEPACK - Cinepak Codec by Radius
      MSVC     - Microsoft Video 1 (old)  (8bpp and 16bpp only)
      M261     - Microsoft H.261 Video Codec
      M263     - Microsoft H.263 Video Codec
      I420     - Intel 4:2:0 Video Codec (same as M263)
      IV32     - Intel Indeo Video Codec 3.2 (old)
      IV41     - Intel Indeo Video Codec 4.5 (old)
      IV50     - Intel Indeo Video 5.1
      IYUV     - Intel IYUV Codec
      MPG4     - Microsoft MPEG-4 Video Codec V1 (not MPEG-4 compliant) (old)
      MP42     - Microsoft MPEG-4 Video Codec V2 (not MPEG-4 compliant)
      CUSTOM   - (show compression dialog)
      DIVX     - DivX 5.0.4 Codec (DivX must be installed)
      (others, must be the 4 charaters of the fourfcc code)
    Can have more than one image. 
    Can have an alpha channel (only for RGB)
    Internally the components are always packed.
    Lines arranged from top down to bottom or bottom up to top. But are saved always as bottom up.
    Handle(0) returns NULL. imBinFile is not supported.
    Handle(1) returns PAVIFILE.
    Handle(2) returns PAVISTREAM.
      FPS IM_FLOAT (1) (should set when writing, default 15)
      AVIQuality IM_INT (1) [1-10000, default -1] (write only) [unsed if compression=CUSTOM]
      KeyFrameRate IM_INT (1) (write only) [key frame frequency, if 0 not using key frames, default 15, unsed if compression=CUSTOM]
      DataRate IM_INT (1) (write only) [kilobits/second, default 2400, unsed if compression=CUSTOM]

      Reads only the first video stream. Other streams are ignored.
      All the images have the same size, you must call imFileReadImageInfo/imFileWriteImageInfo 
        at least once.
      For codecs comparsion and download go to:

Function Documentation

void imFormatRegisterAVI ( void   ) 

Register the AVI Format.
In Lua, when using require"imlua_avi" this function will be automatically called.