Software Category
DVD Authoring Software
DVD Converter Software
DVD Player Software
DVD Burning Software
iPod Software
DVD Copy Software
DVD Ripping Software
Other DVD Tools
Knowledge Base
DVD FAQ
DVD Articles
DVD Guides
DVD Tech Blog
Forum
Latest Posts
Hot Topics
DVD Resource
Home » DVD Guide >> Make Your Own Anime DVD Guide
  
Part 3. Video Encoding with TMPGenc 2.5 plus

Overview

This section covers preparing AVI files (most likely Anime) for encoding, as well as setting up the proper encoding settings for TMPGenc 2.5 plus

Section 1 - Removing letterboxing

Before we try to determine the settings needed to encode our AVI file we need to load up the file in VirtualdubMod to check if there is any letterboxing in the file. Letterboxing is the black bars you see on widescreen DVD's that are used to fill in the remaining vertical space. Most of the time the letterboxing has been removed, if thats the case you can skip to the next section.

To check for and remove letterboxing using VirtualDubMod do the following:

  1. File -> Open Video File
  2. Video -> Filters
  3. Click the Add
  4. Select Null transform
  5. Now select cropping
  6. Move the slider along to see if there is any letterboxing throughout the clip
  7. If there is letterboxing we need to crop the image. If there is no letterboxing skip to the next section below
  8. Use the x and y offsets and set it up until you cover the black letterboxing
  9. Make sure your offsets are always even numbers
  10. Click OK, and OK again
  11. File -> Save as -> Choose a name for your file and click save


Section 2 - Determining Aspect Ratio and FPS

To figure out the right settings for encoding we are going to load our AVI file up in GSpot.

The only settings we are interested are the following:

  1. Image Aspect Ratio
  2. FPS

In this example the areas of interest are highlighted in red, on the pic below

  1. Image Aspect Ratio: 4:3
  2. FPS: 23.97

The image aspect ratio was cut out of the pic, otherwise it would display 4:3. Even if you didn't see 4:3 you can easily figure out the ratio by using the following.

  1. 640/480 = 1.333
  2. 1.333 = 4/3

If GSpot reports an aspect ratio other then 4:3, or 16:9 then do the following. First divide the resolutions width, by the resolutions height, in this case that would be 640 / 480 which gives you a decimal number of 1.333. (If you look beside the resolution in GSpot it already does this part for you :) ). Note, the number GSpot reports must be one of the following four. If the number is a bit off then use the closest number from below.

AVI aspect ratio's

4:3 = 1.33
16:9 = 1.77
x/y = 1.85
x/y = 2.35

Write down the settings for these two items, and close GSpot.


Section 3 - TMPGenc Settings (Video Tab)

Load up TMPGenc 2.5 plus. Now we are going to create a template for our settings. First disable the wizard that pops up, we are going to put in all the settings ourselves.

To load your AVI file select the Browse button right beside where it says Video Source. Once your AVI file has been loaded change the the path to a location with lots of hardrive space. You can also rename the file something more suitable.

Now click on the Settings button (bottom right), it's time to setup out encoding options.


Make sure you are in the Video Tab

Stream Type: MPEG-2 Video

This option is used so you can encode using high DVD compatable resolutions such as 720x480.

Size: 720x480, or 704x480 - Always use one of these two setting. Preferably the first.

Quick tip - If you need to resize do it in the video arrange method setting (center-custom size) - see below for details on which size you should resize to.

The resolution setting depends on your AVI files aspect ratio. First off, this setting is probably the most difficult for people to understand, even some pro's have issues with this one. If you decide to go to a forum and ask around I can almost guarentee that you will get a few different answers, and techniques along with some theory that might make your head explode.

I myself am not a 100% sure I'm doing it the "proper" way, but I do know my encodes turn out very nice, so I must be doing something right :). On top of doing many encodes dealing with almost all of the AVI aspect ratio's I also have made some test DVD's using various resolutions, and settings to determine which looks best to me. So, I even saved yourself a blank DVD trying to figure out which ones to use :). On top of that if your still not sure, you can also use TMPGEncs preview feature which allows you to preview how your encode will look before you encode it! To use the preview option first setup your encoding options with the resolution you want to test, and then go

  1. File -> Preview
Quick tip - (When testing resolutions that are not 720x480, or 720x704 use the video arrange method - Center (Custom Size), and put your resolution in there.)

Now just move the horizontal scroll bar until you see the movie picture. The previews output is very similar to what you will get on your TV, so make sure it looks good in the preview before you encode it.

