A video/audio file is comprised of three primary things: A container, the codecs, and the video and audio signal. Some people refer to a container as the "format" or the sometimes the file extension. For instance, "AVI" is a container. MPEG2 is a container, QT/Quicktime's "MOV" is a container, and “WMV” is a container. All these "containers" hold the codecs for both the audio and video signal.
So what is a codec? CODEC is a acronym or abbreviation for "COmpressor DECompressor". When you record or encode, transcode or "recompress" a video/audio signal you compress the signal, and when you play it back, you decompress it.
The type of codec you use within the container is also important, especially if you want compatibility between computers or platforms (MAC vs. PC). In other words, not all "containers" or all "codecs" work on all computers.
Choosing a container and a codec is actually pretty easy when you follow these steps.
1. Determine your final product, and what it will playback on.
2. Pick the container
3. Pick the codecs based on the platform or delivery (PC, MAC, DVD, streaming or other personal device), quality of compression, file size and specifications of the format.
For video that you want visitors to your site to watch, FLV or FLash Video is a very popular choice as almost everyone will have Flash installed as part of their browsing setup. Again, the arguments about bitrate, size and quality apply.
A few comparative tables are listed here