Audio video interleave

from Wikipedia, the free encyclopedia
AVI (Audio Video Interleave)
File extension : .avi
MIME type : video / x-msvideo, video / avi, video / msvideo
Magic number : 5249.4646.xxxx.xxxx
4156.4920.4C49.5354
hex
RIFF .... AVI LIST

( ASCII )

Developed by: Microsoft
Type: Container format
Container for: Audio , video , text
codecs: Indeo , Cinepak , Motion JPEG etc. a.
Extended by: REEF
Standard (s) : AVI RIFF File Reference

Audio Video Interleave ( AVI ) is a video container format defined by the software manufacturer Microsoft , which is derived from the RIFF ( Resource Interchange File Format ) introduced for Windows 3.1 . "Audio Video Interleave" means that audio and video data are interlocked, ie stored "interleaved" (see also Interleaving ).

General

The first definition of AVI is as old as the multimedia PCs. The format was created by Microsoft in 1992 as part of the Video for Windows programming interface to enable the playback of audio-visual data within Windows . Several video, audio and text subtitle data streams can be present in an AVI file, which in turn can be encoded using different methods. The type of video stream is stored via FourCCs (Four Character Code) , TwoCCs are used for audio streams. A corresponding codec is required for each stream for coding or decoding . Most AVI files use the extensions introduced by the Matrox OpenDML group in February 1996. These files have limited support from Microsoft and are unofficially known as AVI 2.0 .

Advantages of AVI

  • The AVI format is widespread and is at least adequately supported by most multimedia programs.
  • The format is also supported by a large number of DVD players (provided they support the codecs used).

Disadvantages of AVI

  • no standardized way to save the aspect ratio, which means that playback software cannot automatically select the correct one
  • no standardized way to save the field order (top or bottom field first), so editing or playback software cannot automatically select the correct one
  • not designed for video and audio formats that use variable frame rates (VFR)
  • Not intended for video compressions that access images that are before the currently displayed one (MPEG-4, ...)
  • poor support for subtitles (subtitles as pictures, like on DVDs , are not possible)
  • no support of menus or chapters
  • no uniform possibility of specifying time stamps ( timecodes )

Some of these restrictions can sometimes be circumvented. For example, the FFmpeg encoder enables Vorbis audio to be used in AVI files. Mostly, however, not without disadvantages such as a high volume of data (overhead) or incompatibility with hardware or software.

These circumstances led to the development of other, new container formats such as Matroska , Ogg Media or the MP4 container format.

construction

An AVI 1.0 file consists of a RIFF file with a single AVI list, an AVI 2.0 file contains other AVIX lists. Each AVI and AVIX list is no larger than 2 GB. In the case of an AVI 2.0 file, the specification requires that the first RIFF list does not exceed 1 GB. However, this point is ignored by some applications when creating such files. The AVI-LIST contains a list with the headers , a list with the actual data and an optional chunk for index entries.

An AVI file usually contains one image in each block, called a chunk. In contrast to this, several images can be placed together in one chunk if the header specifies that the index must be used to find the individual images.

This usually included index lists all frames (video, audio, subtitles) with their position and size. It is not necessarily required for AVI 1.0. Timestamps are only included implicitly. In the case of AVI 1.0, the index is at the end of the file; in the case of AVI 2.0, a two-level index is used. The first level is then for each stream in the header of this stream, the second level is in the middle of the video / audio data. The block size for the second level of the index is not specified, but for technical reasons there must be at least one block per stream and per 4 GB. Since a file can only be played correctly if this information is available, especially if parts of the data stream are damaged, AVI is unsuitable as a streaming format .

It can also be specified in the header that the index must be used to find data blocks. This is relevant if the data within the AVI file is not in the playback order or if there are multiple frames, e.g. B. multiple images in a single chunk. Packing several images in a chunk saves overhead, because each chunk, not counting an index entry, results in 8 bytes of overhead, but reduces the chance of being able to play back undamaged parts of partially damaged files.

Since the AVI format has its origins in the x86 architecture, the numbers it contains are kept in little-endian format.

See also

Web links