I'm just gonna list my recommended resolutions for each of the four aspect ratio's your AVI might be.

When dealing with encodes that do not have an aspect ratio of 1.33 (4:3) (Pretty much all of them :) ) set your DVD player's display for widescreen even if your TV is a regular 4:3 TV. This will make it looked a tiny bit stretched, but it will be a lot bigger, and you won't cut anything out. Beats using zoom...

AVI Aspect Ratio Resize to letterboxing
1.33 (4:3) 720x480 none
1.77 (16:9) 720x360 60 top 60 bottom
1.85 (16:9) 720x348 66 top 66 bottom
2.35 (16.9) 720x272 104 top 104 bottom

Aspect Ratio: 4:3 Display

Use the value you recorded earlier from GSpot. (If your value is >= 1.77 then use 16:9).

Frame Rate: 23.976

When dealing with Anime, and pretty much all movies (film) the FPS will be 24. Always use the same frame rate as the one reported in GSpot.

Rate Control Method: 2-pass VBR(VBR)

This settings is a 2 pass Variable bit rate. Using this setting provides high quality, and lower file sizes. This settings allocates a certain amount of bits for each frame (not all frames need high bitrates).

Now click on the Settings button to the right of the Rate Control Method.

You should see the following screen

Average bitrate: 4500

This setting depends upon the duration of all your epsiodes combined. For me I usually put 6 episodes on a disk which is around a 138 minutes worth, but ends up being around 120 minutes once I cut out the intro, and credits out each of them. I suggest using a bitrate calculator to figure out this setting. Try not to use a bitrate under 4500, or your encodes might not look too good. Also, the size of your encoded file is directly related to this setting. The higher the average bitrate the larger your file.

Maximum bitrate: 9800

If your using subtitles, and more then one audio stream (dual audio) you might have to lower this value to get your encode to work in some DVD authoring programs.

Minimum bitrate: 2000

Normally I would use a value of 0, but tmpgenc needs special treatment, so always set this to 2000.

Max Pass: 2 pass

I suggest always using the new type pass as opposed to the old type pass.

Enable padding to be not lower then minimum bitrate: unchecked

This setting just adds extra data to scenes that are below the minimum bitrate. You can try setting this option, but I have not noticed any difference using it.

P picture spoilage: 0

Sets the degradation of the P picture in relation to the I picture during encoding. Valid values are from -100 to 100. A negative value decreases degradation and a positive value increases degradation. This feature is only available with the newer algorithms.

That definition is straight from the help file. Since I have no idea how this setting will affect my encode I use the default value for this setting, and forget about it :)

B picture spoilage: 20

Set the degradation of the B picture in relation to the I picture during encoding. Valid values are from -100 to 100. A negative value decreases degradation and a positive value increases degradation. This feature is only available with the newer algorithms

This is also straight from the help file, and like the previous setting I have no idea how big an impact this setting would make on my encodes so I leave it at defualt.

Bitrate: greyed out

Ignore this setting.

VBV buffer size: 224

This is the video decoder buffer. Most people recommend a value of 224 for DVD. You can have tmpgenc automatically guess this size if you set this value to zero. Either way is fine

Profile & Level: Main Profile and Main Level MP@ML

This setting has to do with the brightness, and color of the pixels.

Video Format: NTSC

This is the video format used in North America, and Japan, so if you live in one of those two areas you'll need to select NTSC.

Encode Mode: 3:2 pulldown when playback

This option is used to convert 23.97 frames to 29 which is required for NTSC.

YUV Format: 4:2:0

This option is related to the Profiles & Levels option. I don't know the details behind this option.

DC component precision: 9 bits

I actually have no idea what this setting does. Some people say that it's related to your average bitrate. Personally I have always used 10 with no image quality problems, but I think I'll switch to 9 since so many people recommend it.

Motion search precision: High Quality

This setting produces high quality output, but is slow. You can try reading up on the motion estimate setting it might be faster, and produce good quality.


Section 4 - TMPGenc Settings (Advanced Tab)

Now setup the Advanced Tab settings

Video source type: Non-Interlace(Progressive)

Always use this option for DVD-rips.

field order: Doesn't matter

This option only applies to sources that are interlaced

source aspect ratio: 1:1 (VGA)

1:1 (VGA) means your source was encoded for computer pixels. AVI, divx, xvid all fall under this category, since those formats were most likely encoded for viewing on computers. If you downloaded your file off of a website always use this setting as your source aspect ratio.

