>Video Codec Advice

>I’ve been posting a lot at Adobe Forums: After Effects lately, after I unexpectedly was asked to become an Adobe Community Expert. I just thought I’d share a reply I just made to a question about how to avoid quality reduction while rendering and moving video between applications. Perhaps I’ll make a small table listing the codec options and their advantages/disadvantages, if you post a couple of nice comments! :-)

Both AVIs and QuickTimes can be “uncompressed” but the file sizes are huge! In the case of AVIs, the only advantage is that “uncompressed” is the old AVI format that supports an alpha channel.

Better is to use lossless codecs such as QuickTime Animation: Best and QuickTime PNG: Best which have so called “RLE” compression just like ZIP files, which has no quality-loss whatsoever, but still manages to shrink the file sizes considerably. Both these codecs also support alpha channel, but only QT PNG supports 16-bit.

There are several third-party QuickTimes codecs such as the BlackMagic Design‘s codec that also have similiar options, but they need to be installed separately on every machine.

For really small but almost lossless renderings, I normally use QuickTime PhotoJPEG: Best which is a standard 8-bit QT codec that has been around for a long time. At 100% quality very few pixel values are changed at all, making it virtually lossless.

The other alternative is to render to file sequences such as TIFF, SGI or TGA. This has several advantages, but unfortunately file sizes is not one of them. However, they are great for multi-machine renderings and if you need to re-render parts of your video it’s easy just to replace just those frames. Also, it’s easier to split up large renderings across DVDs, CDs and portable disks since you don’t have to split up a huge video file, you can just copy all the frames that fit on to every disk. Network transfer speeds are lower for file sequences because every file has more over-head and many network protocols start out by only sending small chunks and only increase the packet size if the initial transfer was OK. Remember that if you have sound, you’ll need to render that separately to an audio file if you use file sequences.

One file sequence format to avoid (unfortunately) is PNG since it has cross-plattform and cross-application problems with gamma-shifting. The options in the PNG file format let applications enter gamma values into the file, which are only read by some other apps, resulting in shifts, so you should unfortunately avoid PNG sequences.

- Jonas

9 Responses to >Video Codec Advice

  1. Mike Curtis

    >Stu over on ProLost posted a link to some doohickey that helped address the PNG gamma issue, but I don’t recall it off the top of my head.


  2. Allan White

    >I hadn’t considered QT PNG – a great idea.

    Don’t forget Sheer’s lossless codec as well, which I hear is pretty good. Same annoyance as the Blackmagic, of course: distribution to all machines is necessary. Oh, and you have to pay for a writable version (read-only is free, I guess).

    Anyone have any experience with JPEG-2000 as a video codec? It should be lossless, but compressed; I don’t know about alpha, but it should have 16-bit support. Data rates would be super-high but I wonder if it could be the poor man’s SheerVideo codec.

  3. Bruce Allen

    >If you set Filter to None on the QT PNGs, they compress faster (but files are bigger). This was more useful a few years ago when PCs were slower…

    I’ve been happily using QT PNGs (for their combination of universal compatibility and small file sizes) for several years on music videos, HD promos, broadcast work, short films, etc. Great format.


  4. Joakim Lindén

    >Nice insights there guys! …and I’ve always rendered out stuff as png sequences.

    I guess it’s high time to dig deep into the various options of the QuickTime encoding toolbox.


    - Joakim Lindén

  5. Laban

    >Hi Jonas,
    I’m quite a beginner in all this but I try to catch up as much as possible.
    I would greatly appreciate if you could make that table of compression formats that you talked about. It’d be great.

    Also, I’m interested to know how your workflow with rendering, compression etc is handled at SVT for instance. What formats of compression do you use? How big are the files/time etc.
    Thanks for any info on this.

  6. Anonymous

    >I think the “Gamma Slamma” and “PNGCRUSH” are the apps mentioned in Stu’s ProLost column.

    Great blog, btw

  7. scot

    >Hello Jonas,
    I have quick (hopefully) question about 3rd party codecs for AE…
    I’m doing alot of client presentations, about 2 minutes in length, using jpg images w/ very little effects & music…
    Can you recommend the best codec to install for shrinking these down to a manageable size for sharing w/ people…right now they’re all about 200-300megs.
    Thanks so much!
    look forward to a solution

  8. Eric Woods

    >This is one of the best summaries I've seen.

    There are also QT TGA and QT TIFF – any thoughts on those?

    I found JPG2000 can do alpha, seemed quite good, don't know about lossless or "Millions of Colours+".

  9. Eric Woods

    >My summary, if it helps:

    - AVI Uncompressed: huge, but supports alpha.
    - QT Uncompressed: huge
    - QT Animation: pretty big. Has RLE compression. 8-bit?
    - QT PNG: smaller? Has RLE compression. 16-bit (only one?)
    - QT TGA: No info
    - QT TIFF: No info
    - QT PhotoJPEG: very small. At 100% is virtually lossless.
    - QT JPEG2000: Not mentioned.
    - third-party codecs – too much hassle and risk.
    - TGA: Bigger.
    - TIFF: Bigger.
    - PNG: Bigger? Avoid – has cross-plattform and cross-application problems with gamma-shifting.
    – Stu's ProLost column mentions tools to help with this problem: "Gamma Slamma" and "PNGCRUSH"

    Video Advantages:
    - Easier to handle
    - Audio is embedded
    - Smaller sizes
    - Network transfer speeds are faster
    - More portable – Can use in more apps
    Sequences Advantages:
    - Render farms
    - Easier to re-render parts
    - Easier to split up large renders across discs etc