Digital Video and Codecs

Digital Video formats are confusing because most video files consist of two separate elements: the container, and the codec(s) used inside that container.

To make life even more confusing, some names, such as "mpeg-4", describe both a codec and a container, so it's not always clear from context which is being used. You could have a movie encoded with an mpeg-4 codec inside an avi container, for example, or a movie encoded with the Sorenson codec inside an mpeg-4 container.

What is a Codec?

A codec is a compression algorithm, used to reduce the size of a stream. This means a mathematical way of reducing the file size through taking part and discarding other parts of the information. There are audio codecs and video codecs. MPEG-1, MPEG-2, MPEG-4, Vorbis, DivX, ... are codecs.

What is a video container format ?

The container describes the structure of the file: where the various pieces are stored, how they are made (interleaved), and which codecs are used by which pieces. It will probably specify an audio as well as a video codec. It is something that carries all of the information that tells the computer how to read the file. AVI, Ogg, MOV, ASF, MP4 ... are container formats.

Common Container Formats

AVI (.avi):

Most commonly contains M-JPEG (especially from digital cameras?) or DivX (for whole movies), but can contain nearly any format (not Sorenson).  Sometimes you'll see a reference to the "fourcc": this is a four-character code (such as "divx" or "mjpg") inside the AVI container which specifies which video codec is being used.

Quicktime:

Carries the widest range of codecs and can be played across platforms using Quicktime player. Also a version on Linux called Quicktime for Linux.

ASF ("Advanced Streaming Format", .asf):

Used to contain wmv files in a variety of codecs. Wraps various content bitstreams; data types can include audio, video, script command, JPEG-compressed still images, binary, and other streams defined by developers.

Common Codecs:

Mpeg (mpg)("Moving Pictures Expert Group").

A compression that uses key frames within the coded footage, and then asks the computer to work it out between the key frames. There are 3 different types of Mpeg_ MPEG 1 (mpg), MPEG 2 (m2v) and MPEG 4 (mp4). Mpeg is also a container as well as a codec.

MPEG 1 (mpg):

Old, supported by everything (at least up to 352x240). Encoding for compressed video bitstreams. Can have accompanying audio within the file and is the most widely read, and most common video file available on the internet. This is probably because it is older and is therefor compatible with older machines and operating systems.

Mpeg2 (m2v):

A good quality compression codec... this is what is used for DVD. Encoding for compressed video and audio data multiplexed with signaling information in a serial bistream (separate audio and video streams).

Mpeg4 (mp4)video

A good quality compression that uses the mpeg idea to produce excellent results for compressing raw video into manageable files for use as both video(television) and on the internet. The quality depends on the quality you set. Audio accompanies the video file stream! Works in a more complex manner than the other two mpeg file formats and is also supported by its own container format hence mpeg4 can mean both codec and container.

DivX:

Compression codec widely used for the dissemination of video over the web. Compresses video down to very small file sizes- excellent for web use but loses quality that can be not so good for viewing on televisions. Bitstream encoding as based on the MPEG-4 standard.

X vid:

Closely related to DivX but less widely used.

Ogg Theora:

Open source codec that provides a viable alternative to Mpeg formats. This seems to give very good quality video at small file sizes yet relies heavily on the power of the reading processor.

Vp3:

Similar to ogg theora but allegedly not as good (according to James!) Has recently been included into Quicktime, although i am yet to discover this for certain.

Avi:

An AVI (Audio Video Interleaved) file is a sound and motion picture file that conforms to the Microsoft Windows Resource Interchange File Format (RIFF) specification. AVI files (which end with an .avi extension) require a special player that may be included with your Web browser or may require downloading. A file format that wraps a video bitstream with other data chunks, e.g., audio.

WMV ("Windows Media Video"):

A collection of Microsoft proprietary video codecs. Since version 7, it has used a special version of MPEG4. Basically this is a windows video file made for the single use on windows media player. File format based in ASF (Advanced Systems Format) that wraps a video bitstream.

.mov

This is a Quicktime file but can be compressed using a variety of different compressions such as mpeg. This is a container format!

.dv

Raw digital video.

.rm (.ram)

A codec developed by Real Networks for streaming video and audio.  Also a container. Can only be read using Real media Player.

MJPEG ("Motion JPEG"):

A codec consisting of a stream of JPEG images.  Common in video from digital cameras, and a reasonable format for editing videos, but it doesn't compress well, so it's not good for web distribution.

Sorenson 3:

Bitstream encoding. Sorenson produces software that offers other (or related) codecs for formats including Macromedia Flash video (FLV and SWF) and WMV (Windows Media Video). Macromedia literature states that the FLV/SWF variant of Sorenson is related to ITU-T H.263. (often used inside a quicktime container).

RP9:

A very efficient streaming proprietary codec from Real (not MPEG4).

Dirac:

A very new open format under development by the BBC.

Useful Links

http://www.afterdawn.com/glossary/ An excellent review of lots of file types.

http://www.digitalpreservation.gov/formats/fdd/video_fdd.shtml A detailed list of files and what they do.

http://www.itl.nist.gov/div895/isis/filetypes.html An overview of all kinds of file types and suffixes.

Home Digital Video Video Codec Animated Gifs