12 Replies Latest reply: Aug 19, 2011 3:59 PM by the_wine_snob RSS

    FAQ: CODEC's, a Primer

    the_wine_snob Community Member

      CODEC. 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

        • 1. Re: CODEC's a Primer
          CrazyEnigma Community Member

          Posted in wrong thread.

           

          Message was edited by: CrazyEnigma

          • 2. Re: CODEC's a Primer
            the_wine_snob Community Member

            Here is a THREAD on Muvipix, where some more, and useful info on CODEC's is offered.

             

            Hope that it helps,

             

            Hunt

            • 3. Re: CODEC's a Primer
              jwalter5019

              Good info & helpful !

              thanks

              • 4. Re: CODEC's a Primer
                the_wine_snob Community Member

                Thanks to a comment by Steve Grisetti, noted author on video and video editing, I am adding one extra comment.

                 

                When we find the necessary CODEC and install that, there is still no guarantee that it will work in our particular NLE (Non Linear Editor), regardless of its name. There are often different versions and variations of some CODEC's. An example is the H.264 CODEC. There are three popular versions: Apple's, Lead's and MainConcept (plus many others). Some users find that one of those "big-three" work better than the others. This is a case where just having the proper CODEC installed is not enough to insure it working with our NLE. When one installs, what appears to be the correct CODEC, but things still do not work properly, research, and see if there are other versions, from other companies, and try those - one might work much better, than others.

                 

                It's the same with MJPEG, for example, where the one from the camera mfgr. should work fine, but if it gets overwritten by another version, might no longer work. Also, some cameras, that produce MJPEG, do not ship with the mfgr's. CODEC, and one then needs to find one. Two popular ones are Morgan and MainConcept. These almost always work fine with the material, and with Adobe NLE's.

                 

                Also, when checking one's system for CODEC's, there can be times where certain utilities do not accurately report the Adobe CODEC's. This is because Adobe tries to hide theirs, so that other programs have a tough time finding and overwriting them. This ARTICLE will give you more background.

                 

                Also, the CODEC is usually "wrapped" into a common file format, like AVI. This ARTICLE will give you a bit more detail on the "wrappers."

                 

                Hunt

                • 5. Re: CODEC's a Primer
                  the_wine_snob Community Member

                  If your utility reports issues with Adobe CODEC's, be sure to read this ARTICLE for some background.

                   

                  Hunt

                  • 6. Re: CODEC's a Primer
                    THX1142a Community Member

                    This is the kind of information I've been looking for. Thank you VERY much. Oh, and after installing K-lite mega, I'm

                    back where I was before I installed Premiere. That is sort of a good thing. At least I "seem" to have cleaned up the problems I created with everything else trying to get Premiere to work.

                    • 7. Re: CODEC's a Primer
                      the_wine_snob Community Member

                      I am less a fan of CODEC "packs," as many will install a bunch of other "stuff" too. Also, many of the CODEC's are either hacked, or reverse-engineered versions of much better commercial CODEC's. Often, those good commercial ones will be overwritten by the "free" CODEC's. This is one reason that Adobe tries to "hide" their CODEC's, mainly from MainConcept. However, even if the commercial CODEC is not overwritten, the CODECs' priorities can be changed by the CODEC pack in the Registry. This can result in CODEC's that are properly installed, not working, as the system looks elsewhere first.

                       

                      Some have had good results with K-Lite, but others have not been so fortunate. For me, I only install CODEC's, when I need them, and then attempt to go to the source, even if I need to pay $, and there are "free" versions out there. Where possible, I try to go to "the source."

                       

                      Good luck,

                       

                      Hunt

                      • 8. Re: CODEC's a Primer
                        THX1142a Community Member

                        I appreciate the help very much Bill. I get pretty "frank" when I'm upset, and the only thing on this planet that can get me as upset as I was, is computer software. The sad thing is it has been my living since 1983.

                         

                        I've said that if hammers worked like software, when they are defective, they will look fine but when you pound on a nail, nothing happens. No sound, no force of teh hammer hitting the nail. It just "doesn't work". So you're on the roof, nailing shingles down, and suddenly your hammer "doesn't work".

                         

                        But you stuck with me. without throwing it back in my face. Thank you very much.

                         

                        Regarding you post on codecs, "real vs free vs reverse engineered", one of my challenges is this: Regarding acquiring the necessary codecs, I am like a guy that always hated guns, and knows nothing about them, but one day I am mugged and I need a gun. If I go into a store to buy a gun I'm gonna be a bit like the middle eastern store owner in the movie "Crash". I don't even know where to start. And the learning curve may be a bit time consuming and, honestly, I just bought this software because I thought that if Windows movie maker was cool, this would bring it up several levels. I'm finding that I was right about that. What I didn't know was that for the good stuff to work, it is going to require a bit more attention to what's under the hood.

                         

                        But, as I said in one of my first posts, I had to become a DOS memory expert to get Aces Over the Pacific to work when it needed a massive chunk of that 640k. I'll work with this and understand that to get what I want, I'm gonna have to do a little work.

                         

                        Thanks again.

                        • 9. Re: CODEC's a Primer
                          the_wine_snob Community Member

                          For CODEC's, the article, and especially the links contained, is a good starting point. Obviously, it is a simplified overview. One of the main reasons for that is that there are so very many CODEC's out there, and more coming each quarter. Some are just tweaked versions of older, existing CODEC's, but some are brand new. Camera mfgrs. work hard to get higher quality images into smaller spaces. CODEC's allow for that. They may take an existing CODEC and then re-work it to update that one. When they do that, they serve their clients best, by including a copy of that particular version on a utility disc somewhere. Most do, and it may be installed to the system with the camera's driver; it might be a separate install; or it might be as part of a utility, or maybe even an editing program included.

                           

                          Once one has the concept of the CODEC in mind, the next place to turn is a program, like G-Spot, or MediaInfo, to find out what the particular CODEC is, inside the AVI, MOV, WMV, MPEG "wrapper." Armed with the CODEC name, furnished by the utility, then it's off to Google/Bing to find that CODEC. In most CODEC searches, the first dozen hits will be for "free" CODEC's. I usually pass over those quickly, and look for companies, like MainConcept, Lead, Morgan, etc., and then buy what I need from them - on an "as needed" basis. There are exceptions, like the great Lagarith Lossless, and UT, which are free from the authors.

                           

                          Confusion, and consternation can reign, with some CODEC's, like H.264. There are many versions. Three popular versions are from Apple, Lead and MainConcept. All are H.264, but do differ. Many users have had issues with the Apple version (usually at Export, though not always), and have found that one of the other popular versions will work better.

                           

                          To make matters worse, one can look at MP4, which uses H.264, and AVCHD. All AVCHD is MP4, but not all MP4's are AVCHD. It's a sub-set (flavor) of MP4/H.264. And, just to confuse things, see the paragraph the precedes this one!

                           

                          While CODEC's ARE the building blocks of AV files, they are constantly changing, with new ones replacing older popular ones, or, like in the case of MJPEG, older ones getting new life, because some camera mfgr. decided to work with it.

                           

                          The "concept" is the important part - the rest requires a file info utility and then time with Google.

                           

                          Hunt

                          • 10. Re: CODEC's a Primer
                            the_wine_snob Community Member

                            For CODEC recs. for AfterEffects, see Todd's ARTICLE.

                             

                            Hope that this helps,

                             

                            Hunt

                            • 11. Re: CODEC's a Primer
                              WebTeacher17601 Community Member

                              ACK!

                               

                              The plural of CODEC is CODECs.

                               

                              CODEC's is either possessive, as in "I discovered the codec's specification."

                              or

                              a contraction with "is", as in "That codec's giving me heartburn."

                              • 12. Re: CODEC's a Primer
                                the_wine_snob Community Member

                                When one has something like an acronym, the apostrophe and s, shows the plural of that acronym. It becomes a contraction.

                                 

                                Thanks,

                                 

                                Hunt