FAQ: CODEC's, a Primer
the_wine_snob Jul 31, 2012 2:17 PMCODEC. That term is used a lot, and is often misunderstood. What is it, and why should I care? Well, at the very basic level, a CODEC is a “device,” that is most often a two-way conversion to either encode, or decode a data stream. For a complete discussion on CODEC’s, please see this Wiki-pedia entry.
In video editing, we use these going both ways.
1.) They allow us to playback an AV file.
2.) They allow us to edit an AV file.
3.) They also allow us to encode, for delivery, an AV file.
They are often .dll (Dynamic Link Libraries), or similar, and are usually installed to our computer as both a file, and as a Registry entry, defining the link to that file, the usage of that file and perhaps linking it to another program on our computer, such as an NLE (Non Linear Editor).
Going back to 1.) and 2.), let’s look a bit more closely. Being able to do 1.) does not insure that we can do 2.). Playback of an AV file on our computer is very different than editing that same file. Having the necessary CODEC installed for 1.) does not mean that 2.) logically follows. Also, be aware that some software players contain their own CODEC’s, so playback might well work with that particular software player, yet not another. That is because the first player contains the necessary CODEC, but it is not installed on our system, so it is not available to other players.
Even if we install it, our particular NLE might not be able to work with it for editing. Part of this is often because the AV file is not in an editable form, but in a “delivery-only” form. It can also be an inability for that NLE to use the CODEC, even though properly installed. Some NLE’s are much more lenient regarding certain CODEC’s, especially those designed for delivery. A good example of one of these is the popular DivX CODEC (and it’s open source cousin, Xvid). Some NLE’s can work with this, so long as the proper DivX CODEC is installed on the system. Some NLE’s will almost always exhibit problems. These can be a lack of video display, a lack of audio playback, a lack of both or perhaps OOS (Out Of Sync) issues. This can be confusing, as one might get good results with one NLE, but nothing in another. That is due to differences in how the code for the NLE’s was written.
As mentioned, some CODEC’s are designed for delivery-only. Some can still be edited, but some cannot. It varies greatly, CODEC to CODEC.
Most CODEC’s provide some form of compression, allowing the resultant file sizes to be reduced. Some do more compression, than do others. This compression will usually result in some quality compromise, though not always. There are several “lossless” CODEC’s that just compress elements in the AV file that do not affect the quality of the audio, or the video. Some do compression that only affects these at a minimal level. The DV-AVI Type II, MS DV CODEC is an example of this. There is compression, and a tiny quality loss, but it can usually not be detected, even with a side-by-side comparison. Other CODEC’s, like the MPEG-2 DVD-Video CODEC do affect quality, but does a very efficient job of compression. This is the accepted compression CODEC for DVD-Video. It was determined to be a good compromise between file size and quality, and is written into the DVD-Specs. This is what is inside the .VOB files, that we see on every DVD-Video disc, tucked into the VIDEO_TS folder, that is always present. It is a delivery CODEC, because it does not contain each “frame” in the AV file completely defined. It uses GOP (Group of Pictures), where there are only a certain number of fully defined frames, and in between these will only be difference frames, that are linked back to the last fully defined frame (the I-Frame). If one does a cut between the I-Frames, there is no longer a reference to that previous I-Frame. That is why most NLE’s need to internally generate files (conversions) from the MPEG-2 material. In this generation/conversion, each full frame is defined - they all become I-Frames.
While some might treat CODEC’s like they would a vampire, if one wishes to understand digital video files, they need to educate themselves in the general concept of CODEC’s, and then learn the details on the CODEC’s used by their specific cameras. To not do this would be tantamount to deciding that they did not wish to learn about film ISO, before the digital days. One does not need to do a PhD program in CODEC’s, but learning the concept, the impact and the uses of these will help them get the best possible quality and also editing experience.
Good luck,
Hunt
Message title was edited by: Brett N