AVI File Parsing

Source: Internet
Author: User

52 49 46 46-> forcc code 'riff' ASCII value, which indicates a riff file. Riff (resource Interchange File Format ).
84 CF 4A 00-> indicates four bytes of the file size. Because Windows is a small header, the file size is 0x004acf84, that is, 4902788 bytes. Because this size does not contain the first 8 bytes, therefore, the total file size is 4902796 bytes.
41 56 49 20-> fourcc code 'av' ASCII code, file type, description is an AVI file. AVI (audiovideointerleaved ).
4c 49 53 54-> fourcc code 'LIST' ASCII code, which indicates a list
7c 02 00-> indicates four bytes of the list size. The list size is 0x0000027c, that is, 636 bytes. The size of the entire list is 636 + 8 = 644 bytes.
68 64 72 6C-> fourcc code 'hdrl' ASCII code. The list type indicates that this is a header list ).
61 76 69 68-> fourcc code 'avih 'ASCII code, indicating the chunk ID (ckid), which indicates that this is a main AVI Header ). Is an FCC member in the structure avimainheader.
38 00 00 00-> indicates the size of the chunk in four bytes. The chunk size is 0x00000038, that is, 56 bytes. The size of the entire chunk is 56 + 8 = 64 bytes. Is a CB member in the structure avimainheader.
56 82 00 00-> is a member of dwmicrosecperframe in the structure avimainheader, indicating the number of microseconds between frames. 0x00008256, that is, 33366 microseconds.
EF af 0a 00-> is a member of dwmaxbytespersec in the structure avimainheader, indicating the Approximate Maximum File rate. It is 0x000aafef, that is, 700399 Bytes/second.
01 00 00 00-> is the dwpaddinggranularity member in the structure avimainheader, indicating the number of bytes of alignment. The value is 0x000001, that is, 1 byte, indicating that the file is aligned with 1 byte.
10 08 00 00-> is a member of dwflags in the structure avimainheader. 0x00000810, hasindex (+); mustuseindex; isinterleaved; wascapturefile; copyrighted; trustcktype (+)
Dd 00 00 00-> is a member of dwtotalframes in the structure avimainheader. The total number of frames in the file. It is 0x000000dd, or 221 frames. Dwtotalframes * dwmicrosecperframe = total file duration. 221*33366 = 7373886 microseconds. That is, the total file length is 7.373886 seconds.
00 00 00 00-> is a member of dwinitialframes in the structure avimainheader. Indicates the initial frame in the staggered frame. It is a non-staggered file and the value is 0. Dwflags indicates that the file is not a staggered file, so the value is 0.
01 00 00 00-> is a dwstreams member in the structure avimainheader, indicating the number of streams contained in the file. This file only contains a medium stream, so the value is 1.
A8 62 00 00-> is the dwsuggestedbuffersize member in the structure avimainheader, indicating the recommended cache size when reading the file. The value is 0x000062a8, or 25256 bytes. The chunk shows that the maximum chunk size is 25256.
60 01 00-> is the dwwidth member in the structure avimainheader, indicating the width of the AVI file, in pixels. 0x00000160, that is, 352 pixels.
F0 00 00-> is the dwheight member in the structure avimainheader, indicating the height of the AVI file, in pixels. It is 0x000000f0, that is, 240 pixels.
00 00 00 00-> is a member of dwreserved [0] In the structure avimainheader. It is retained.
00 00 00 00-> is a member of dwreserved [1] In the structure avimainheader. It is retained.
00 00 00 00-> is a member of dwreserved [2] In the structure avimainheader. It is retained.
00 00 00 00-> is a member of dwreserved [3] In the structure avimainheader. It is retained.
4c 49 53 54-> fourcc code 'LIST' ASCII code, which indicates a list
24 01 00-> indicates four bytes of the list size. The list size is 0x00000124, that is, 292 bytes. The entire list size is 292 + 8 = 300 bytes.
73 74 72 6C-> fourcc code 'strl' ASCII code. The list type indicates a list of stream information.
73 74 72 68-> fourcc code 'strh' ASCII code, which indicates that this is a stream header information chunk and its content is an avistreamheader structure. This value is an FCC Member of the avistreamheader struct.
38 00 00 00-> indicates the size of the chunk in four bytes. The chunk size is 0x00000038, that is, 56 bytes. The size of the entire chunk is 56 + 8 = 64 bytes. Is the CB Member of the structure avistreamheader.
76 69 64 73-> fourcc code 'vids 'ASCII code, which indicates that this is a video stream. Is the fcctype Member of the structure avistreamheader.
63 76 69 64-> fourcc code 'cvid' ASCII code, used to identify the encoding and decoding of the stream. Is the fcchandler Member of the structure avistreamheader.
00 00 00 00-> is a dwflags Member of the structure avistreamheader. The identifier of the entire data stream. Disabled; videopalettechanges.
00 00 00-> is the wpriority member and wlanguage Member of the structure avistreamheader.
00 00 00 00-> is a dwinitialframes Member of the structure avistreamheader. Indicates the initial frame in the staggered frame. It is a non-staggered file and the value is 0.
E9 03 00 00-> is a dwscale Member of the structure avistreamheader. It is 0x000003e9, that is, 1001. Together with dwrate, it determines the time scale used by the stream. For video streams, dwrate/dwscale = frame rate (FRAM rate ).
30 75 00 00-> is the dwrate Member of the structure avistreamheader. 0x00007530, that is, 3000. Frame Rate of the Video Stream: 3000/1001 = 29.97 (FPS)
00 00 00 00-> is a dwstart Member of the structure avistreamheader. The start time of the stream. The value is 0. That is, when the file starts, the stream starts.
Dd 00 00 00-> is the dwlength Member of the structure avistreamheader. The length of the stream. It is 0x000000dd, that is, 221. For video streams, this is actually the total number of frames. Divide the frame length by the frame rate to get the total duration of the stream.
A8 62 00 00-> is the dwsuggestedbuffersize Member of the structure avistreamheader. Indicates the recommended cache size when reading the stream. The value is 0x000062a8, or 25256 bytes. The chunk shows that the maximum chunk size of the stream is 25256.
00 00 00 00-> is a dwquality Member of the structure avistreamheader. Indicates the quality indicator of the stream, which is 0 here.
00 00 00 00-> is the dwsamplesize Member of the structure avistreamheader. Indicates the size of a data sample. If the sample size is variable, this value is 0. In the video stream, this value is generally 0. The value is 0.
00 00 00 00-> is the left and top members of the rcframe Member of the structure avistreamheader. Rcframe specifies the target rectangle of the wwidth member and the dwheight member text stream or video stream in the main header file. Here, both left and top are 0.
00 00 00-> is the right and bottom members of the rcframe Member of the structure avistreamheader. The value is 0.
73 74 72 66-> fourcc code 'strf' ASCII code, indicating that this is a stream format information chunk. For video streams, the data is a bitmapinfo structure. For audio streams, the data is a waveformatex structure.
28 00 00 00-> the chunk size of the format information, excluding the initial 8 bytes. It is 0x00000028, that is, 40 bytes. The size of the entire chunk is 40 + 8 = 48 bytes.
28 00 00-> is the bisize member of bitmapinfoheader, a member of bitmapinfo, indicating the size of bitmapinfoheader. It is 0x00000028, that is, 40 bytes. This indicates that in this chunk, bitmapinfo only contains one member, that is, the bitmapinfoheader struct (because bibitcount is 24, bitmapinfo does not contain the color table ).
60 01 00-> is the biwidth member of bitmapinfoheader. The bitmap width is measured in pixels. 0x00000160, that is, 352 pixels.
F0 00 00-> is the biheight member of bitmapinfoheader. The height of the bitmap is measured in pixels. It is 0x000000f0, that is, 240 pixels.
01 00 18 00-> is the biplanes member and bibitcount member of bitmapinfoheader. Biplanes indicates the number of flat layers of the target device. The value is 1. Bibitcount indicates the number of digits a pixel occupies. The value is 0x0018, that is, a pixel occupies 24 digits.
63 76 69 64-> 'cvid' ASCII code, which is a bicompression Member of the bitmapinfoheader structure, indicates the compression type.
FC 7b 00-> is the bisizeimage member of bitmapinfoheader, indicating the image size. It is 0x00007bfc, that is, 31740 bytes.
00 00 00-> is a member of bixpelspermeter of bitmapinfoheader. The horizontal resolution is 0.
00 00 00-> is a member of biypelspermeter of bitmapinfoheader. The vertical resolution is 0.
00 00 00-> is the biclrused Member of the bitmapinfoheader structure, where 0 is used. This indicates the maximum value corresponding to the bibitcount value for the compression mode specified by bicompression.
00 00 00-> is the biclrimportant Member of the bitmapinfoheader structure. The value here is 0. Indicates that all colors are important.
Bytes ------------------------------------------------------------------------------------------------
Is an index structure of AVI 2.0. Because only the old index is used this time, we will not study it for the moment.
Bytes ------------------------------------------------------------------------------------------------
Bytes --------------------------------------------------------------------------------------------------------
An Avi opendml 1.02 header list that contains an AVI odml header. I will not study it for the moment.
Bytes --------------------------------------------------------------------------------------------------------
4c 49 53 54-> fourcc code 'LIST' ASCII code, which indicates a list
0C BF 4A 00-> indicates four bytes of the list size. The list size is 0x004abf0c, that is, 4898572 bytes. The size of the entire list is 4898572 + 8 = 4898580 bytes.
6D 6f 76 69-> fourcc code 'movi' ASCII code. The list type indicates a data list.
Bytes --------------------------------------------------------------------------------------------------------
One Avi Standard Index chunk.
Bytes --------------------------------------------------------------------------------------------------------
30 30 64 62-> fourcc code '00db' ASCII code, indicating that this is the first stream (Video Stream) data, is not compressed frame.
08 62 00 00-> indicates the size of the chunk in four bytes. The size of the chunk is 0x00006208, that is, 25096 bytes. The size of the entire chunk is 25096 + 8 = 25104 bytes.
Bytes --------------------------------------------------------------------------------------------------------
Chunk data.
Bytes --------------------------------------------------------------------------------------------------------
30 30 64 63-> fourcc code '00dc' ASCII code, indicating that this is the first stream (Video Stream) data, is a compressed frame.
Da 5A 00 00-> indicates the size of the chunk in four bytes. The chunk size is 0x00005ada, that is, 23258 bytes. The size of the entire chunk is 23258 + 8 = 23266 bytes.
Bytes --------------------------------------------------------------------------------------------------------
Chunk data.
Bytes --------------------------------------------------------------------------------------------------------
Bytes --------------------------------------------------------------------------------------------------------
Continuous chunk data.
Bytes --------------------------------------------------------------------------------------------------------
64 69 78 31-> fourcc code 'idx1' ASCII code. The chunk type indicates that this is an old index chunk.
E0 0d 00-> indicates the size of the chunk in four bytes. The chunk size is 0x00000de0, that is, 3552 bytes. The size of the entire chunk is 3552 + 8 = 3560 bytes. Each Index consists of four DWORD types, that is, 16 bytes. Therefore, the number of index items contained in the index Chunk is 3552/16 = 222. It can be inferred that the movi list contains 222 data chunks.
37 46 78-> '7fxx' ASCII code, Chunk ID, which should be the user-defined chunk index.
00 00 00-> flag. 'LIST'-chunk; keyframe; midpart; firstpart; lastpart; notime
9C 02 00-> offset. It is 0x0000029c, that is, 668 bytes.
00 00 00 00-> the chunk size of the data. The chunk is not found based on the offset given to the chunk. The chunk's data size is 0 again. It is inferred that this is an error data.
30 30 64 62-> '00db' ASCII code, Chunk ID, indicates that the first stream is not compressed frame.
10 00 00 00-> flag. 'LIST'-chunk; keyframe (+); midpart; firstpart; lastpart; notime
FC 08 00-> offset. It is 0x000008fc, that is, 2300 bytes. This file uses the offset from the beginning of the file.
08 62 00 00-> the chunk size of the data. 0x00006208, that is, 25096 bytes.
30 30 64 63-> '00dc 'ASCII code, Chunk ID, indicates the compression frame of the first stream.
00 00 00-> flag. 'LIST'-chunk; keyframe; midpart; firstpart; lastpart; notime
0C 6B 00-> offset. It is 0x00006b0c, that is, 27404 bytes. This file uses the offset from the beginning of the file.
Da 5A 00 00-> the chunk size of the data. It is 0x00005ada, that is, 23258 bytes.
Bytes --------------------------------------------------------------------------------------------------------
The following are the index members until the end of the file.
Bytes --------------------------------------------------------------------------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.