> Wiki > AVI

what is avi?

AVI, the abbreviation of Audio Video Interleaved (also Audio Video Interleave), is a multimedia container format containing both audio and video data in a file container that allows synchronous audio-with-video playback. Even though AVI video compression algorithm uses lossy compression (support 256 colors and RLE compression) that is not good in video quality compared by lossless compression, it is still widely used in the area of multimedia storage, like DV, camcorder, broadcast wave, film post-production, etc.

2 overview

AVI is well-known since its first introduced preinstalled in windows 3.1 by Microsoft in November 1992,

AVI
and the meaning of Audio Video Interleaved is synchronous audio-with-video playback. cross-platform application is a big advantage of AVI format, which often can be seen at the beginning of animation in games (wow, drift, guild war, etc), in DVD disc and handy cams. The weakness of AVI is its large storage in size and its variety of different compression standard. The most common problem usually encountered caused by different compression standard is that the higher version of windows media player cannot play early encoded AVI videos and vice versa. Therefore we may fail to play some AVI files or video-audio desynchronized or only audio without video or other problems, All of which is caused by different compression standard of AVI.

3 AVI file structure

AVI is a derivative of the Resource Interchange File Format (RIFF). RIFF is primarily used to store multimedia such as sound and video, though it may also be used to store any arbitrary data. AVI files support multiple streaming audio and video, although these features are seldom used. AVI contains 3 parts defined by RIFF: File header, blocks(chunks), and index

header: contains metadata about the video, such as its width, height and frame rate

chunks:An AVI file may carry audio/visual data inside the chunks in virtually any compression scheme, including Full Frame (Uncompressed), Intel Real Time (Indeo), Cinepak, Motion JPEG, Editable MPEG, VDOWave, ClearVideo / RealVideo, QPEG, and MPEG-4 Video.

index: indexes the offsets of the data chunks within the file.

4 AVI File structure explained in RIFF

RIFF files consist entirely of "chunks". The overall format is identical to IFF, except for the endianness as previously stated, and the different meaning of the chunk names. All chunks have the following format:

• 4 bytes: an ASCII identifier for this chunk (examples are "fmt " and "data"; note the space in "fmt ").

• 4 bytes: an unsigned, little-endian 32-bit integer with the length of this chunk (except this field itself and the chunk identifier).

• variable-sized field: the chunk data itself, of the size given in the previous field.

• a pad byte, if the chunk's length is not even.

(Click Here to see the details about RIFF structured AVI )

5 AVI Parameters

5-1.video

video size: display resolution AVI can be set as 4:3, 16:9 and any other display ratio as willing, From 1080p to 160p and even less.

5-2.audio

As Audio and video are individual stored in AVI file, we can merge the audio from an avi file into another avi video file. AVI has a closer relationship with WAV which is the audio signal source of AVI video. The audio parameters of AVI equals to WAV audio parameters, besides, AVI file also contains other parameters related to audio.

5-2-1. Interlace audio every X frames: X here is an adjustable parameters, which defines how often the audio interlaced in every X video frames. One frame is the minimum value of X, means every video frame is interlaced with audio data, which also is the default value of CD-ROM. The smaller of the interlaced parameters set, the less of data streams need reading from RAM and easier to playback avi in consistency. Therefore, if the data transportation ratio of AVI is over bigger, The interlaced X parameters can be set to a bigger value. When playing avi from hard disc, some bigger interlaced frequency values can be used, like several frames, even 1 second.
5-2-2. Synchronization: generally, in AVI file, audio and video are well-synchronized. desynchronization of audio and video may occur when playing AVI videos in some certain video player software, like MPC player.

5-3.Compression

To gain the highest video quality, it is better not adopt any compression technology while capturing original video. The compression process can be used in after-edit according to certain purpose.

6 Digital Video

AVI and VFW player has already become the most common used video format, and has the following features:

6-1.Playback video without the need of special Hardware

Even though, AVI and VFW software is designed for MPC, it also can be improved continuously to keep up with the development of MPC. Through parameters of AVI, its video-windows size and frame rate can be adjusted according to playing environment and hardware ability. When playing avi in a lower-level MPC or in web, the video size of VFW , color amount, frame rate can be very low. whereas avi compressed with 64K color and 320*240 resolution can be playback with the ratio of 25 frame/second in Pentium level. In this sense, VFW suites for different hardware platforms, and users can edit and play avi on a general MPC without using of an expensive professional hardware.

6-2.realize synchronize control and real-time play

Using the method of synchronization to control parameters, AVI can apply to replay circumstance through self-adjustment. if the process ability of MPC is not high enough, and the avi data ratio is a little big, when playing avi in windows, video player can achieve the effect of audio-video synchronization by the way of abandon some certain frames and adjusting actual playing data ratio.

6-3.play AVI stored in hard disk and disc efficiently

As AVI data is interlaced storaged, it only need very limited Ram space to avi using VFW. Because video player program can read and play avi stored in hard disk or disc simultaneously without preload a large sized video to RAM. It only need read few video images and parts of audio data.

when playing an avi file. This method can significantly enhance system working efficiency, and at the same time realize quick loading avi and quick launching playing program to reduce the waiting time of playing avi.

6-4.open avi digital video file struction

AVI file structure not only resolve the audio-video synchronization problem, but also has universal and open features. It can work under any windows environment, and has extensive environment function. User can develop his own AVI video file and call it at any time in windows.

6-5.Re-editable

AVI adapts lossy compression, which can be re-edited and processed by the use of general video editing software, Adobe premiere, MediaStudio, etc.

6-6.AVI can be categorized into 4 kinds:

1. H.264/MPEG-4AVC VideoFormat(*.avi): An extending video format of MPEG-4, has higher compression ratio.

2. AVI —Audio-Video.lnterleaved(*.avi):Format synchronized with audio

3. Lossless.uncompressed.AVI(*.avi): Mainly for video editing

4. with DVcodec(*avi): Old video editing format

7 Other AVI standard

7-1.NAVI

NAVI , the abbreviation of newAVI, is a new video format introduced by an underground named ShadowRealm has no connection with what we have talked about AVI above. It is modified from Microsoft ASF compression algorithm, which is different from general ASF video format, and hugely enhance definition with the method of increasing Frame rate through sacrificing original ASF video "stream" features.

7-2.DV-AVI

DV-AVI, full named as Digital video Format, is a kind of home digital video format jointly introduced by Sony, Panasonic and JVC. Many popular camcorders use DV-AVI video format record videos. It can be transferred to computer through IEEE 1394 port, and the well-edited DV-AVI on computer can also be transferred back to camcorders. This file extension also is . AVI, so we also generally call DV-AVI as AVI video format.