## Getting Ready To Calculate

Since we're making a DVD with both a main feature and extras, we'll need to consider some things we might not care about if we were making a simple DVD with just a movie and maybe a simple menu.

## Initial Size

We need to start by identifying the size of a blank DVD. I'm assuming our DVD can be as big as a DVD-9, so we can consider the initial size approximately 8GB. Most of our calculations will be in smaller units though, so let's try to get that into MegaBytes instead. Since 1GB = 1,024MB, 8GB would be 8,192MB.

### Menu Size

Although we're not going to use any kind of fancy menus for this project we still need to consider how many menus there will be and how much size we need to reserve. We'll have a main menu, a series of 4-5 scene selection menus (with still images from different chapters), and an extras menu that you can use to navigate to menus for the cartoons and trailers. Trailers will only require a single menu, but there are enough cartoons to present them on at least 2 different menus. That will be roughly 10 individual menus. Figuring a very generous 5MB for each (50MB) and allowing for an extra 10% (5MB) that means we have 8,192 - 55 = 8,137MB free.### Audio Format

In order to prepare for using the bitrate calculator you'll need to know the audio format, number of channels, and bitrate. In our case everything is 2 channel AC-3 @ 192kbps. The bitrate calculator can take that into account when determining how many bits are available for video.## Multiple Title Considerations

For DVDs with multiple titles on them there are normally compromises that need to made in order to fit everything on the DVD. The first thing to consider is whether everything should get the same priority when it comes to bits. Generally speaking, the main feature gets a larger share of bits to keep the quality up. Often even different extras get prioritized differently. For example, if we were making a commercial DVD we might end up prioritizing some newer trailers over older television documentaries to make sure the trailers look good. In our case we'd probably do just the opposite since we're not really using the trailers to advertise anything.

### Priority Numbers

Even though we probably don't need to, we'll use a system I've developed to make this sort of thing easy to work out. Titles are divided into whatever groups make sense. In our case that will be the main feature, the cartoons, and the trailers. Each group is assigned a number between 1 and 10, with a value of 10 representing maximum (average) bitrate anything will be encoded at. The main feature is automatically assigned a 10. Values below 10 are percentages. 9 is 90%, 5 is 50%, 4 is 40%, etc,...Everything that's not the main feature automatically starts out with a value no higher than 9. Since cartoons generally don't need a lot of bits, we'll reduce them 2 more to a 7. I consider trailer quality to be even less important so I'll let their value be 1 lower at a 6. So we have the main feature at 10, the cartoons at 7, and the trailers at 6.

With our different groups prioritized we can work on figuring out how much of our disc space will be used for each one. It's going to be a function of the length of each group, modified by the priority number we assigned. My calculations will be based on the numbers listed above. If you choose to prioritize differently you'll need to substitute your own numbers into this formula. If the different groups had different audio formats or a different number of audio streams in each one this would be more complicated, but that's one reason we've avoided either situation.

### Weighting Titles

Before we can appropriately weigh the space assigned to each group we need to see how the length (in seconds) of each group compares to the whole. We should already have the figures we need from our analysis clear back in Part 2. Our main feature is 4,988 seconds long. The cartoons total 6,461 seconds, while the trailers only run 450 seconds between all of them. To find the weighted values, divide the Priority Number assigned to each group by 10. Then multiply the number of seconds for that group by this new number. For example, dividing 10 by 10 gives you 1. Multiply the main feature's running time by 1 keeps it the same at 4,988 seconds. On the other hand, dividing the cartoons' Priority Number of 7 by 10 gives you .7, which makes the weighted number of seconds for cartoons 0.7 x 6,461 = 4,523. The trailers have a weighted length of 270 seconds.Now add together the weighted times (4,988 + 4,523 + 270) to get the total of 9,781 weighted seconds. Divide each group's weighted time by the weighted total and multiply that by the space we've calculated to be available after menus to get the maximum amount of space it will get in our bitrate calculations. For example, the main feature's 4,988 seconds divided by 9,781 (approximately 0.51), multiplied by the total of 8,137MB available gives us 4,150MB for the main feature. The cartoons' 4,523 weighted minutes divided by 9,781 (approximately 0.46), multiplied by 8,137MB gives us a size of 3,763MB. The trailers will get 225MB.

Just to double check our calculations we can add up our three figures of 4,150, 3,763, and 225. That gives us 8,138MB - one more than our original number, which we can explain by rounding.