Jump to

Video Capture 102 - IVTC

Part 3 - TMPGEnc:
TMPGEnc while being an MPEG encoder at base, also has a very good IVTC code and can save it's output to both MPEG1/2 and to AVI (and thus DivX v3 or v4). It also supports batch jobs which makes it a very useful tool for the task at hand.

Starting a new project:
First thing you do after loading TMPGEnc is to reset the current project settings. Go to "File > New Project" in order to do just that (or press Ctrl+N).

Opening the Frame Served file:
Click the "Browse" button next to the video source and pick the ".VDR" file you saved in the VirtualDub frame server.

Selecting the correct field order:
Press the "Settings" button and go to the "Advanced" tab. Under the "Field order" setting, pick "Top field first (field A)". Highlight the "DeInterlace" option in the list and double click it to open the DeInterlace dialog. Select the "Even-Odd field (field)" Method. Left-Click on the video area and then using the keyboard arrows move to the right to frame-advance the video. If the motion is smooth, then the field order is correct, if it's all jumpy then exit the DeInterlace dialog, switch the Field order to "Bottom field first (field B)", re-enter the DeInterlace dialog and check that now the movement is smooth. When the correct field order is selected, make sure that the DeInterlace option is checked OFF! We only use it to check the field order, it must not be enabled for the final encoding.

Setting the IVTC filter:
Check the "Inverse Telecine" box, highlight the line and double click it to open the IVTC dialog. Once open, press the "Auto-Setting" button, select "24fps (flicker priority)", set the DeInterlace to "Automatic", press the "Enable when encoding" button and finally press the "OK" button to close the IVTC dialog.

Clipping unused image area:
Enable the "Clip frame" filter. Check the box and open the dialog by double clicking the line. Seek the timeline to a frame which is bright enough to see the edges of the video. Clip all the unused area surrounding the video, including the widescreen black bars if this is a widescreen video.

Setting the video resolution and Frame Rate:
Select the "Video" tab, set the resolution and the frame rate. If you are encoding a widescreen video, you may be required to do a bit of math to figure out the actual resolution required to maintain the correct aspect ratio.

Encoding the video, The First Pass:
Now, If you want to encode this to VCD or SVCD, that's up to you to set the various MPEG settings. In this tutorial, I will explain how to do fully Automated 2-Pass DivX v4 encoding. Press "OK" to close the MPEG setting dialog we used for configuring the filters. In the TMPGEnc menu select "File > Add current project to batch list > AVI File". A batch encode dialog should appear, select an AVI file name. This is NOT the name you want for the final encode, this is just a temporary AVI name you want for the first DivX v4 pass (I recommend something along the line of "firstpass.avi") Once the 2-Pass encode is complete you should be able to erase this file. If you are using DivX v3 or want to make only a 1-Pass DivX v4 encode, then select the final AVI name.

Now, next to the "Video" line in this dialog, on the right, there should be a button that will allow you to select the Video codec, it's possible that this button might be partially obscured so you only see it's edge (a bug in TMPGEnc). Press it, and select the DivX v4 codec. Press the "Settings" button to bring up the DivX v4 property dialog. Set the Variable bitrate mode to "2-pass, first pass" (if doing a 2-Pass encode, otherwise select the "1-Pass" setting). Set the Performance/quality to "Slowest", press on the "select" button on the lower right to select a log file for the 2-Pass statistics, I suggest using the same name you would use for the final AVI file, but with a ".LOG" extension. And lastly set the "Output video bitstream at" value to your desired bitrate. You can use any DivX v4 bitrate calculator to help you figure the correct bitrate value so that you can set it to match your desired output file size. You should be able to find a calculator at doom9.org. Once set, close the dialogs and return to the "Batch Encode" dialog.

Since this is the first pass, there is no point in encoding the Audio, so at this point uncheck the box next to the "Audio". If you are doing a 1-Pass encode, then you should set the audio codec (see below). Press the "Save" button, this will open up the job list dialog. At this point you can close it.

Encoding the video, The Second Pass:
Once again select "File > Add current project to batch list > AVI File". Once again open the Video codec and select DivX v4. This time, when opening the codec settings, select "2-pass, second pass", and set all the other settings exactly the same as the first pass.

On this pass, make sure the Audio box is checked, select the Audio codec (again, the button might be somewhat obscured on the right), I recommend the MP3 codec at 44.1khz 16bit Stereo at either 128kbps or 160kbps.

Now pick the final AVI name and press the "Save" button again. This time when the Batch Encode dialog opens, you should see both encodes listed. Pressing the "Run" button should begin the encoding process.

Additional notes (important, make sure you read this):
*The End*