Codecs, the Good, the Bad, and the Ugly

rustier wrote on 2/1/2006, 8:56 AM
For the sake of discussion, I understand that codecs are the software device that manipulates the video or sound, compress, decompress, saute or scramble. I know SVMS, like a child feeding on its mothers breast, prefers the virgin video/audio straight from the firewire. I also know from personal experience that some programs that "claim" they can change or otherwise manipulate a file format don't always live up to the promise. Just because an mpeg "walks like a duck, squawks like a duck - doesn't neccesarily make it a duck" - at least as far as SVMS is concerned. I have seen people come to the forum with problems importing digital video and the solution offered is: oh, you need the mpeg 4 codec, or the Divx codec, or whatever. I know that Sony has improved its repertoire of "codecs" with Version 6, but apparently there is still a need for more. I haven't scoured the manual, or the help files, but I thought I would toss out these questions and see what happens:

1) Do the file (import) formats listed in SVMS directly relate to the codec available in the software? I ask this because I had mpeg issues in version 4 which version 6 seem to fix.

2) I haven't looked that hard but can you pull up a list in the software of the codecs you have (verses the codecs you may need - as is the case for some people)?

3)Is there really such a thing as "good" codecs verses "bad" codecs- or is this a figment of my imagination - and if so, is there a magical list somewhere or must a person rely upon the school of hard knocks to find out what works?

4) When I need quality fresh produce I don't go to the grocery, I go the the stand the farmer has set up at the local swap meet or street corner. Is there a "place" where a person can go to get a "quality" codec that is compatible with SVMS? Or is this just a crap shoot of trial and error?

5) Is there a codec out there that will convert my Vaio PVR video directly into something SVMS can use, or must I resign myself to the tedious and lengthy process of recording, using a 3rd party to strip the extra code out, and then crossing my fingers there are no sync or drop frame issues (which occasionally I have had) when I finally get it into SVMS?

Comments

Myles Strous wrote on 2/1/2006, 6:59 PM
1) As I understand it (not necessarily correct):
The Moving Picture Experts Group (MPEG) have put out a number of standards, known as MPEG-1, MPEG-2, MPEG-4, MPEG-4, MPEG-7, MPEG-2, etc.
The .mpeg (sometimes .mpg or .mpe) file format implements either MPEG-1 (Video CD) or MPEG-2 (DVD) standards. It isn't a container format like AVI, so there shouldn't be any other codecs, just the standard, but there are a number of internal options and settings, and not all software implements the complete standard and all possible variations.
MPEG-4 has been implemented in various codecs for inclusion in container formats such as AVI.

2) Go to the Windows Control Panel, make sure you are in classical view, open up "Sounds and audio devices", look under the Hardware tab, select "Video codecs" from the list, click the Properties button, then select the Properties tab in the box that pops up. Whew. Here's a visual version of that procedure:
http://img230.imageshack.us/my.php?image=codecs6pr.gif

3) My possibly incorrect understanding:

Different vendors and other sources produce competing codecs, and sometimes there isn't a clear difference between them. Which is better will depend on what you are doing, what your needs are, what your material is, what your software and hardware supports, and what your audience will be using, amongst other factors.

Not to mention the hard disk space, proocessing speed, and bandwidth you have available - if these were all magically large enough we might all be able get away with using uncompressed formats.

Your material may also affect what codec you use - for example, live action might get away with compression options that would cause animation quality to deteriorate.