video arrange method: Full Screen (keep aspect ratio) or Center (Custom Size) - see below for details

For clarity i'll keep this short. If you resized your encode to 720x480, or 704x480 use fullscreen (keep aspect ratio). If you resized it to anything else use Center (Custom Size), and type in the new resolution. Using the Center (Custom Size) option means your source is widescreen, and will have letterboxing added to it using this setting. For resizing help see resolution setting above.

Filters

If possible avoid using any of the filters, it will just increase the already super long encode time

There are a few bitrate calculators that you can use to determine the GOP settings, if you can't find a calculator just leave the default settings, or use my settings. You could also load up Tmpgencs DVD template, and copy the settings used by it.


Section 5 - TMPGenc Settings (GOP Structure Tab)

Settings for GOP Structure tab

Number of I pictures in GOP: 1 (Tmpgenc default value = 1)

The number of I picture(s) in the GOP. I don't know much about settings this option, so if you feel uncomforatble using these settings try loading up tmpgencs DVD template and copy the settings they use for this setting.

Number of P pictures in GOP: 7 (Tmpgenc default value = 5)

The number of P picture(s) in the GOP. I don't know much about settings this option, so if you feel uncomforatble using these settings try loading up tmpgencs DVD template and copy the settings they use for this setting

Number of B pictures in GOP: 1 (Tmpgenc default value = 2)

The number of B picture(s) in the GOP. I don't know much about settings this option, so if you feel uncomforatble using these settings try loading up tmpgencs DVD template and copy the settings they use for this setting

Output interval of sequence header: 1

Some authoring programs will reject the file if you do not set this value to one.

MAX number of frames in a GOP: 18

This setting sets how many I, P, B pictures are in a GOP.

Output Bitstream for edit{Closed GOP): unchecked

Using this setting makes it easier to edit the encode, but can slightly reduce the quality. If you are having problems with editing or authoring your encode set this to checked.

Detect Scene Change: checked

Enabling this can help detect scene changes and thereby decrease degradation between scenes caused by compression

Force Picture Type Setting: unchecked

Leave this disabled since it will disable Detect Scene Change


Section 6 - TMPGenc Settings (Quantize Matrix tab)

Settings for Quantize Matrix tab

Quantize Matrix: Default

I have tried CG/Animation, and the other ones, and there is not much difference. If anything it looks perfectly fine with the default setting

Output YUV data as Basic YCbCr not CCIR601: unchecked

This option seems to make the color contrast all screwed up, so leave this unchecked

Use floating point DCT (while using SSE: always ON): unchecked

I'm not to sure what this option does, but since it's always on when using SSE (processor instructions) just check it and forget about it.

no motion search for still picture part by half pixel: checked

Has to do with motion search precision, but since we are using high quality precision don't bother checking this option.

Soften block noise: unchecked

Leave this setting unchecked.

Once you are finished with the settings hit OK Now to save these settings as a template select Save (bottom right), and name it Anime-DVD Now whenever you open a new video file for encoding, just hit the load button, and select your Anime-DVD template. If you are going to be doing batch encoding then you have to load this template up for every file you open.


Section 7 - Batch encoding

Batch Encoding:

To do batch encoding follow these steps:

  1. Click Browse, and open video file for encoding
  2. Click on Load, and select Anime-DVD template
  3. Go to File->Add current file to batchlist->Mpeg file
  4. Choose a location, and name for the file, and hit save
  5. A window should appear with your file in it. Check the setting of you file to make sure it has the right settings
  6. Now close the list (hit x button)
  7. Repeat the above steps until you have loaded up all the files you want to encode
  8. Now go back to your list of files, and hit the run button

Section 8 - Encoding Time

The encoding process is going to take a very long time. When I used TMPGenc for encoding it took just over 2 hours to encode a 23 minute episode. Now multiply that by 6 (I encode 6 episodes at a time using batch mode), and it takes just over 12 hours to complete, and my computer is pretty fast.

Here's a listing of my hardware to give you an idea of how long it might take you.

  • Athlon 2500xp
  • 512 PC2700 DDR Ram
  • Geforce Ti-4200
  • Asus A7N8X deluxe Motherboard
  • WD Raptor 36Gig Hardrive (10000RPM)
  • Maxtor 120Gig Hardrive (7200RPM)

>> Part 4. Video Encoding using CCE

Google
 
Web www.dvd-software.info

Contact | Site Map | Privacy Policy | Resource more
Copyright ©2004 DVD-Software.info