Basic AVI to DVD conversion using TMPGEnc+ (including Audio Sync Correction)

Original Page URL: http://www.digital-digest.com/dvd/articles/article_avi2dvd_tmpgenc_page1.html
Author/Publisher: LT. Columbo
Date Added: Dec 20, 2005
Date Updated: Dec 20, 2005


Basic Tmpgenc .avi/.mpg to DVD conversion guide

This is a very basic guide intended to help those new to encoding. This guide will work for various file types; DIVX & XVID compressed AVI’s, MPG/WMV/MOV formats. In order to convert to DVD, the free version of tmpgenc will not work, as it only supports mpeg-1 (VCD) encoding.You will need the full version TMPGenc Plus.

NOTE: To convert .MOV files, you need the Quicktime Reader Plug-in for TMPGenc installed

Quicktime Reader Plug-in:
http://www.digital-digest.com/dvd/downloads/showsoftware_tmpgenc_412.html

TMPGenc plus & TMPGenc DVD author:
http://www.pegasys-inc.com/en/product/tda.html

Virtualdub:
http://www.digital-digest.com/dvd/downloads/showsoftware_virtualdub_346.html

Media player classic:
http://www.divx-digest.com/software/media_player_classic.html

AC3 ACM Decompressor:
http://www.digital-digest.com/dvd/downloads/showsoftware_ac3acm_529.html

AC3 Filter:
http://www.digital-digest.com/dvd/downloads/showsoftware_ac3filter_281.html

VirtualdubMod:
http://virtualdubmod.sourceforge.net/



NOTE: If you wish to convert to VCD/SVCD the procedures are basicly the same, except for the template
used and not adjusting the bitrate.

STEP 1: Before you load the AVI, check the framerate. This step is critical to ensure a smooth playback.
An easy way is to simply right click the file, go to Properties>Summary. As you can see this
File is 23 fps and has AC3 audio. To encode a file with AC3 audio, you need the AC3 ACM de-
compressor installed, and I suggest the AC3 filter for playback.

NOTE: If your avi with AC3 audio crashes TMPGenc, Use "AC3FIX" to correct it.
TMPGEnc (and several other programs) are very finicky about correct AC3 headers - and it seems that most XVID-AC3 files do NOT have the "perfect" AC3 headers.


AC3FIX:
http://www.videohelp.com/tools?tool=91



Another option is to change the audio to a .WAV file using Virtualdub. Load the file. Go to "video">Direct stream copy. Under "audio">full processing mode, Click "audio" again. click Conversion check 48,000Hz and check "high quality" and ok. Go to "audio" >compression, select "no compression" (PCM) and ok. Finally go to FILE> save WAV. this will produce a .wav file (audio only). You will use this as the audio input for TMPGenc. see screenshots below.




Finally, the method I use is to keep the AC3 audio unchanged when making a DVD. I use the wav file method outlined above as the audio input, sort of like a “dummy” file, for the mpeg-2 conversion, but when I AUTHOR the encoded file I use DEMUXED AC3 audio from Virtualdubmod as my audio source in TMPGenc DVD Author. Authoring a DVD with TMPgenc DVD author (different than TMPgenc plus) is the second and final step to making a DVD.


If your file has mpeg-1 layer 3 audio no conversions are needed to satisfy TMPGenc.



STEP 2: Open TMPgenc Plus, the wizard will open. Close it. The first thing you need to do:

Go to the TMPGEnc's Option menu and select Environmental settings. From there, select the
VFAPI Plug-in tab.

There you see a list of various reader plugins installed for the TMPGEnc. The one that's called DirectShow Multimedia File Reader is the one that we're looking at. As a default, its priority is -1. Select the item and right click on it. Choose Higher priority and repeat this until the "Priority" for this item is higher than any other plugin's priority in the list (usually 2). LEAVE this set always. I have found 50% of files won’t even open or produce write stream errros unless this is set.



Since my source is 23 fps we select NTSC(same for 29.97 fps), if it were
25 fps, select PAL. Be sure to set the audio on the bottom right to CBR MPEG-1 layer II audio
(mp2). The low resolutions and 16:9 settings won’t be used in this guide as to keep
things simple.


Click next….

STEP 3: Load your source Avi file, and if your using a wav file as mentioned above, use the browse button
Beside the audio pane as you did for the video pane to load it. . At the bottom of this screen
where it says : “expert setting for source”, under “content of video” set to FILM
MOVIE(ONLY If source file is 23 fps!) otherwise leave alone!

Click next…

STEP 4: On this screen click “other settings”


STEP 5: On this screen (video tab) make sure under framerate it says 23.976 (internally 29.97)
and under encode mode, 3.2 pulldown when playback. Leave the rest.
NOTE: If your source is 29.97 or 25 fps, skip this step (don’t adjust anything on video tab)
Click the advanced tab


