The movie file format is based on RIFF, but it is in essence a Macintosh format. The animation objects are Macintosh data structures, and much of the integer byte ordering is represented in Motorola format. The Movie Player converts the byte ordering when it loads the file.
The file contains a table of contents chunk (with chunk ID “CFTC”) that lists the animation structures in the file. The animation structures are stored in their own chunks and immediately follow the “CFTC” chunk. Expressed in RIFF notation, the movie file format is as follows:
RIFF <ckSize>( 'RMMP'
<cftc-ck> // Table of contents chunk
<ver-ck> // Version chunk
<mcnm-ck> // Macintosh name chunk
<animation chunks> . . . ) // Score, cast members, etc.
Expressed in RIFF notation, an animation chunk is formatted as follows:
<ckID:FOURCC><dwSize:DWORD>( <dwResID:DWORD> // Resource ID number
<ResName:BSTR> // Resource name
<ChunkData> ) // Resource data
The animation chunk fields are described in the following table:
Field | Description |
ckID | Chunk ID of the animation element. |
dwSize | Size of animation element. |
dwResID | Resource ID number. The resource ID number identifies the animation element within a group of elements of the same resource type. For example, a series of four “dib” chunks might be numbered 0x401, 0x402, 0x403, and 0x404. In the same file, there might be a “stxt” chunk numbered 0x401. |
ResName | Resource name. This is a variable-length string with a BYTE string-length prefix and no terminating NULL character. Since the ResName field has variable length, the starting position of the ChunkData is variable. This field is word-aligned, and a pad byte might appear at the end of the field. |
ChunkData | Animation resource data. The chunk data is word-aligned, as is the entire animation chunk. |
The dwSize and ResID fields are represented in Intel integer byte-ordering format. Unless otherwise noted, other integer data is represented in Motorola byte-ordering format.
The following section lists the chunks that can reside in a movie file. “Structure of Selected Movie File Data Chunks,” following the next section, describes some of the animation structures in detail.