Rate: Specifies the number of frames per second, e.g. 20 means 20 fps (each frame shows for 50ms)
Code: The compression codec to use (must be installed on system) as a four characters string.
For example:
'cvid' : cinepak by Radius
'msvc' : Microsoft Video 1
'mp42' : Microsoft MPEG4 V2
More codecs are listed at www.fourcc.org or by searching for registered fourcc codes and wave formats on MSDN
If a codec is not specified, a dialog box appears to allow the user to select a compression.
WavFilename: An optional audio file to include as an audio track. Must be WAV format. Output video will match length of the audio file if longer than the video content.
You can save each frame to the created AVI file using the SaveToAVI method.
Finally, call CloseAVIFile to close the file.
// Create an AVI transitioning one image to another const Frames_Per_Second = 20; Display_Seconds = 5; var proc: TImageEnProc; io: TImageEnIO; startBitmap, endBitmap : TIEBitmap; i, frameCount: Integer; transLevel: Single; begin startBitmap := TIEBitmap.Create; endBitmap := TIEBitmap.Create;
proc := TImageEnProc.Create( nil ); io := TImageEnIO.Create( nil ); try if io.CreateAVIFile('D:\Transition.avi', Frames_Per_Second, 'cvid' ) = ieaviNOCOMPRESSOR then raise Exception.create( 'This compressor is unavailable!' );