MPEG-2 Encoding Tips for DVD Authors
When the Moving Picture Experts Group came up with the MPEG-2 standard in 1994, they may not have realized how much the new codec would change the world. If you’re dealing with DVD, HDV, digital satellite TV or off-air digital television, you’re dealing with some form of MPEG-2.
Most of the MPEG-2 exposure you’ll have as a video producer will be in encoding video for DVD. There are a number of things to consider when you plan to burn for DVD (not the least of which is compatibility with other DVD players). Let’s take a quick look at a few of these considerations.
Aaack! Data Overload!
The maximum amount of data that the DVD format can accommodate is 10.08Mbps. This figure takes into account all video and audio streams in your presentations, including such additional features as multiple angles, multiple spoken languages, subtitles and commentary tracks. Most set-top DVD recorders and DVD authoring software are aware of these limits, but we have seen discs with bit rates too high to be compliant with the DVD standard.
If you did code a piece of video at 9.8Mbps, you would only have 0.28Mbps left over for audio, so you would only have room for one 256kbps or two 128kbps audio streams if you used Dolby Digital compression. If, however, you coded your video at 8Mbps, then 2.08Mbps are available for other things. This would give you the versatility to use uncompressed PCM audio or to add subtitles to your video.
The term for parceling out the bits in your video for various uses is "bit budgeting."
Now, we’re not overtly trying to impress any mathematicians, but as bit rate decreases, geometrically more video can be recorded onto a disc. We can express this as follows: minutes=(disc capacity (GB) x 400) / bit rate (Mbps) x 3
(For those of you who wince at the prospect of digging out the ol’ scientific calculator, we did the math for you, which is found in Table 1.) Don’t forget that you also have to factor in the audio, so if you like to use 6Mbps video compression and 1536kbps (48kbps PCM) audio, you’ll have to plug 7.536 into the formula. For example: (4.7 x 400) / (7.536 x 3) = 1880 / 22.608 = 1 hour, 23 minutes, 9 seconds
Alternately, if you know how long your program is, you can calculate the maximum possible bitrate: Maximum bit rate (Mbps) = (disc capacity [GB] x 400) / (minutes x 3)
That means, for example, that if you wanted to burn a two-hour program onto a single layer disc: (4.7 x 400) / (120 x 3) = 1880/360 = 5.22 Mbps
Armed with that knowledge, that means that encoding this video at 5.0Mbps with a 128kbps Dolby Digital audio stream, we’d have a perfect amount of space left over for a few menus.
How Much Compression?
We don’t see any reasons to go above 8.5Mbps for your video. This also gives you room for uncompressed audio; if your client is a hardcore audiophile and you don’t want to hear any snide comments about audio compression, then go for the 48kHz (1536kbps) PCM audio.
To maximize your compression efficiency, you can implement variable bit rate (VBR) coding, as opposed to using constant bit rate (CBR) coding. Most higher-end DVD authoring programs, as well as most dedicated encoding programs (e.g., discreet cleaner, Canopus ProCoder) can perform VBR coding. Most VBR-capable encoding applications can also perform 2-pass VBR encoding, in which the encoder analyzes the video that it is about to compress before it actually compresses it. This, unfortunately, takes some time to pull off–most encoders take at least twice as long to perform 2-pass VBR encodes as CBR encodes.
In our informal tests, we have found 6Mbps, 2-pass VBR to be a pretty good balance of video performance and storage capacity.
Know the Code
While this article aims to give you some deeper knowledge of how to get more out of your MPEG-2 coding, this is just the tip of the iceberg when it comes to MPEG coding. There’s a lot more that you can do with this amazingly powerful and versatile format that might be present in the tools that you already have, but higher-end DVD authoring systems include even more control over every aspect of the MPEG-2 encoding process.
Charles Fulton is Videomaker’s Associate Editor.