Under “video arrange method” select keep aspect ratio 2. This will keep the original file in the
same apect ratio. SELECT inverse telecine, or your file will have horribly “jerky” playback.
Leave the rest.
NOTE: ONLY SELECT “INVERSE TELECINE” IF YOUR SOURCE IS 23fps! (Leave
unchecked if 29.97 or 25 fps)

Click ok….then click next.


STEP 6: Use your mouse pointer to slide the blue bar on the bottom to fill desired amount of disc space or
to a video bitrate of your choosing. Notice how disc space used (in %), moves along with video
bitrate values. They always correspond to one another. Here I only want ½ of the disc used as
I have another file I want to add later to this DVD. You can see the space used is roughly half of
a disc, and still have a good video bitrate value. You’ll find this is an accurate measurement
to the nearest ten percent( give or take). I like to leave a bit of room for my menus later, when I
AUTHOR with TMPGenc DVD author.

Click next….


STEP 7: Save with a new file name, to a destination folder on your PC using the browse button. Check
“Start Encoding Immediately”. Click ok, done. The batch encoding would be used if you
want to encode multiple files in a row, say overnight, which I find to be an excellent feature.
when it’s all done, play back the file using Media player classic(it works best IMO). Make
sure the audio is in sync throughout, and has smooth playback. Any files with bad frames or
corrupt headers may cause TMPGenc to make the audio go out of sync, but this can be
corrected by using some of the more advanced features, which I won’t get into in this guide.
So if all looks good, you’re ready to AUTHOR and finally burn to a disc!


Authoring with TMPGenc DVD Author

Open TMPGenc DVD Author, click "create new project".



click "add FILE". Find your encoded file that you made with the other tmpgenc program, load it.



This screen will pop up, click ok.
NOTE: The blue circle indicates where you would load Demuxed AC3 audio from virtualdubMod (optional, but the method i prefer). How to Demux the AC3 is explained at the end of this guide.




Now at the very top of screen "create menu" here you can experiment and play to see what background you want, layout, titles, fonts, text style etc. Some experimentation is useful here. I suggest going to the top right and clicking "options" and help section, to learn more about the settings of this program and menu features. There are nice guides that are very easy to understand. For this guide i'm choosing a default background image only. To the far left you see one file on one track, if you wanted to join 2 files together, you would simply click "add file" again, NOT "add new track". Adding a new track will create completely seperate file(s) on the final product and would be used when say, you have 2 different TV shows for example.



Here under "first play action" I like my DVD to show the menu, and allow me when to choose when the video starts so i have "display main menu" chosen. Also adjust the settings you prefer under "menu display settings".



When your satisfied with all of your settings here, at the top right go to "output" and check "create dvd folder" under "output settings", then click "begin output". That's really all there is to it. You will end up with a folder containing a video ts and audio ts folder. The audio ts folder will be empty as it should be. The main folder containg the audio and video ts folders can be given a name, and IT, used to burn with NERO or whatever you use to burn. I suggest playing back the final product on the PC with media player classic to see how everything looks, and using a re-writable disc untill you are comfortable with this program to avoid mistakes and wasted discs.





Demuxing AC3 Audio with VirtualDubMod

Open VirtualDubMod, under FILE, load your original avi file. Go to "STREAMS", then "stream list". You will see this screen. Click "demux" and save with a name. This will give you an AC3 audio file that can be used as the audio input for TMPGenc DVD author as shown on the screenshot above by the BLUE CIRCLE.

NOTE: As mentioned earlier, you may find the AC3 won't be accepted when you try to load it in DVD author as the audio source, but can easily be fixed in a couple minutes with "AC3fix" as mentioned at the very start of this guide.





let me know of any comments, suggestions, questions or even typo's


How to correct audio sync with TMPGenc

NOTE: This method ONLY applies to files that have audio out of sync with the video THE SAME AMOUNT at any given point of the clip. This method will not work if your audio gradually gets more and more out of sync as the file plays.

Double click "source range" from STEP 5 of this guide,
http://forum.digital-digest.com/showthread.php?t=56454

This screen will pop up.



Enter the appropriate value under "under gap correct". It can be a positive value such as 500, or a neg value such as -500. The number represents milliseconds (1/1000th of a sec), so a value of 500 would be 1/2 a second, 1000, one second and so on. In relation to the video, if the audio is too EARLY you enter a NEGATIVE value. If it's too LATE you enter a POSITIVE value. Click OK and carry on the rest of your encoding steps as usual.

From using this many times i can successfully notice and correct sync issues down to 3/10ths of a second. The main thing is to determine if it's early or late, using peoples lips aren't good if you want real accuracy, choose sudden sounds, such as a hammer being hit or something like that, or someone knocking on a door. It will take trial and error untill you figure out the correct value, in time you can get it right the first time almost always from a little experience.


About Digital Digest | Help | Privacy | Submissions | Sitemap

© Copyright 1999-2023 Digital Digest. Duplication of links or content is strictly prohibited.