After the main header, the
hdrl list holds one LIST strl for each stream. The first
strl describes stream 0, the second stream 1, and so on; that number is the
one in the data chunk IDs.
| Chunk | Required | Contents |
|---|---|---|
strh | Yes | The stream header, below. |
strf | Yes | The stream format; it must follow strh. For video a BITMAPINFO (see the BITMAPINFOHEADER), with a palette if needed. For audio a WAVEFORMATEX (see the WAV format chunk). |
strd | No | Codec driver data. Its layout belongs to the codec; programs pass it through unread. |
strn | No | The stream’s name, as a null-terminated string. |
The strh chunk
Microsoft’s AVISTREAMHEADER. Offsets are from the start of the chunk.
| Offset | Size | Type | Name | Meaning |
|---|---|---|---|---|
| 0 | 4 | FOURCC | fcc | strh. |
| 4 | 4 | DWORD | cb | Size of the structure, not counting these 8 bytes. |
| 8 | 4 | FOURCC | fccType | The kind of data; see below. |
| 12 | 4 | FOURCC | fccHandler | The preferred handler. For audio and video, the codec. |
| 16 | 4 | DWORD | dwFlags | Flags; see below. The high word is specific to the data type. |
| 20 | 2 | WORD | wPriority | Priority among streams of one type; the highest may be the default. |
| 22 | 2 | WORD | wLanguage | Language tag. |
| 24 | 4 | DWORD | dwInitialFrames | How far audio is skewed ahead of video in interleaved files, typically about 0.75 seconds. |
| 28 | 4 | DWORD | dwScale | With dwRate, the time scale: dwRate / dwScale is samples per second. For video the frame rate; for PCM audio the sample rate. |
| 32 | 4 | DWORD | dwRate | See dwScale. |
| 36 | 4 | DWORD | dwStart | Start time of the stream, in stream units. Usually zero. |
| 40 | 4 | DWORD | dwLength | Length of the stream, in stream units. |
| 44 | 4 | DWORD | dwSuggestedBufferSize | Suggested read buffer, usually the largest chunk. Zero if unknown. |
| 48 | 4 | DWORD | dwQuality | Quality from 0 to 10,000. −1 means the default. |
| 52 | 4 | DWORD | dwSampleSize | Size of one sample, or zero if samples vary. When zero, each sample is in its own chunk. For audio this equals nBlockAlign. |
| 56 | 8 | RECT | rcFrame | Destination rectangle within the movie, in pixels: left, top, right, bottom. Each coordinate is 16 bits in the standard structure. |
wLanguage and wPriority are defined only this far: Microsoft’s
page gives no list of language values.
Stream types
| fccType | Stream |
|---|---|
vids | Video |
auds | Audio |
mids | MIDI |
txts | Text |
dwFlags
| Value | Name | Meaning |
|---|---|---|
0x00000001 | AVISF_DISABLED | The stream should not be enabled by default. |
0x00010000 | AVISF_VIDEO_PALCHANGES | The video stream contains palette changes. |
The vprp chunk
The OpenDML extensions add an optional video properties chunk vprp, with the
video format, standard, refresh rate, frame size and field layout. Its layout is defined
in the OpenDML document, which could not be read for this reference, so its fields are
not listed here.