Core Development

The Audio Video Interleave (AVI) File Format

Offset Name Definition Size Value Hex Bytes
The RIFF Header
0 RIFF ID This contains the letters "RIFF" to indicate the main file format. 4 RIFF 52 49 46 46
4 Size The remaining size in bytes: (file size - 8) bytes (little endian). 4 388,192 60 ec 05 00
8 Format This is the format of the remainder, which is "AVI " in the case. 4 AVI_ 41 56 49 20
The Header List
12 List ID The letters "LIST" indicate a list portion. 4 LIST 4C 49 53 54
16 Length This size of the header list. 4 294 26 01 00 00
20 Header ID The letters "hdrl" indicate that this is a header list. 4 hdrl 68 64 73 6C
The AVI Header
24 AVI Header ID The letters "avih" identify this as the AVI header. 4 avih 61 76 69 68
28 Length The size of the AVI header: 56 bytes = 14 * 4 bytes 4 56 38 00 00 00
AVI Main Header (MainAVIHeader)
32 μsecs Per Frame The length of time for each frame in microseconds. 4 1,000,000 40 42 0f 00
36 Max Byte Rate The maximum number of bytes per second. 4 133,400 18 09 02 00
40 Reserved 1 Reserved 4 0 00 00 00 00
44 Flags Flags: AVIF_HASINDEX, AVIF_MUSTUSEINDEX, AVIF_ISINTERLEAVED, AVIF_WASCAPTUREFILE, AVIF_COPYRIGHTED 4 2064 10 08 00 00
48 Total Frames The total number of frames of data in the file. 4 5 05 00 00 00
52 Initial Frame This specifies the initial frame. Noninterleaved files should use 0. 4 0 00 00 00 00
56 Streams This specifies numbers of streams, usually 2 for video and sound. 4 2 02 00 00 00
60 Buffer Size This specifies suggest buffer size. 4 160,000 00 71 02 00
64 Width This specifies width in pixels. 4 150 96 00 00 00
68 Height This specifies height in pixels. 4 100 64 00 00 00
72 Reserved This is reserved. It should be zero. 16 0 00 ... 00
The Video Stream List
88 List ID The letters "LIST" indicate a list portion. 4 LIST 4C 49 53 54
92 Length This size of the list. 4 116 74 00 00 00
96 Stream List The letters "strl" indicate that this is a stream list. 4 strl 73 74 72 6c
100 Stream Header The letters "strh" indicate that this is a stream header. 4 strh 73 74 72 68
104 Length This size of the header. 4 56 38 00 00 00
The AVI Video Stream Header (AVIStreamHeader)
108 Type This is the header type. It is "vids" for video. 4 vids 76 69 64 73
112 Handler Optionally, contains a FOURCC for a specific data handler. 4 0 00 00 00 00
116 Flags Flags: AVISF_DISABLED, AVISF_VIDEO_PALCHANGES 4 0 00 00 00 00
120 Priority The priority of the stream. 4 0 00 00 00 00
124 Initial Frames This specifies how far ahead the audio compared to the video. 4 0 00 00 00 00
128 Scale This specifies the time scale that this stream will use. 4 1000 e8 03 00 00
132 Rate Rate/Scale = samples per second 4 1000 e8 03 00 00
136 Start The start time, usually zero. 4 0 00 00 00 00
140 Length The length of the video. 4 5 05 00 00 00
144 Buffer Size This should be larger than the largest chunk, zero if unknown. 4 2960 90 b0 00 00
148 Quality A value between 0 and 10,000. 4 0 00 00 00 00
152 Sample Size The size of a sample; zero if varying, block align for audio. 4 0 00 00 00 00
156 Frame The left, top, right, bottom coordinates in 16 bit values. 8 0, 0
150, 100
00 00 00 00
96 00 64 00
164 Stream Format The letters "strf" indicate that this is a stream format. 4 strf 73 74 72 66
168 Length This size of the format. 4 40 28 00 00 00
The AVI Video Stream Format (BITMAPINFOHEADER)
172 Size This is size of BITMAPINFOHEADER. 4 40 28 00 00 00
176 Width The width of the bitmap in pixels. 4 150 96 00 00 00
180 Height The height of the bitmap in pixels. 4 100 64 00 00 00
184 Planes The planes of the target device, must be 1. 2 1 01 00
186 Bit Count The number of bits per pixels. 2 24 18 00
188 Compression Values: BI_RGB, BI_RLE8, BI_RLE4, BI_BITFIELDS, BI_JPEG, BI_PNG 4 0 00 00 00 00
192 Image Size The size of the image in bytes, may be zero for BI_RGB. 4 45,200 90 b0 00 00
196 X Pels Per Meter The horizontal pixels per meter. 4 0 00 00 00 00
200 Y Pels Per Meter The vertical pixels per meter. 4 0 00 00 00 00
204 Colors Used The number of colors used, zero if all colors are used. 4 0 00 00 00 00
208 Colors Important The number of colors required, zero if all colors are requuired. 4 0 00 00 00 00
The Audio Stream List
212 List ID The letters "LIST" indicate a list portion. 4 LIST 4C 49 53 54
216 Length This size of the list. 4 94 5e 00 00 00
220 Stream List The letters "strl" indicate that this is a stream list. 4 strl 73 74 72 6c
224 Stream Header The letters "strh" indicate that this is a stream header. 4 strh 73 74 72 68
228 Length This size of the header. 4 56 38 00 00 00
The AVI Audio Stream Header (AVIStreamHeader)
232 Type This is the header type. It is "auds" for video. 4 auds 61 75 64 73
236 Handler Optionally, contains a FOURCC for a specific data handler. 4 0 00 00 00 00
240 Flags Flags: AVISF_DISABLED, AVISF_VIDEO_PALCHANGES 4 0 00 00 00 00
244 Priority The priority of the stream. 4 0 00 00 00 00
248 Initial Frames This specifies how far ahead the audio compared to the video. 4 0 00 00 00 00
252 Scale This specifies the time scale that this stream will use. 4 2 02 00 00 00
256 Rate Rate/Scale = samples per second 4 88,200 88 58 01 00
260 Start The start time, usually zero. 4 0 00 00 00 00
264 Length The length of the video. 4 80,000 80 38 01 00
268 Buffer Size This should be larger than the largest chunk, zero if unknown. 4 160,000 00 71 02 00
272 Quality A value between 0 and 10,000. Use -1 for default. 4 -1 ff ff ff ff
276 Sample Size The size of a sample; zero if varying, block align for audio. 4 2 02 00 00 00
280 Frame The left, top, right, bottom coordinates in 16 bit values. 8 0, 0
0, 0
00 00 00 00
00 00 00 00
288 Stream Format The letters "strf" indicate that this is a stream format. 4 strf 73 74 72 66
292 Length This size of the format. 4 18 12 00 00 00
The AVI Audio Stream Format (WAVEFORMATEX)
296 Sample Size The size of a sample; zero if varying, block align for audio. 2 1 01 00
298 Channels The number of channels of audio data. 2 1 01 00
300 Samples Per Sec The number of samples per second. 4 44,100 44 ac 00 00
304 Ave Bytes Per Sec (Samples Per Sec)*(Block Align) 4 88,200 88 58 01 00
308 Block Align (Channels × BitsPerSample) / 8 2 2 02 00
310 Bits Per Sample This should be 8 or 16 for PCM. 2 16 10 00
312 Size Extra The size of the extra information. 2 0 00 00
314 Junk Begins with the label "JUNK" 1722 JUNK
1714
4a 55 4e 4b
b2 06 ...
The Stream Data List
2036 List ID The letters "LIST" indicate a list portion. 4 LIST 4C 49 53 54
2040 Size The size of the list. 4 386,052 04 e4 05 00
2044 Video Tag The letters "movi" indicate a video image. 4 movi 6d 6f 76 69
2048 Data Type Use "##db" uncompressed DIB, "##dc" for compressed. 4 00db 30 30 64 62
2052 Image Size The size of this image. 4 45,200 90 b0 00 00
2056 Pixel Data The pixels of the image. 45,200 ? ...
47,256 More Images More Images: 45,208 bytes each. 4 more in this case 180832 ? ...
228,088 Data Type Use "##wb" for wave bytes (audio). 4 01wb 30 31 77 62
228,092 Audio Size The size of this image. 4 160,000 00 71 02 00
228,096 Audio Data The sound wave data. 160,000 ? ...
The Index List (Optional)
388,096 Index ID The letters "idx1" indicates an index portion. 4 idx1 69 64 78 31
388,100 Index Size The size of the index in bytes. 4 96 60 00 00 00
388,104 Chunk ID The ID for the chunk of data. 4 00db 30 30 64 62
388,108 Flags The flags for this chuck. 4 16 10 00 00 00
388,112 Chunk Offset The chunk offset, absolute or relative. 4 4 04 00 00 00
388,116 Chunk Size The chunk size in bytes. 4 45,200 90 b0 00 00
388,120 More Chunks There are four more image chunks. Offsets listed. 64 45,212
90,420
135,628
180,836
9c b0 00 00
34 61 01 00
cc 11 02 00
64 c2 02 00
388,184 Chunk ID The ID for the chunk of data. 4 01wb 30 31 77 62
388,188 Flags The flags for this chuck. 4 16 10 00 00 00
388,192 Chunk Offset The chunk offset, absolute or relative. 4 226,044 fc 72 03 00
388,196 Chunk Size The chunk size in bytes. 4 160,000 00 71 02 00
388,200 Size The size of the next chunk in bytes. 4 56 38 00 00 00
388,204 ID This is the header type. It is "vids" for video. 4 vids 76 69 64 73
388,208 The Rest The rest is the same as the prior image spec. 52 ? ?
388,260 List The letters "LIST" indicate a list portion. 4 LIST 4c 49 53 54
388,264 Length This size of the list. 4 94 5e 00 00 00
388,268 Stream List The letters "strl" indicate that this is a stream list. 4 strl 73 74 72 6c
388,272 Stream Header The letters "strh" indicate that this is a stream header. 4 strh 73 74 72 68
388,276 Length This size of the next portion. 4 56 38 00 00 00
388,280 Type This is the header type. It is "auds" for audio. 4 auds 61 75 64 73
388,284 The Rest The rest is the same as the prior audio spec. 52 ? ?
388,336 Junk Begins with the label "JUNK" to indicate junk data. This is just a repeat, but the size isn't correct. 200 JUNK
1714
4a 55 4e 4b
b2 06 ...
 
 

© 2007–2024 XoaX.net LLC. All rights reserved.