Codecs are instructions for “Compressing – Decompressing” or “Coding – Decoding” streams of data. These instructions can be either software or hardware based. Hardware based encoders/decoders are very fast and do not put strain on the CPU. This allows relatively low computing power devices like DVD players and the Raspberry Pi to display full screen videos.
You need to have the right codec installed to view the compressed files, although some programs have codecs built into them.
To find the codec of a file, it is necessary to look at the header information on the file, there are utilities to do this for you.
[kml_flashembed movie="http://www.youtube.com/v/_nPsBwMivCk" width="425" height="344" allowfullscreen="true" fvars="fs=1" /]
Container files contain several compressed files, the header is used to decompress the files. RIFF and MP4 are examples of container files.