3

MP4, WMV, AVI, OGG, etc. What are the differences between them, how supported are they in different platforms, and what are the advantages of each one?

1
  • I suggest anybody tackling this question should describe the difference between container file formats and codecs, and not just focus on the different codecs. Sep 20, 2009 at 13:43

3 Answers 3

6

From Wikipedia - Container Formats (digital)


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, which results in difficulties in properly preserving information – notably, Exif photo data is often discarded. 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

See the Comparison of container formats for details regarding these formats.


1

The Wikipedia Video Codec page is where you should start.
You will find specific codec pages linked from there.

The VideoLan documentation on Streaming, Muxers and Codecs is a good place for the basics.

0

Codecs (Xvid, x264 etc.) encode video and/or audio to achieve smaller filesizes. Containers (MP4, MKV etc.) hold video and audio streams in the file. Every digital content is encoded somehow. DVD- and BD-video (and such media formats) use their dedicated codec standards (dedicated by companies which developed them).

Codecs and containers are constantly improved and developed. Codecs get faster and more efficient, while new/improved containers get more features (such as support for multiple audio channels or subtitles which were previously not available).

New codecs and containers spawn rapidly, some are here to stay for a relatevely long time, some are to be forgotten.

If you are deciding to encode video I recommend checking this out:

Video compression / Video codec / Open source codecs

Remember, different devices support different things. It is a whole mess!

Not the answer you're looking for? Browse other questions tagged .