HDTV to DVD Guide
Would you like to make this site your homepage? It's fast and easy...
Yes, Please make this my home page!
Introduction
This guide describes the basic steps required to convert HDTV content to a NTSC DVD format.
Much of the information here was gathered through research at
www.doom9.org, where the real
experts reside. If you have any questions not answered by this guide, visit that site for
further information.
Getting HDTV Content
For the rest of this discussion, we will assume the following starting point: you have recorded HDTV
source material in "transport stream" (.tp or .ts file) format and have it ready to go on your PC.
If you don't know what this is, or if you came here looking for advice on recording HDTV
broadcasts, we can't help you much. But the folks at
AVSForum sure can. There you
can learn about the various HDTV PC or "over the counter" capture devices available to you.
The Basic Challenge
In short, your mission, should you accept it, is to convert HDTV source material to DVD-compliant
video and author a DVD. HDTV content comes at much higher resolution, either 1920x1080i or 1440x720p,
than the highest NTSC DVD standard resolution, 720x480i. Here "i" stands for interlaced video,
at 29.97 frames per second (fps), and "p" for progressive video, at 59.94 fps. You can perform
this conversion the quick and dirty way, and get okay results; or you can be a stickler for quality
and go the extra mile.
The Quick and Dirty Way
At first, you may be overwhelmed by all the tools available for this process. Many of these tools
will be in the public domain (freeware) and may be poorly documented or prove to complicated at
first glance. Or you may have purchased a DVD authoring package that promises to do everything for
you from the comfort of your easy chair--and you may not know any better and go along.
At a minimum, you will need to perform 3 steps:
- Convert your transport stream to MPEG2 format: Here you can go the cheap (and unreliable way) and
use the freeware HDTVtoMPEG2 application. Or you can pay a little and use the excellent VideoReDo
application, which correctly performs the conversion, allowing for triming of unwanted video
(translate: commercials), while keeping video and sound in sync and correcting any stream problems
due to broadcast dropouts.
- Resize your file to DVD-compliant resolution: If you are fortunate, your DVD authoring software
will handle this for you, so you should just be able to feed the MPEG2 file you obtained from step 1 and
feed it in. Otherwise, you will need a tool that allows you to resize content, such as XtreamMPEG.
"That sure sounds quick, but why is it 'dirty'"? you may ask. Well, this method won't usually yield the
best quality, primarily because you will be at the mercy of whatever algorithm your DVD authoring software
or resizing tool uses to re-encode the video. Converting from HD to DVD format will by default incur some
losses, but you want to keep these at a minimum. You may also run into problems like keeping audio and video
in sync (though VideoReDo should eliminate many of the problems that lead to this issue). In short, you
are not in control. If you're not a control freak and okay quality is enough, then this will work for you.
If not, read on...
The Long and Fulfilling Way
This could also be called the arduous and painful way, but hopefully this guide will take some of the
sting out. Though we go through more steps, the basic flow is the same: convert a .ts/.tp file to DVD-compliant
format. The basic outline is as follows:
- Convert your transport stream to MPEG2 format: Use VideoReDo to trim any unwanted content and
convert to MPEG2 format. At this point, of course, your MPEG2 file is still at HD resolution.
- Prepare your MPEG2 for processing: Use DGIndex to open the MPEG2 generated in step 1. Under
Audio->Output Method select "Demux (AC3,MPA,DTS,AAC)". Then, select File->Save Project and Demux Video,
and type the name of a .d2v file, then press Save.
When DGIndex finishes, you will have a .d2v project
file that you will be processing in the next step. Along with this file, you will see a .m2v (MPEG2) file
and a sound file, either .mpa or .ac3.
- Process the MPEG2 file: This is by far the most difficult and intimidating step, so take a deep
breath and swallow lots of patience pills.
- Setup all required (free) software: You will only need to do this once, so don't panic. First, go to
http://www.doom9.org and enter the "Download" section. From there, download
VirtualDubMod, AviSynth, AC3Filter, and QuEnc. Wait!!! Don't run away just yet! It's just getting fun, now. ;).
Install the various packages (the first and last are just de-compress and copy to a folder).
In addition, you will need to locate NicAudio.dll (same software author as QuEnc) for AC3 support and
Decomb.dll (see AviSynth Documentation under "Deinterlacing and PullDown Removal") and DGDecode.dll (comes
with DGIndex application); copy these into the AviSynth\plugins directory. Finally, you will also need
the DGPulldown application (from the same author of Decomb.dll and DGIndex).
- Edit .avs script: Use the following script as a template for your work. Modified as indicated
in items [1], [2], and [3]. Note that this script may or may not be specifically applicable to your
particular HDTV video. In particular, this has to do with whether your source is telecined (see Telecide
command in script). If not, you may have to adjust some of the settings below, or used a different
de-interlacing technique. This is beyond the scope of this guide, though we hope to have some scripts
available for plain DTV content soon.
LoadPlugin("C:\Program Files\VDM\DGMPGDEC\DGDecode.dll")
#LoadPlugin("C:\Program Files\VDM\AviSynth 2.5\plugins\NicAudio.dll")
### Load HDTV video
vhd=MPEG2Source("hd_source.d2v") # <== replace with your .d2v file name [1]
srcHeight=vhd.height()
is720p = srcHeight < 800 ? true : false
#-Test: shows threshold at 25; above it, interlaced frames show up
#return Video.Telecide(order=1, guide=1, post=3, vthresh=25, show=true)
### Use MPASource for MPA file: replace file name from your .ac3 file [2]
#ahd = MPASource("hd_source AC3 T01 3_2ch 384Kbps DELAY 33ms.mpa")
### Use NicAC3Source for AC3 file: replace file name from your .ac3 file [2]
#ahd = NicAC3Source("hd_source AC3 T01 3_2ch 384Kbps DELAY 33ms.ac3")
ahd = DirectShowSource ("hd_source AC3 T01 3_2ch 384Kbps DELAY 33ms.ac3", video = false)
AudioDub(vhd,ahd)
DelayAudio(0.033) # <== set value from 'DELAY' in sound file name (DELAY/1000) [3]
### For Source AR of 1.778:1 -- 16:9 Wide-Ssreen
#-Apply IVTC for telecined source
vt=Telecide(order=1, guide=1, post=2, vthresh=25)
#-Select every other frame when input is 720p
vs = is720p ? vt.SelectEven() : vt
vs.Decimate(cycle=5) # for 24fps
#-Resize to DVD resolution
v_out = Lanczos4Resize(720,480)#.Subtitle(is720p ? "720p" : "1080i")
### Output is at 24 fps: must do pulldown post-process (i.e., DGPulldown)
#-For DVD creation need 29.97fps interlaced
return v_out
- Load and test script: You may be sweatting a bit at this point. Be thankful you didn't
have to figure out how to come up with this script yourself, okay! Now, just like that, you are
ready to load it into VirtualDubMod to see if it works. For VirtualDubMod, select
File->Open Video File (Ctrl+O) and select your .avs script file. If everything works, in a couple
of seconds (after some delay for initial processing) you should see the first frame of your video
clip. Press Play (2nd or 3rd buttons on bottom toolbar) to make sure processing works. Playback
will be slower than real-time. That's normal. Once you are satisfied, press stop.
- Crank it out: Now you are ready to spit out the post-processed, DVD-compliant MPEG2
file. For this step, use QuEnc, which also can read .avs files. We used VirtualDubMod in the above
step because it is better for debugging a faulty script or determining problems with the source
video. QuEnc, however, is the point of this exercise: it will generate our target MPEG2 file at
DVD-compliant resolution.
Specify your .avs script under "Source AVS File" and your output MPEG2 file under "Destination File".
Make sure you specify the latter if you .avs script is named the same as the MPEG2 file you fed
into DGIndex to avoid over-writing it!
Click the "Advanced" button and specify the correct settings under "Audio Codec" and
"Audio Bitrate (kbps)": you can get these from the sound file's name. (In the above script example,
these are AC3 and 384Kbps respectively.) Click Apply
Finally in the main window, select an appropriate video bitrate (7000 is good for high quality content),
then, take a breath, and hit "Encode". An estimate of total time till completion will appear: for a
large clip this will probably be in the 1-4 hour range, so now you can take that long nap you've been
wanting.
- Apply Pulldown: If the original content was telecined, you will need to restore pulldown. Use
DGPullDown to convert the MPEG2 file you generated in the previous step from 24fps to 29.94fps.
This could also take a while: time for another (shorter) nap.
NOTE: DGPulldown only supports elementary (video only) streams, so pulldown can't really be
applied against the clip the above procedure generates because it also includes (muxes in) audio. In
my case, the DVD authoring software (ULead MovieFactory 4) was able to do the conversion, but this
can (should) be avoided by running the .avs script against video only, applying pulldown, then
muxing the audio, either in the DVD Authoring software--which I haven't been able to do due to
a flaw in the audio stream--or with yet another tool to mux audio+video.
- DVD Authoring: Now you can load the MPEG2 file into your DVD authoring software of choice,
create chapters, menus, etc., and finally burn the thing. Now you have to decide whether you want
-R, +R, -RW, +RW, and that is like way beyond this guide. Good luck, and I hope this guide helps
a bit.