Tuesday, 12 June 2012

Codecs and Formats

As a cameraman my only concern was to point and shoot. I had no interest in anything other than putting a tape in my camera and getting the sweetest shots I could get. This was in the old days when we used tape but about 4 years ago I got a HDV camera (still tape) and a imac for editing and I entered a head spinning world of codecs, containers and formats, 4 years on I'm still confused but the confusion is slightly less intense.

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.
The different versions of the Moving Picture Experts Group or MPEG standards makes it very confusing.

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:

  • AVI
  • MP4 and M4V used by apple in iTunes, both containers are the same.
  • MOV created by apple
  • MKV the extension for Matroska
Different containers not only support different codecs but support different features like chapters and subtitles.
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.

Have Fun!!!!!