Snazzi Zone.comEnriching your Digital Lifestyle with Fun & Creativity
Profile | Cool Products | Snazzi* Products | Learning Corner | Forums | Newsletter 
Home :: Learning Corner :: Tips & Tricks


Tip T0012

Codecs and Golden rules of Codecs

Basics

A codec is a "compressor / decompressor", which is where it gets its name from. As the name also suggests, a codec is used to compress and decompress data - in video editing terms, this usually means video information but it can also refer to audio data. Codecs are used because putting raw video information into a file can result in very large file sizes. By compressing the data, the file sizes can be reduced.

A codec is typically used when opening a video file for playback or editing, as the frames must be decompressed before they can be used. Similarly, the compressor must be used when creating a video file to reduce the size of the source video frames to keep the size of the video file to a minimum.

How Does It Work?

When reading an AVI file, the arrangement is:

AVI file -> file reader -> decompressor -> frames

the file reader is usually provided by DirectX or Video for Windows and the codec contains the decompressor.

When writing an AVI file, the arrangement is performed in reverse:

frames -> compressor -> file writer -> AVI file

Installing Codecs

Codecs must be installed correctly into the Windows system. Codecs are usually distributed in DLL files, so that they can be loaded by Windows when they are required. In order for Windows to use a codec, it must know several items of information:

  • Where on the disk it is
  • What type of codec it is
  • What type of files it can open

The first two points are obvious, as Windows must know where to load the codec from and it must know what types of data it can deal with (for example, an audio codec cannot decode video).

Determining which type of file the codec can open is a complex subject. but is tackled in two main ways:

  • Each AVI file is internally labeled with a 4 character code (called the "FOURCC" code) and a codec can associate itself with a particular code.
  • Windows may pass the filename to the codec and ask it directly whether it can open this file. The codec will try to open the file and tell Windows the results of its attempt.


Codec Problems

Common problems with codecs are:

  • Some codecs try to replace the default Windows codecs, but offer worse performance in some areas. For example, some MPEG decoders replace the default Windows MPEG decoder and yet they are much slower for editing.
  • Software based codecs can replace codecs that use decoding hardware on a video capture card, thus slowing down the process of editing or viewing certain files.
  • New versions of codecs can conflict with software that worked fine with older versions.

    You must also ensure that you have the correct codecs available on each machine that you will be using the encoded files with. For example, some video capture cards capture in a special format and require a codec to be installed in order to use these files. If you move one of these encoded AVI files to another PC without this video capture card and codec, you will not be able to use the AVI file.

This can have a more fundamental problems if you choose to upgrade your PC. If you use a video capture card that has its own codec and relies on the capture card's hardware, you must have this card present in order to use any AVI files captured with it. If you choose to upgrade your capture card, these AVI files can no longer be used. Worse still, if you upgrade Windows and you capture card is not supported, these AVI files will become unusable.

Uninstalling a codec can be difficult and depends largely on the installer that added the codec in the first place.

This leads us to some golden rules about codecs.

Golden Rules about Codecs

  • Don't install any more codecs than you have to. The more codecs you have installed, the greater the chance of conflicts. You may have problem uninstalling the codec
  • When creating AVI files for use on multiple platforms, use a standard codec that is present on all the PCs you are likely to use the AVI file on
Your Feedback on Snazzi* Products and this site is valuable to us
Profile | Cool Products | Snazzi* Products | Learning Corner | Forums | Newsletter
© 2002-2006 InfoMax Resources (Pte) Ltd.
Unit 3014A Ubi Road 1 #06-04 Kg Ubi Ind Estate Singapore 408703 408703
Tel: (65) 6391-3088 Fax: (65) 6391-3033
sales@snazzishop.com