13 Replies Latest reply on Dec 4, 2009 12:19 PM by Ed.Macke

    Codec Best Practices

    Ed.Macke Level 3

      So far, I've been using whatever codecs happen to be installed on my box (XP Pro SP3, PRE7, more...).

      But a recent thread with Hunt, et. al. got me to wondering: is there a better way, or am I fine with what I have?

      Do people have any suggestions for better codecs than the "usual". Free would definitely be good, but I would pay if it made a noticeable difference, not just theoretical.

      Background:

      • I'm a complete noob when it comes to codecs. I'm not even sure when they are used, how to install/use/control/orgranize, etc.
      • Source video is SD from a Sony Handycam. Firewire + SceneAlyzerLive for capture.
      • During editing, I will File > Export to "Microsoft DV AVI". These .avi files will be pulled into a final, master project.
      • Depending on need, Master project can be:
      • Burned to DVD (Burn to folder, ImgBurn to create DVD)
      • Exported for YouTube
      • Exported for Facebook
      • Exported for iPod
        • 1. Re: Codec Best Practices
          the_wine_snob Level 9

          Ed,

           

          The choices of CODEC will most often be dictated on the actual use/need.

           

          For Export, prior to Importing into a "master" Project, for my SD material, I would use DV-AVI Type II w/ 48KHz 16-bit PCM/WAV

           

          For going to DVD-Video, the MainConcept MPEG-2 is a good one. Some like the MPEG-2 from ProCoder, but it's pretty expensive. For DVD-Video, I normally Export from PrPro as elemental streams, i.e. DV-AVI Video-only and AC3 (as I normally work in DD 5.1 SS) Audio-only. I then Import into Encore, my authoring program, and let it use the MainConcept MPEG-2 CODEC to burn to DVD-Video.

           

          If I need to do an intermediate Export, say for work in AfterEffects, I use the Lagarith Lossless CODEC.

           

          I have not done any YouTube, but many feel that FLV, or H.264, are the best CODEC's/types of files. I have done FLV's, for other purposes.

           

          For some PowerPoint presentations, I have used the .WMV - 9 CODEC. Many feel that Windows Media Encoder does a better job of this, than any of the Adobe programs. I have not tested, but just used it, and the result for streaming media was very good.

           

          Now, I have more CODEC's, but most are for converting from those to DV-AVI, or similar. On my workstation, I have a total of 339. On my laptop, a total of 223. Again, most are for conversions and NOT for Export. These include all Video and Audio CODEC's.

           

          Beyond the ones, normally installed by Adobe, MS, or a few trusted players (oh, there might be a few more from other NLE's), the only four that I would recommend would be:

           

          DivX (playing and converting from this CODEC - Note: Xvid is the open source version, but the two are usually overlapping)

          Lagarith Lossless

          H.264 (many feel that the MainConcept is better than the free Apple one, that is installed with QT Player)

          MJPEG (most point to either the Morgan, or the MainConcept as being the best)

           

          Now, I am a big believer in buying (or getting free) from the source, and not some hacked, reverse-engineered versions. I do not advocate any CODEC "packs," other than the MS Vista CODEC pack. I get only what I need, and install them, when I need them.

           

          That's just my take on CODEC's.

           

          Hunt

           

          PS - I'll be very interested in what others think on this subject.

          • 2. Re: Codec Best Practices
            Steve Grisetti Adobe Community Professional

            I don't recommend chasing codecs and trying to install every possible codec on your machine so that you can play and work with every possible video

            file. You can screw things up doing that if one codec replaces or contradicts another.

             

            But I do like the K-Lite Codec Pack. It's worth installing because it gives you a nice pack of codecs to work with (sometimes extending the versatility of programs like Premiere Elements) .

            • 3. Re: Codec Best Practices
              the_wine_snob Level 9

              One on the included modules in K-Lite is FFDShow. Unless things have changed, it is pretty much installed by default, and can help playing some footage, but has been traced to giving later versions of Adobe programs fits. With about PrPro 1.0 (also seen as Pr & PrPro 7 in some markets), Adobe went away from DirectShow, in favor of their own display engine. At about that time, FFDShow began to show up as the source of many problems. Also, once installed, FFDShow seems tough to wipe from a system.

               

              I'd hold off on installing that one. One does get G-Spot (not sure if its the latest version, that does better with MPEG's, MOV's and WMV's), and a few other utilities, and it seems that the actual CODEC's are pretty benign for free ones.

               

              Just my observations,

               

              Hunt

              • 4. Re: Codec Best Practices
                Ed.Macke Level 3

                Attempting to do a little research on the info above.

                 

                At first I was confused because I assumed an codec would do what its name implies: coding and decoding. So, for example, a DV-AVI codec would both decode (read) DV-AVI and code/encode (write) DV-AVI.

                 

                But it appears that the codec creators definitely separate the "co" from the "dec". For example, the K-Lite Full Codec Pack has some components specified as decoders (e.g. XVid and MPEG-2), others don't specifically say whether they are coders, decoders, or both (e.g. ffdshow and DirectVobSub), and I don't see any references to just coders.

                 

                So, now that I know a little more, let me narrow down my question.

                 

                The first part is when I'm importing. This is where the decoder comes into play, correct?

                 

                So if I'm using Firewire/ScenealyzerLive to capture my MiniDV, can I specify which decoder to use, and more importantly - if I could, would it make a difference? Would "Joe's" decoder be better than "Jim's" decoder?

                 

                The next part is export. This is where the coder (or encoder) comes into play, correct?

                 

                I'm guessing this is more where Joe's and Jim's products could differ?

                • 5. Re: Codec Best Practices
                  the_wine_snob Level 9
                  The first part is when I'm importing. This is where the decoder comes into play, correct?

                   

                   

                  Close, but not quite. During Capture, PrE sets the Encoder to use - the DV CODEC in this case. PrE will use the MS DV CODEC for this operation. Now, Importing is different. These files have already been encoded by some CODEC. PrE will use this to decode that file, and will then index it to get it into a non-GOP format, DV-AVI, so that you can edit at a Frame-level.

                   

                   

                  So if I'm using Firewire/ScenealyzerLive to capture my MiniDV, can I specify which decoder to use, and more importantly - if I could, would it make a difference? Would "Joe's" decoder be better than "Jim's" decoder?

                   

                  PrE is designed to use the MS DV CODEC for SD material at Capture. You cannot, nor would you want to, change this in any way. The choice of CODEC comes with Export, not Capture, or Import (somewhat similar, but different operations). The Joe's vs Jim's is another good question. There are several file formats, where one has a choice of the exact CODEC. It might have the same name, but each can work better, or worse, in a particular instance. A good example is H.264. There are three very popular versions available (many more down the list), Apple, MainConcept and Lead. For some, the MainConcept works best, while others have better Export with one of the other two.

                   

                  Another good example is the MPEG-2 DVD CODEC. Many feel that the one in HC Encoder, or ProCoder, are much better than the MainConcept one, used in PrE and PrPro. Same CODEC and to the same strict DVD-Video specs., but with different results. MainConcept's is free and installed with the NLE, while the others cost money,and are used in stand-alone mode, IIRC. Joe's just might blow the doors off of Jim's, but only testing will tell you, based on your material.

                   

                  The next part is export. This is where the coder (or encoder) comes into play, correct?

                   

                  Absolutely. PrE can use many, properly installed CODEC's, whether it shipped with them, and installed them, or they were added by the user. The Lagarith Lossless CODEC is a perfect example. It neither ships with, nor is installed by PrE. I installed it separately, but PrE can use it. That is not true for all CODEC's. Some, need to be called and used from either a plug-in, or free-standing encoder. DivX is a good example of this. PrE cannot encode directly to this CODEC. The de portion of this CODEC is used to play a previously encoded file. While your system, with the proper CODEC's can play the file, this does not mean that PrE can edit with it. There are major differences between play and edit. FWIW, PrPro CAN use my DivX CODEC to encode upon Export, but my PrE 4 cannot use it. Not sure of the reasons for this, especially as DivX is more a consumer CODEC, and less of a pro CODEC. Odd? Yes, but that is the way that it is. The Xvid CODEC is the open-source version of DivX.

                   

                  An example of a plug-in working with a CODEC, that the NLE program cannot, is the SurCode AC3 DD 5.1 SS CODEC. I bought the SurCode plug-in for PrPro, so that I could Export Audio as an AC3 DD 5.1 SS. Without that plug-in, it's no-go. My SurCode DTS encoder is not launched via a plug-in, but as a stand-alone program. I Export as 6 discrete mono PCM/WAV files and then Import them into the SurCode encoding program. It Exports a DTS stream, that I can add to my DVD-Videos - as a supplementary Audio stream, since the DVD-specs. only allow for PCM, or AC3 DD (stereo, or 5.1 SS) to be a primary Audio stream. I have to either do a Menu for the supplementary DTS Audio stream, or tell the user to use the Audio button on their remote. I always do the Menu.

                   

                  The subject of CODEC's is a very involved and convoluted, as you have found out. Along the way, there are exceptions, again as you have found out. At the most base level, a CODEC is an encoder/decoder. Whether both ends will work fine depends on so many aspects, the least of which is how they work, or do not work, in an editing program. You almost have to take them on a case-by-case basis.

                   

                  Also, with packs, like K-Lite, is that there is much more "stuff" in there, and most gets installed along with some CODEC's. One of the issues that I have with these is that most of the CODEC's are:

                   

                  1.) obsolete (been replaced by newer, better ones)

                   

                  2.) hacked, or reverse-engineered versions of proper CODEC's (many free, and many for pay)

                   

                  3.) pretty much useless for average work. At the best, they just fill up the Registry, and at the worst, they get in the way of useful CODEC's

                   

                  4.) often, some of these CODEC's will overwrite, delete or alter the operation of good, necessary CODEC's. That is one reason that Adobe "hides" its MainConcept CODEC's, though their priority can be changed in the Registry by the rogue CODEC's. If you use G-Spot to search your system for CODEC's, it will report that there is a problem with all of the Adobe MainConcept CODEC's. This is a false-positive, and is due to Adobe hiding these from harm. Sherlock the CODEC Detective will yield the same report.

                   

                  To me, the only good thing about K-Lite, and most others, is that they usually contain G-Spot, that wonderful AV file utility. However, the version included is usually many years old, where there is a new, updated, free version on www.headbands.com/gspot.

                   

                  In case you cannot tell, I am not the fan of CODEC packs, that many others are.

                   

                  You mention FFDShow. It has been traced to myriad problems with playback in PrPro, and AfterEffects. I do not recall any issues with PrE, but might have missed them, or they were never diagnosed as being attributable to FFDShow.

                   

                  Just some thoughts, and continue your quest for knowledge,

                   

                  Hunt

                   

                  Message was edited by: the_wine_snob - Added the Joe's & Jim's lines.

                  • 6. Re: Codec Best Practices
                    the_wine_snob Level 9

                    Here's a very recent THREAD, where FFDShow was the culprit.

                     

                    Hunt

                    • 7. Re: Codec Best Practices
                      Ed.Macke Level 3

                      Hunt,


                      As always, thanks for the very helpful detailed answer! I didn't know how much I didn't know...

                       

                      During Capture, PrE sets the Encoder to use - the DV CODEC in this case

                      I'm using ScenealyserLive for Capture, not PrE. But I'll assume the same rules would apply?

                       

                      PrE [or Scenealyzer or WinDV?] will use the MS DV CODEC for [Capture]

                       

                      Ah!


                      I thought the capture was just copying what was on my miniDV tape to my HDD, i.e. the miniDV data stream was encoded as DV-AVI and the capture process just created .AVI file(s) on my computer.


                      But what you're saying is that the capture software has to read the miniDV data stream, but to create the .AVI file it has to use an encoder? Am I understanding correctly?

                       

                      index it to get it into a non-GOP format, DV-AVI

                      Say what?


                      Scenealyzer, my capture tool of choice, creates files with an .AVI suffix. I always assumed that meant it was a DV-AVI file.

                       

                      But that doesn't make sense if you're saying PrE has to do something to the incoming .AVI file to get DV-AVI.

                       

                      Does this get into the difference between DV, DV-AVI, and other AVI subformats?

                       

                      You almost have to take [the codecs] on a case-by-case basis.


                      That was kind of why I started this thread - I assumed that there were a wide range of codecs available - from "useless" to "fantastic" - and I figured the brainiacs on this forum would know!


                      What I didn't know what that, as you pointed out, that the codec topic was so involved and convoluted. I think that makes the case-by-case thing even truer than I suspected!


                      OK, let's see if I can summarize:

                      • For capture/import, there's nothing to change, and no reason to.
                      • For DVD creation, PrE uses the MainConcept encoder which is OK, but HC Encoder or ProCoder would probably give better results (for a price). DVD is what I do most of the time, so this may be worth investigating. This encoder would only come into play during the "Burn to Folder" stage, correct (which as you may recall I do instead of "Burn to DVD")?
                      • For H.264 creation, PrE used the MainConcept which is good. Apple or Lead encoders might be better (or... might not)


                      What about FLV (Flash) exports? Any codec recommendations for that? It's about the only other format I export (for YouTube and Facebook). Or is there a better format for that (e.g export to WMV and let YouTube/Facebook do the conversion)?

                      • 8. Re: Codec Best Practices
                        Ed.Macke Level 3
                        Many feel that the one in HC Encoder, or ProCoder, are much better than the MainConcept one, used in PrE and PrPro.

                        After a little research..


                        HC Encoder appears to be freeware from www.bitburners.com. Appears to be a standalone program, but it only accepts D2V and AVS inputs - not sure what those would be. Produces M2V output.


                        The ProCoder looks like it would take DV-AVI as input, so that's good.  I saw mentioned an "Express" version for $60, but I can't find it on the current website.


                        One thing I don't understand is how a standalone program would fit into my workflow. Currently, my last step is to take my multiple exported DV-AVI files, bring them all into a final master project, create the menus / menu markers, and burn to a folder.


                        I get the feeling that with a standalone, my master project would be to export the entire movie as one, big exported file (DV-AVI?). I'd then use a standalone encoder to create an MPEG-2 file. But then how do I get the menus / menu markers, etc, and burn to a DVD?


                        In the meantime, are there any tweaks I can do to the built-in PrE DVD encoder - either through the export dialog or other ways?

                        • 9. Re: Codec Best Practices
                          the_wine_snob Level 9
                          I thought the capture was just copying what was on my miniDV tape to my HDD, i.e. the miniDV data stream was encoded as DV-AVI and the capture process just created .AVI file(s) on my computer.

                           

                          I think that I probably misstated this aspect a bit. The Capture from miniDV tape is a bit-for-bit transfer of the data. All encoding is done to get the files open in the NLE.

                           

                           

                          index it to get it into a non-GOP format, DV-AVI

                          Say what?

                           

                           

                          With non I-frame formats/CODEC's, there is only a complete Frame about every 15-18 "frames." (Varies by exact format/CODEC.). The "frames" in between are "difference frames," and only contain info on what has changed, since the last I-frame. Obviously, if you cut in the middle of these "difference frames," there would be no reference I-frame to work from. This is GOP (Group of Pictures), and is most often seen in more heavily compressed formats, like MPEG. To allow editing at a Frame-by-Frame basis, the NLE must convert all of the "difference frames" into full I-frames. That is why the file sizes between a movie in MPEG-2 format vs the same movie in DV-AVI is go different - the DV-AVI will be much larger, because it has all of the Frames (I-frames), while the MPEG-2 has some I-frames, but mostly "difference frames."

                           

                          Here's an example of the two:

                          GOP_Example_01.jpg

                           

                          Hope that this helps,

                           

                          Hunt

                          • 10. Re: Codec Best Practices
                            the_wine_snob Level 9
                            What about FLV (Flash) exports? Any codec recommendations for that? It's about the only other format I export (for YouTube and Facebook). Or is there a better format for that (e.g export to WMV and let YouTube/Facebook do the conversion)?

                             

                            There are differences in the choices for FLV, but not that many choices BETWEEN the encoders. Many like the F4V encoder (think it is a stand-alone only, but could be a plug-in), over anything in Adobe NLE's. Moyea also has a Flash encoder (and an editing program), but I have never used it. I usually use the Flash8 - High Quality (700kbps) in PrPro, and it uses the On2VP6 CODEC.

                             

                            I do not do much Flash Export, though I do some construction in Adobe Flash for Web material, but these are interactive animations.

                             

                            Maybe others have some direct info for you.

                             

                            Good luck,

                             

                            Hunt

                            • 11. Re: Codec Best Practices
                              the_wine_snob Level 9

                              Adobe also has Sorenson Spark, but I do not know of anybody using that CODEC for Flash work.

                               

                              Hunt

                              • 12. Re: Codec Best Practices
                                the_wine_snob Level 9

                                I've not used either the HCencoder, or ProCoder, so cannot comment on their operation - sorry.

                                 

                                One thing I don't understand is how a standalone program would fit into my workflow. Currently, my last step is to take my multiple exported DV-AVI files, bring them all into a final master project, create the menus / menu markers, and burn to a folder.

                                 

                                An example of this workflow is typified by my production of DTS Audio for a DVD-Video. I take my Audio Mix from PrPro, and Export just that Audio as a compound .WMA Audio file. This has all six channels (from PrPro) in it. I Import that .WMA into Adobe Audition, where I tweak it as needed, and then Export form Audition as six discrete PCM/WAV files, located on the "audio stage" via the controls in Audition. I then Import these six WAV files into my SurCode DTS encoder, where it encodes them into a DTS Audio Stream for Import into Encore (as a secondary Audio Stream) for authoring and burning to a DVD-Video.

                                 

                                Another example would be if one needed to deliver a DivX encoded .AVI file. PrE will not allow this, even if one has the DivX CODEC (PrPro will), so one would Export a DV-AVI, like normal, and then in the DivX Encoder (about US$40), for the encoding and Export as a DivX encoded .AVI.

                                 

                                Same thing if one needed to do additional processing, outside their NLE of choice. They Export, and then Import. They process and then Export again. When I'm doing much of this, I try to use the Lagarith Lossless CODEC for my intermediate file. However, both the original NLE and the next-step processor, must be able to handle the Lagarith Lossless CODEC. PrE can do this. It will depend on the second processor. If it can handle that CODEC, that's the one that I will use.

                                 

                                I get the feeling that with a standalone, my master project would be to export the entire movie as one, big exported file (DV-AVI?). I'd then use a standalone encoder to create an MPEG-2 file. But then how do I get the menus / menu markers, etc, and burn to a DVD?

                                 

                                That is correct. I also do similar with Projects, where I need to do my Audio scoring in Sonicfire Pro. I edit my Project, until complete. I Export a "reference" AV and Import that into Sonicfire Pro. There, I score the soundtrack completely, and Export just this soundtrack for Import into my NLE. Since I'm working in DV-AVI, that is the format that I use, even though I do not need that quality of both Video & Audio in this reference footage. I have found that it is quicker, than changing the quality down, and using some other format, as far as pure Export time is concerned. Once the Sonicfire Pro end of the Project is done, and it's WAV is Exported, I just delete the reference file, as I need to combine the material on my Timeline with the .WAV soundtrack from Sonicfire Pro. Then, I Export the full movie to the necessary format/CODEC - usually DV-AVI for DVD-Videos, authored in Encore. [I can't wait until Sonicfire Pro is a plug-in for PrPro, like it now is for Final Cut Pro. That will save the reference file.]

                                 

                                Hope that this helps,

                                 

                                Hunt

                                • 13. Re: Codec Best Practices
                                  Ed.Macke Level 3

                                  Hunt,


                                  All of this helps hugely. When I started the thread, I knew virtually nothing, and now I feel like I know enough to be dangerous!


                                  I'll continue to investigate the DVD MPEG-2 encoders. I'd love if they had trial versions, where I could see exactly what, if any, difference it made to my final product.


                                  I'll look at the FLV encoders, as well, although my Flash exports are pretty few and far between.


                                  Thanks again!!