Container format
This article may require copy editing for grammar, style, cohesion, tone, or spelling. |
A container or wrapper format is a meta-file format whose specification describes how data and metadata are stored (not coded). A program able to identify and open a container file might not be able to decode the contained data. This can be caused by the opening program lacking the required decoding algorithm, or the meta-data not providing enough information.
By definition, a container format could wrap any kind of data. Though there are a few examples of such file formats (e.g. Microsoft Windows's DLL files), most container formats are specialized for the specific requirements of the data. For example, a popular family of containers is found among multimedia file formats. Since audio and video streams can be coded and decoded with many different algorithms, a container format can be used to provide a single file to the user.
Among the earliest cross-platform container formats are Distinguished Encoding Rules (DER), and the 1985 Interchange File Format (IFF).
Multimedia container formats
The container file is used to identify and interleave the different data types. Simpler container formats can contain different types of audio codecs, while more advanced container formats can support multiple audio and video streams, subtitles, chapter-information, and meta-data (tags) — along with the synchronization information needed to play back the various streams together. In most cases, the file header, most of the metadata and the synchro chunks are specified by the container format (for example container formats exist for optimized, low-quality, internet video streaming which, for example, differs from high-quality DVD streaming requirements).
The constituent parts of a container format have various names; they are often called "chunks", as in RIFF and PNG, while they are called "packets" in MPEG-TS (from the communications term), and they are called "segments" in JPEG. The main content of a chunk is called the "data" or the "payload". Most container formats have chunks in sequence, each with a header, while TIFF unusually instead stores offsets. Modular chunks make it easy to recover other chunks in case of file corruption or dropped frames or bit slip, while offsets result in framing errors in cases of bit slip.
Some containers are exclusive to audio:
- AIFF (IFF file format, widely used on Mac OS platform)
- WAV (RIFF file format, widely used on Windows platform)
- XMF (Extensible Music Format)
Other containers are exclusive to still images:
- FITS (Flexible Image Transport System) is a wrapper file format for still images, raw data, and associated metadata.
- TIFF (Tagged Image File Format) is a wrapper file format for still images and associated metadata.
Other flexible containers can hold many types of audio and video, as well as other media. The most popular multi-media containers are:
- 3GP (used by many mobile phones; based on the ISO base media file format)
- ANIM Standard multimedia file for digital animations on classical Commodore Amiga line of computers. It follows IFF ILBM main specifications, and it is the first animation format adopted officially by an Operating System.
- ASF (standard container for Microsoft WMA and WMV)
- AVI (the standard Microsoft Windows container, also based on RIFF)
- CDXL (another name of ANIM format), it was the animation file format standard of CDTV and Amiga CD32
- DVR-MS ("Microsoft Digital Video Recording", proprietary video container format developed by Microsoft based on ASF)
- IFF (first platform-independent container format)
- Matroska (MKV) (not standard for any codec or system, as it can hold virtually anything. It is an open standard and open source container format).
- MJ2 - Motion JPEG 2000 file format, based on the ISO base media file format which is defined in MPEG-4 Part 12 and JPEG 2000 Part 12
- MOV (standard QuickTime video container from Apple Inc.)
- MPEG program stream (standard container for MPEG-1 and MPEG-2 elementary streams on reasonably reliable media such as disks; used also on DVD-Video discs)
- MPEG-2 transport stream (TS) (a.k.a. MPEG-TS) (standard container for digital broadcasting and for transportation over unreliable media; used also on Blu-ray Disc Video; typically contains multiple video and audio streams, and an electronic program guide)
- MP4 (standard audio and video container for the MPEG-4 multimedia portfolio, based on the ISO base media file format defined in MPEG-4 Part 12 and JPEG 2000 Part 12)
- Ogg (standard container for Xiph.org audio codec Vorbis and video codec Theora)
- OGM ("Ogg Media", video container for Xiph.org codecs, no longer supported and formally discouraged by Xiph.org[1].)
- RealMedia (standard container for RealVideo and RealAudio)
There are many other container formats, such as NUT, MXF, GXF, ratDVD, SVI, VOB and DivX Media Format
Single coding formats
In addition to pure container formats, which specify only the wrapper but not the coding, a number of file formats specify both a storage layer and the coding, as part of modular design and forward compatibility.
Examples include JPEG File Interchange Format (JFIF) for containing JPEG data, and Portable Network Graphics (PNG).
In principle, coding can be changed while the storage layer is retained; for example, Multiple-image Network Graphics (MNG) uses the PNG container format but provides animation, while JPEG Network Graphics (JNG) puts JPEG encoded data in a PNG container; in both cases however, the different formats have different magic numbers – the format specifies the coding, though a MNG can contain both PNG-encoded images and JPEG-encoded images.
Issues
The differences between various container formats arise from five main issues:
- Popularity; how widely supported a container is.
- Overhead. This is the difference in file-size between two files with the same content in a different container.
- Support for advanced codec functionality. Older formats such as AVI do not support new codec features like B-frames, VBR audio, VFR natively. The format may be "hacked" to add support, but this creates compatibility problems.
- Support for advanced content, such as chapters, subtitles, meta-tags, user-data.
- Support of streaming media
See also
- Comparison of (audio/video) container formats
- Open source codecs and containers
- FFmpeg, cross-platform, open source, audio and video codec suite/library
- List of multimedia (audio/video) codecs
Similar packaging structures
References
This article needs additional citations for verification. (September 2009) |