Movie Making Manual/Post-production/Video codecs
Perhaps the first thing we should look at is just what a video codec is.
Well, it's simple. Codec stands for COmpressor - DECompressor. Choosing the right codec to use is the hard part for many. As the name suggests, a codec Compresses and Decompresses a file, Video, Audio or otherwise. There are many codecs out there, and many variations of those too. So this article is not aimed at informing you, the reader of all the codecs available, but rather to make it easier to select the right codec for the right job using the most common codecs.
When it comes to Video Codecs, much of it is personal preference. Some people do not mind compressing video until it looks pixilated just so long as they can fit more on a disc. Others will accept nothing less than perfect quality and the slightest blemish on an otherwise fine video sends them into a fit. This range of opinion makes it hard to give a definite answer as to what codec is "best." And in all truth, none of them are. Every codec has a different use and was designed with that use in mind, even if it is used for other things today.
1. Compressing Codecs: What are they good for?Edit
CODECS allow us to compress video and audio so that more can fit onto a disc. Whether it be a Hard Disk, Compact Disc, Digital Versatile Disc or the small memory cards used in portable media players. A common misconception is that compressing video can make it poor quality. This is only half true, it's all a matter of what CODEC is used and how the codec was configured. For example, DVD-Video uses MPEG 2 compression, this is a high quality compression CODEC that was made for DVD. If you were to make a SVCD (Super Video CD), you would still be using MPEG 2 but it would be configured in a different way to fit the data on a CD instead of a DVD. Same CODEC = different quality. In short, CODECS allow us to fit more data on a storage device, but the more we want to fit, the more it has to be compressed. The more you compress, the more quality you are losing, although how apparent the quality loss is depends on the CODEC used.
2. They had them first...Edit
For many years, we have used CODECS in every day life. DVD-Video uses MPEG 2. VCD uses MPEG 1. Videos we watch on the internet can use any number of CODECS. But for a long time, the use of CODECS to encode video was the domain of professionals with large workstations and even larger budgets. As more and more technology is made available to consumers, we now have the chance to do what the big guys have been doing for years. A few years ago, making your own DVDs was only on the drawing board. But the hardware and software required to do it is now available for all. And now the market is flooded with free codecs such as the Windows Media and OGG-Vorbis formats. And while some, like MP3, require payment to buy the codec, there is no shortage of codecs for consumers and even professionals on a budget to use.
3. The Main FormatsEdit
Unlike the VHS-BETA and DVD+/- wars, codecs do not commonly war with each other. They all try to make a better product, but in the end one codec is going to replace them all. So you can use a codec with confidence that it will not soon become unsupported or obsolete. Here is a guide to the main CODECS used.
MPEG 1: Seen sometimes for Internet downloads but is more commonly used for the Video CD standard. It offers roughly the same or better video quality than VHS but not as good as DVD or SVCD.
MPEG 2: Used on DVD and in another form for SVCD. When used on a standard DVD, it offers great picture quality and supports widescreen. When used on SVCD, it is not as good but is certainly better than VCD. Unfortunately, SVCD will only fit around 40 minutes of video on a CD, VCD will fit an hour.
WMV (Windows Media Video): Once only used for Internet streaming and distribution, it is now one of the hottest codecs available. It can do anything from low resolution video for dial up internet users to High Definition video to view on an HD TV. Files can be burnt to CD and DVD or output to any number of devices. It is also useful for Media Centre PCs.
Real Video: Once the leader in internet video, it is now losing some ground to WMV but is still very common.
QuickTime: A file format developed by Apple, also used for internet video. QuickTime also refers to software for playing video. QuickTime for Windows is the Windows version. QuickTime available directly from Apple supports about 12 codecs such as Animation codec, Apple Intermediate codec, Apple Pixlet codec, Cinepak, Component, DV (many flavors), Motion JPEG codec, Photo JPEG codec, and Sorenson. The quality of older codecs were not usually as good as WMV and Real Video and downloads took longer. Now Apple emphasizes the much more efficient MPEG 4 and MPEG 4 H.264 codecs but older codecs still play with the QuickTime software. QuickTime Pro ($30) will compress iPod movies (MPEG 4) and H.264. The iPod movies look great but Apple's H.264 compresses the color so that files are half the size of WMV files.
MPEG 4: The latest MPEG codec can be used for internet and on disc like WMV.
DivX & Xvid: Types of MPEG 4.
H.264: Type of MPEG 4 used on next-generation HD-DVD and BluRay discs.
DV Stream A codec and file format used for miniDV tapes and DV camcorders.
There are many more codecs available. To find out which is right for you, you should test each one and see what best suits your needs.
-- Spencada 07:27, 9 Jan 2005 (UTC)
4. Case Study in CodecsEdit
The Star Movie Shop creates Editing Workshops for beginning film students to learn to edit scenes from television dramas and motion pictures. The Star Movie Shop locates all the film dailies for a scene from a television drama as NTSC video (29.97 frames per second), digitizes the dailies, then removes the extra frames added during the telecine (inverse telecine), then adds the scene name and frame number to every frame using a window burn and finally compresses the dailies for editing on personal computers.
To compress the clips, the Star Movie Shop must decide which codec to use. This has not been easy.
The Star Movie Shop started developing these products eight years ago [year needed] when most schools still used Adobe Premiere 4.2 and had extremely limited disk space. The Adobe Premiere editing program works with movies of any frame size but the most common for schools was 320 by 240 pixels at 24 frames per second (which is the standard speed of motion picture film.)
At that time, QuickTime was the most popular file format for digital video and the current version was QuickTime 3 (it is now up to version 7). With QuickTime 3, Apple introduced the Sorenson 2 codec which was extremely slow to compress but looked better than any other codec on the market. It also offered a variable bit rate option which made the files for movies very small. The Sorenson 2 codec is extremely efficient. While it would be impratical to compress full-frame scene with the Sorenson 2 codec, it works fine for half size frames.
Very Simple; Very EasyEdit
Therefore, for Disk #02 which has 24 Unedited Scenes on a single DVD-Data disk, the Star Movie Shop used the Sorenson 2 codec which works with any version of QuickTime manufactured in the last ten years on both the Macintosh and Windows computers. This was good.
Fat and AwkwardEdit
A few years later, the DV format became very popular. Dozens of terrific, new editing programs became available (including iMovie and Movie Maker) but they only work with DV movies. The DV codec is very popular because it was the first codec to be used as a standard for digital camcorders. But the DV codec compresses only 5 to 1 and only at full frame size which is 720 by 480 (non-square) pixels for NTSC video at 29.97 frames per second. (This is NOT film speed.) This makes DV very inefficient... but faster, specially for compression. With this DV format, only one (1) scene can be stored on an entire DVD-Video disk for a two minute scene with a 5 to 1 shooting ratio.
Now users with DV editing programs cannot use Disk #02 from the Star Movie Shop. Using the Movie Player that comes with QuickTime Pro or QuickTime for Windows Pro, users can convert the Sorenson 2 movies from Disk #02 to the DV format but unfortunately, only by stretching the clips so they looked really ugly. QuickTime Movie Player does not letterbox movies when it enlarges them. Also, it has to double some frames to convert from 24 fps to 29.97 pfs. That makes the movies bigger and more awkward to edit. Very bad news!!!
Therefore, on the new DVD disks from the Star Movie Shop, there is only one scene per disk. The DVD-Video section has the clips in the MPEG 2 format compressed 200 to 1. But in the DVD-Data section the clips must be in the DV format if people have a DV Editing program.
If QuickTime Pro was able to rip the MPEG 2 movies from the DVD-Video section, that would save a huge amount of disk space. But it cannot. That is why the dailies must be in two different formats (two different codecs) on the same disk. Really dumb!!!
This would not be too bad except there is an even greater problem. Different editing programs prefer different formats. iMovie prefers DV movies in the DV Streaming file format while Final Cut Express prefers DV movies stored in the QuickTime file format (not the streaming format), compressed with the DV codec. Neither of these works at motion picture speeds of 24 frames per second which is the speed of all film dailies. And since NTSC video and PAL video have different frame rates and frame sizes, this adds another degree of complexity in providing the film clips in a format that people can use.
Only Final Cut Pro can work with movies (usually in the Photo-JPEG codec) at full frame (640 by 480 square pixels) at 24 frames per second. (The Sorenson 2 codec could not be used because it is too slow for compressing full frame scenes. Sorenson 3 only works with new versions of QuickTime. The only universal codec that works well at this size is Photo-JPEG.)
Options Equally AwkwardEdit
If the user is sophisticated, the user can convert the clips from one file format to another (within limits). The problem is this is sometimes very awkward. Apple's newest version of QuickTime does not correctly convert clips from film dailies (at 24 fps) to 29.97 frames per second when using the QuickTime option. If you do this, the DV clips compressed in the QuickTime file format, store the clips at 24 fps which is unusable in all DV editing programs, even Apple's Final Cut Express. Therefore, users must convert the dailies to DV Streaming which converts correctly to 29.97 fps and then convert DV Streams to QuickTime movies... in two separate steps.
The Star Movie Shop still sells Disk #02 - 24 Unedited Scenes to young filmmakers who want to see how movies are filmed in Hollywood but the disk cannot be used as an editing workshop since beginning filmmakers cannot afford an editing program which will work with this frame size and frame rate. (Final Cut Pro costs too much for toddlers and Adobe Premiere 4.2 is no longer available.)
The newest disk from the Star Movie Shop is an unedited scene called "Home Wrecker" from Buffy, the Vampire Slayer. Fortunately, this scene is so short, the dailies can be stored in a variety of formats on the disk. By carefully searching for very short scenes, the Star Movie Shop has found two other scenes ("Hearing Voices" from Law and Order and "Fireworks Display" from Northern Exposure) which will fit on one disk each.
However, longer scenes from the Star Movie Shop require up to 3 DVD disks (and that is just with the NTSC DV codec video clips, not PAL.) This is expensive and awkward. So rather than solve problems, new and better codecs are creating new problems. The disks come with MPEG 4 clips but since the clips are compressed with Apple's QuickTime Movie Player, the color is not good so these are only for situations where nothing else will work. (And they require QuickTime 7 Pro which very few people have.)
It will not be interesting to see if Blue Ray disks will make this easier or more complex.
-- Robert Elliott September 2006 (PST)