DVD encoding in TMPG

First a warning. TMPG is performing some of these operations really sluggish, so if you press a button and TMPG appears to have frozen, give it a couple of minutes, it almost always comes back.

Before you can start digging into TMPG you have to create a DGIndex project of your movie.

Start up TMPG and load the DVD2AVI (.d2v) project file as video source. Then set the Stream Type to ES (Video only) and press the Settings button.

The video Stream type has to be MPEG-2 Video.

Size should be 720x480 for NTSC and 720x576 for PAL (this is normally entered by default upon loading the .d2v but it can't hurt to check).

Aspect ratio should be the same as the original DVD. In the DVD2AVI step you wrote down the DAR, here you can now set it. Please note that if IfoEdit reports 16:9 but DVD2AVI says 4:3 use the value reported by IfoEdit.

Frame rate is 23.976fps for NTSC titles (unless you've been told to use otherwise earlier in the guide), PAL is 25.00fps. Note that for 23.976 fps sources, (internally 29.97fps) is initially not shown. This will be shown when you set the Encode mode.

Rate control mode is where you have a lot of options. If you use the 2 pass VBR mode you can have the best control over the output size so I suggest you use it.

Make sure that the VBV buffer size is set to 0 in which case TMPG will set it automatically (this setting gave me a lot of grief, don't touch it unless you really know what you're doing).

Video format is either NTSC or PAL depending on your source.

Encode mode is either set by default for PAL titles and shouldn't be changed, or it's 3:2 pulldown when playback for NTSC titles.

To further improve on the quality you can increase the DC component precision and Motion search precision but that will also slow down encoding. Once you're done go to the advanced tab.



In 2 pass mode, you'll get the following screen when pressing Settings:

Set the Average bitrate as calculated before, the minimum bitrate to 0 bits/s and the maximum bitrate to 9800 kbit minus the bitrate of all your audio streams. Keep in mind that here a megabit is 1000 kilobits, not 1024 as usual in the computer world. DVD-R calculator will help you calculate the average bitrate.

Do not check Enable padding, this will only waste space.



Press OK to get back, then click on the Advanced tab.

The Video source type should be entered upon loading the .d2v file as should the Field order.

Source aspect ratio is 16:9 525 line (NTSC) for NTSC titles, and 16:9 625 line (PAL) for PAL titles unless your source is 4:3 in whic case you can use what has been set upon loading the .d2v.

The Video arrange Method should be full screen (keep aspect ratio).

Then go to the GOP structure:

Make sure Output interval of sequence header is set to 1 per GOP (the default is 0 which won't work properly). The Number of I/P/B pictures in GOP should not be crucial but just in case I use 1/5/2 for NTSC and 1/4/2 for PAL which is the default for the DVD profile in TMPG.

Then check Force picture type setting and press the setting button.

Coming up next are some instructions for the TMPGTemplate file that IfoEdit generates. If you came here via a guide that explains how to remux m2v files in IfoEdit you'll know what it is about, if you came here via the DVD Authoring in IfoEdit guide you can disregard any reference to that template as you don't have it and won't be needing it either. Use the following link to skip the section entirely.

Then press the Load button and select TmpgTemplate.txt that IfoEdit has created for you. This will effectively freeze TMPG for quite a while so go have a coffee (but don't take too long, it's only a couple of minutes tops).

Once done you'll see that some frames have been marked with a red frame, these are the I frames as given in the text file. I've tried to save the position of the P frames too (these would be blue) but the output was always choppy so I guess the I frames is all we can force.

Once this is set press OK to get back to the main TMPG window. This will normally also take a bit of time so don't kill TMPG yet.

Now set an output filename, then press Start to start encoding. Now you will need more as a coffee because even on a fast machine this will take ages. It takes me almost 4h for a single pass on an Athlon XP 1800+ machine.

>> BACK

This document was last updated on August 9, 2005