I have discovered that Codec stands for compressor/decompressor or code/decode, they are programs that shrink large movie files and makes them playable on your media player. They are designed to speed up the transmission time on the internet then decode the data for viewing or editing. There are hundreds of codecs being used and this leads to a lot of confusion. Some of the more common codecs are:
- FFmpeg includes formats like MPEG2, the format DVD's use and MPEG4, the format used in the iTunes Store.
- DivX, which works with a type of MPEG4 file.
- Xvid, an open source version of DivX.
- x264, compresses H.264 videos popular with HD also known as MPEG4 AVC.
Containers are just that, they contain the video and audio codecs as well as other things like subtitles. This gives you a bit more control, you can compress your audio into an MP3 format for a smaller file or have them uncompressed. Some common containers are:
- MP4 and M4V used by apple in iTunes, both containers are the same.
- MOV created by apple
- MKV the extension for Matroska
This is why sometimes you can have a familiar container but the file won't play because the codec used may not be supported by your player. Some media players like VLC Media Player play almost everything without the need to download codec packs.
Which to use?
These days the DivX and Xvid are popular with standard definition videos but are mostly out dated. H.264 is becoming popular and gives very good quality whereas MPEG4 will compress faster but you do sacrifice quality. I tend to use Quicktime (MOV), as I use Final Cut Pro for editing, or MPEG4 both support high quality H.264 as does Matroska but MKV is not well supported by playback devices but it does support virtually all video and audio formats.
Reference material can be found at wikipedia:
Comparison of video codecs
Comparison of container formats
I don't claim to be an expert so if you have better information please let me know.
If you are looking for a good free video converter I can recommend MPEG STREAMCLIP for mac and PC.