It’s a subject with widespread confusion often leading to only a partial understanding.
There are file containers, sometimes called wrappers, that wrap around a number of video and audio tracks. Each of those tracks will have an appropriate video or audio codec. A codec is a concatenation of “coder – decoder”. Basically it’s like using a secret code or cryptography: as long as the encoder and the decoder understand each other, we get video and audio back out at the other end.
Think of a shipping container. There’s this standard “wrapper” (the container) which tells us nothing. Inside could be a car, computer or a million wrist watches. Like the shipping container, file containers can carry many different types of content – the video and audio tracks. These tracks are encoded with some sort of codec. Most codecs compress the video to reduce file size and time to download (and to increase field recording times in production), but there are codecs that work with uncompressed video. Every track has to have a codec for video and for audio.
Common containers are QuickTime (which supports over 160 codecs at last count); AVI (which probably supports almost that many) and MPEG-4, which supports only a few codecs, but very versatile ones. Common codecs are “MPEG-4”, “Sorenson”, “H.264”, “Animation”, “Cinepac”, etc. (DivX is it’s own thing, as I’ll explain.)
Most QuickTime codecs are for production purposes. The older QT codecs that were used for .mov on the web have been “deprecated” by Apple. They no longer show up as export options in the default install of QuickTime. Nor should they. They’re way too inefficient by modern standards. The last new QT distribution codec was Sorenson Video 3 in July 2001. In codec terms that’s just a little after the Jurassic era.
AVI has been a workhorse. I refer to it as the Zombie format because Microsoft officially killed it in 1996 (when the last development was done). It is still in use in production on PCs and very popular for distribution on the Internet, with more modern codecs. Most AVI production codecs are specific to their hardware parent. A modern .avi file is likely to be a “DivX” file.
DivX is actually a hybrid of an AVI wrapper with an MPEG-4 Advanced Simple Profile (see later) video codec and an MP3 audio track. This is a bad hybrid of codecs and formats, such that DivX for a while had to have their own player. (MPEG-4 video should go with AAC audio.)
Most often the MPEG-4 codecs are used in the MPEG-4 container. This is a modern, standards-based container not owned by any one company. It is an official International Standards Organization standard. The basic file format was donated by Apple and is heavily based on the QuickTime container, but is NOT the same. You can’t just change the .mov to .mp4 (or reverse) and hope it’ll work. (It will in the QT player but nowhere else.)
The first codec that the Motion Picture Experts Group (a.k.a. MPEG) approved is properly called MPEG-4 Part 2 ‘Simple Profile’ or ‘Advanced Simple Profile’. This was such a great marketing name, that Apple just called it simply “MPEG-4,” thereby creating huge confusion for everyone as the distinction between codec and container was totally blurred! Thanks Apple! Not! Apple only supported Simple Profile; Sorenson and DivX used Advanced Simple Profile and there were components for QuickTime (not made by Apple) that played Advanced Simple Profile MPEG-4 as well as Simple Profile MPEG-4.
DivX uses the Advanced Simple Profile but in an AVI wrapper, as noted above.
Then just a few years ago, the MPEG association approved a new codec, to be used in the same MPEG-4 wrapper, called (in full) MPEG-4 Part 10 the Advanced Video Codec (AVC). The European ITU also supported the same codec independent of MPEG-4 (so it could be used in other wrappers) as H.264. They’re all the MPEG-4 codec that is Part 10, Advanced Video Codec or H.264.
And yes it is possible to put an AVC/H.264 video track in a QT .mov, but that’s a different container and only QT will play it. MPEG-4 is an ISO standard and there are more than 20 player implementations.
It is AVC/H.264 video with AAC audio (the MPEG audio standard) in an MPEG-4 container that is now playable in QuickTime Player, iTunes, on Apple Devices, in 20 standard players and in Flash 9 release 3 or later (9r3 was finalized in Nov 2007 and is now widely installed). Microsoft have also announced support for H.264 MPEG-4 is coming in Silverlight in 2009, and Windows 9 Media Player has support built in for those same files.
3GPP and 3GPP2 cell phone codecs are part of the MPEG-4 family fwiw.
Hope that helps and makes sense.