For example, I use the free Lagarith lossless codec (in AVI format) for output from 2D computer animation software, because it's completely lossless for further editing and processing, and it supports an alpha channel for compositing animation or foreground layers against separate background layers - HuffYUV is another codec with similar properties. However, I don't know if this codec would be ideal for live action - it might produce overlarge files or be too slow (too many dropped frames) to use as a capture codec (I haven't used it for this, it might be fine, but these are possibilities).

My final output after compositing (in VMS) will either be a highly compressed codec (possibly Quicktime Sorenson-3) for web output, possibly MPEG for DVD creation (which may change to DivX AVI as more DVD players support this format), or even another codec - for example, perhaps AVI with the old Cinepak codec if I want a friend with a Linux box to see it, who doesn't have the option of Quicktime or some Windows-only AVI codecs, although .mpeg is also a Linux option (as are some other AVI codecs).

Software may not support certain codecs - for example, older VfW(Video for Windows)-based video editors cannot handle DV-AVI type-1, the codec used natively by IEEE 1394 (FireWire) digital video devices such as videocameras, but it can be handled by DirectShow in a direct stream (so you might use this codec when capturing from a digital videocamera, for example, or exporting back to the videocamera after editing).

Hardware and software support used for output (e.g. video iPod, G3 phone) or input (e.g. digital videocamera, analog capture card with built-in hardware encoding chip) may play a part in codec selection if the hardware or support software only supports limited codecs.
For example, I have an analogue capture device that does hardware encoding directly into MPEG-1, MPEG-2, or DivX AVI - this requires less processing power than using the PC and software to capture video in another codec, so I can use it with my lower-CPU-speed laptop. With a more powerful CPU, I could potentially capture in another codec using software encoding. If I just want to burn directly to DVD, I use MPEG-2. If I want to edit and composite, I use the DivX AVI format - partly because (in my limited experience) video editors handle AVI better than MPEG, and partly because (again, in my limited experience) MPEG-2 often doesn't re-compress as well (it uses some lossy techniques to produce better compression for final output).

4) See 3 - what do you want to do with the codec? Ah, partly answered by 5)

5) I'm not familiar with your Vaio PVR - does the hardware encode directly into a codec, or can you vary the codec through capture software? I don't have a lot of experience in capturing video, so I'm not sure i can help with choosing a codec for this purpose.

Regards, Myles.
rustier wrote on 2/1/2006, 9:13 PM
Wow Myles, thanks for the info on codecs. I guess I can postpone using my divining rod and giant salt crystals to sort this stuff out. It does appear to me that there is a lot to learn about codecs - and you obviously know quite a bit more than I do. FYI I have a Sony Vaio with the PVR. It records in a format called DVR-MS which is an mpeg (2 - I think) with some extra data thrown in so that it can do a back flip for you (pause, rewind, etc). There are no options. It is geared for simplicity. The problem with the format besides being "fat" is that most other programs don't want to deal with it. Somebody made a program called dcut and there are some others that strip out the "extra information" so that it looks like a regular mpeg (hopefully) to SVMS and others. It's just a pain to do it and takes time. I know about the ADVC 110 (or 100 used) that by all accounts does a great job of encoding the video. It's just $250 dollars I didn't want to spend just yet. I imagine yours is something similar. Microsoft has a program that converts the PVR format (for $40 bucks) but it has mixed reviews. So where does one go to find out that "Lagarith is lossless (hey I know what that means HuaH!) . . . and supports an alpha channel . . etc.? Is there a resource you could suggest? Oh and thanks for the reminder on finding my codecs list. Sure would be nice if Sony made it easy to import dvr-ms. Thanks again Myles

Russ
Myles Strous wrote on 2/5/2006, 8:30 PM
Hello Russ,

I can't see any way around converting your video using a separate program.

I'm not sure how well VMS will handle the converted file, I haven't used it at all to edit MPEG files as input. Hopefully somebody more experienced will chime in on that. I will say that VMS has been an absolute pleasure to use when working with AVI files.

If you only want to do things like cut out ads and add chapter headings for DVDs, and you don't need to work with any extra layers, effects, or filters, I've heard that VideoRedo is a nice inexpensive MPEG editor - I haven't used it myself yet.
http://www.videoredo.com/ You can download a trial version.
However, VideoReDo is very limited in its functionality - for any significant editing or effects you'll need something like VMS.

http://www.videoredo.com/ProductPlusSpecifications.htm
It apparently works with DVR-MS but support is not official until they fix some sync problems:
http://www.videoredo.com/FAQs/SupportFAQProductFeatures.htm#SupportForDVRMSFiles
I think it can load DVR-MS and output normal MPEG so you can either burn DVDs or put them into something like VMS for further editing.

Google or the the Wikipedia are great for finding things. The Wikipedia codec entry links to some codec lists - http://en.wikipedia.org/wiki/Codec, or search for "codecs" or something like "video codecs" (as opposed to audio codecs) on Google. The Free Codecs site comes up either way: http://www.free-codecs.com/
Another interesting site is Code Central http://www.siggraph.org/education/materials/HyperGraph/video/codecs/Default.htm
Less codecs, but some interesting information on the ones listed.

Regards, Myles.