AVI:
from http://blogs.bl0rg.net/netzstaub/archives/2005_09.html
The first step in writing the software was to be able to read and write AVI files. AVI is actually a RIFF container format, and is quite similar to for example WAVE. It starts with a RIFF header, and then contains a succession of RIFF blocks, which consist of a RIFF code (four characters), a length, and the content. A RIFF block can be a RIFF list, containing a variable number of RIFF blocks. An AVI file consists of an avi header, one or several streams (for example, a video stream and an audio stream), and an optional index. The streams are described by stream headers, stored in a RIFF list at the beginning of the file. The first version of the software could only work with video streams, and all the video clips I manipulated contained only uncompressed DV-video streams. I'm doing a rewrite right now, but it is far from finished. Here is the class definition for an AVI movie. AVIH is the avi header, STRH is the stream header for the video stream, and STRF is the stream format for the video stream. FRAMES is a list of frames. Like avisplice, a frame is only a filename, an offset, and a length. The frames themselves are not read into memory, but are only copied from file to file when rendering a movie. fm01 RecentChanges?