When people talk about codec, they mostly refer to a computer application that is capable of encoding and/or decoding a digital data stream or signal. Codec is short for ‘coder-decoder’. When it comes to ‘encoding’ video, it actually means compressing it and translating it into a digital form, which are bits and bytes. To view the encoded video, you need the same codec to decode it as what has been used to encode it.
Most codecs require royalties, especially for streaming. Such as H.264 has broad applications and is royalty-based; content distributors need to pay to use it. Some are open source such as Ogg and VP8. There are similarities between VP8 and H.264 that may make one or more patent showdowns inevitable, but those things can be sorted out. There are more: QuickTime is also often seen, and also others such as DIVX, AVI, RealMedia etc.
You may have heard of container and wonder what is. Container is a standard ‘package’ that can contain one or more types of media, possibly in different formats. It is also called a wrapper format is a meta-file format whose specification describes how data and metadata are stored. A program able to identify and open a container file might not be able to decode the contained data. This may be caused by the opening program lacking the required decoding algorithm, or the meta-data not providing enough information.
And now, what’s a Video Format? Video formats are confusing because most video files have at least two different types: the container, and the codec(s) used inside that container. Most common video formats are actually container formats, such as 3G2, AVI,FLV, 3GP, RMVB etc. Since these are container formats, the actual codec contained in the same format can actually be different. Some formats, for example, MPEG-4 can be a container or a codec format. And codecs such as H.264, H 263, VP8 etc. are just real codec formats. For the detailed information of the supported codecs (real video formats and audio formats), you refer to http://en.wikipedia.org/wiki/Comparison_of_container_formats and you can find detailed info there about all popular container video formats.