Audio Video Interleaved (.AVI) is a multimedia container format developed by Microsoft as a part of Video for Windows technology. AVI files can contain both audio and video data in a file container and that allows synchronous audio-with-video playback.
AVI is a variant of the Resource Interchange File Format (RIFF), which divides file's data into blocks, or “chunks”.
The first sub-chunk is identified by the “hdrl” tag and is the file header which contains metadata about the video such as width, height and frame rate.
The second sub-chunk is identified by the “movi” tag. It contains the actual audio/video data of the AVI movie.
The third (optional) sub-chunk is identified by the “idx1” tag and indexes the offsets of the chunks within the file.