Essential Video Format Knowledge for CG Artists

As a CG artist, you’ll often come across various video formats. You’ll need some of them for physical distribution, some for high-fidelity storage, and others for Internet streaming. Knowing which formats to use is important, since some formats do a better job in certain domains than others. In this post I’ll provide a short introduction to the most important file formats used among CG artists and explain which format is best suited for distribution and publishing. I’ll also talk about compression and some of the most popular codecs.

Containers

.AVI

avi
The Audio Video Interleave format is the most common format employed on Windows workstations. It’s important to understand that AVI files are containers that employ a particular codec to encode video data. There is a very large number of codecs out there (here’s a list) and you need a particular codec to play an AVI file containing a video encoded with that codec. For this reason, distributing AVIs across a heterogeneous population of PCs for playback is a bad idea. The default codecs that come with Windows are poorly suited to encode modern CG animation, so about the only use AVIs have is packaging uncompressed frames into one file.

.MOV

This is Apple’s QuickTime file format. Just like AVI files, it’s a container, however unlike AVI containers, QuickTime files usually are playable across different systems without any effort on the user’s part. QuickTime also contains more codecs by default, making it a safer and better-looking alternative to AVI streams. Nevertheless, it’s a bad idea to publish MOV files in an environment where a PC may exist. QuickTime is deployed haphazardly and it’s a good bet that some users looking at your video will either see nothing or an enormous green screen (if their QT isn’t up to date).

.FLV

Flash Video is the format of choice nowadays for web video distribution. Like AVIs and MOVs, it’s a container format, but with much fewer codecs than either of the big formats. It’s most widely deployed as a file loaded by an Adobe Flash player. Though FLVs can contain high-fidelity video data, it’s best not to use them as your storage format. Support across platforms is spotty and there are significant limits to the container.

.MP4

mp4
MP4 files serve as containers for MPEG-4 streams. Due to the widespread support for the MP4 container, from iPods to VLC to iTunes and Windows Media Player, it is preferable to all the aforementioned containers (at least until open source containers like OGG and Matroska garner as much support). Distributing your work in the MP4 format ensures both high fidelity, versatility (MP4 files can be streamed), and modern features that are poorly implemented or just nonexistent in other container formats.

Codecs

Uncompressed/Lossless

There is a qualitative difference between uncompressed video and video encoded with a lossless codec, but to the viewer, the result is the same, which is video that looks indistinguishable from its source (i.e. the individual pixels are literally the same). However, there is a quantitative difference between the two, which is most prominently expressed in the file size of the video. Lossless codecs, though much less efficient than lossy codecs, still save some disk space when compared to uncompressed video. The primary function of either uncompressed video or lossless video is to allow for very high fidelity transfer between various stages in the pipeline. Using a lossy codec at each step of the pipeline irreversibly damages the video being encoded and should be avoided. If you’re not distributing a video for public consumption, always use a lossless codec or uncompressed video. lossless Here’s a list of lossless codecs (uncompressed video doesn’t need a codec):
  • YULS (Windows)
  • Huffyuv (Windows and Linux [as part of libavcodec])
  • Lagarith (Windows)
  • QT DV or “Same as Source” for QuickTime – don’t use MJPEG or PNG as that will increase your file size greatly (Mac)

Lossy

For the purposes of CG development, most old standards are no longer applicable. MPEG-1 and MPEG-2 codecs have been satisfactory for some time, but they have been superseded by the newer MPEG-4-derived codecs. Here’s a list of codec packages and their related tools that you can use for MPEG-4 encoding:
  • FFmpeg – Avanti is a great GUI tool that also integrates AviSynth scripts; SUPER is another full-featured encoding package that includes ffmpeg
  • Xvid – Xvid integrates with the system codecs, so you’ll need to export video using it as the chosen codec
  • QuickTime encodes as a MPEG-4 stream by default

Conclusion

There are many codecs and containers I didn’t mention because they are either outdated or too new to be fully supported. As you may have surmised, I recommend using the MP4 container and the MPEG-4 (Part 2) codec to encode for distribution and publishing. For transfers between team members or storage systems, as well as steps in the CG pipeline, I recommend a lossless codec (or failing that, uncompressed video). There are several tools out there that make transcoding between different formats easy, such as ffmpeg, and you should find out which tools work best with your current environment. There are also nascent open-source alternatives to MPEG-4, such as the Ogg/Theora standard, which plays natively in Firefox and Opera. These will become preferable with time, since they are future-oriented and patent/licensing-averse. For the time being, however, CG artists should release to the widest audience possible, which is best accomplished with the MPEG-4 format.

Author:

Howdie stranger!
If you want to participate in our photoshop and photography contests, just:

LOGIN HERE or REGISTER FOR FREE


5 Responses:

  1. Sathish says:

    Informative article.

    (at least until open source containers garner as much support)

    I googled for garner, but I can’t find much, could you link to some resources.

    ( 2 years and 4509 days ago )
  2. Sathish says:

    Just realized how lame was my previous comment. Please don’t allow it 😀

    Also, you could have mentioned the names of some open source containers.

    ( 2 years and 4509 days ago )
  3. imsky says:

    OK, names mentioned.

    ( 2 years and 4509 days ago )
  4. pasxal says:

    Very nice overview! tnx

    ( 2 years and 4508 days ago )
  5. Jenna Molby says:

    Great post, thank you.

    ( 2 years and 4507 days ago )