Capturing & DVD encoding guide

Last update: 2008-03-13, fixed bad url to HC encoder website.

This guide describes how to capture from TV, VCR, Videocamera or any other video source, and how to properly convert the captured material to DVD. The manual only applies to the european PAL system. Do you live in America? Then you'll have the NTSC system and won't be able to follow the exact instructions in this file. Most steps will still apply but not the talk about framerates and resolutions.
Anyway, if you're european and using the PAL system just follow the manual =)

The guide is meant for those who can't live with the limited configuration options offered by all-in-one packages such as the Ulead or Pinnacle software, and would like some more control of each step in the process. This guide will use some pretty advanced tools, but not to worry, you'll see its not that difficult if you just follow the instructions.

All the steps are written with a hands-on and practical approach. This means I didn't explain why I made every decision the way I did. For in-depth advanced tutorials, which for instance evaluate various ways to de-interlace, you should check out

This guide is intended for:

The capturing part of the manual focuses on an S-Video or Composite video source.

Short summary of the steps we're going to take:

  1. Getting your WinXP installation ready
  2. Capturing video with VirtualDub
  3. Using AviSynth to frameserve the captured material
  4. Encoding with HC encoder (HCenc) to make captured material DVD compatible
  5. Rip the audiostream with VirtualDub
  6. Encode the audiostream with BeSweet GUI to DVD compatible format.
  7. Author the DVD with TMPGEnc DVD author 6.1

You might be asking yourself why we're going to use so many different tools? The answer is these are all high quality tools, specifically written for the taskwe'll use them for. Every single tool we're going to use, with the exception of TMPGEnc DVD Author is also freeware and often open source too.

The software zipfile
You can download all the tools needed for this guide from their official website, but you can also download my 6mb zipfile which has all tools already in it. The archive was created with the latest version of stuff on 2006-04-30. Click here to download the software zipfile. It's recommended to get this zipfile for use with this guide, as the options of the applications will differ if you're using different versions.
The guide often says something like "Now start BeSweetv1.5b31\BeSweetGUI.exe", this always is a file in this zipfile.

Tools in this zipfile:

=1= Getting your WinXP installation ready

  1. Installation of the capture card (optional)
    (This only applies to people with a BT8x8 capture card, more info on this can be found at A list of compatible cards:
    To be able to capture in the best possible way, we need to install this custom capture card driver for cards with BT8x8 chipsets. Browse to Installers\btwdmdrvinstaller5.3.8 from my zipfile with all the needed tools in it. If you have such a capture card and run BtInstaller.exe inside this dir. Then just follow the installation procedure.

  2. Installation of the capture codec
    Browse to Installers\huffyuv-2.1.1 in the zipfile
    Right click huffyuv.inf and choose Install
    install huffyuv

  3. Installation of the AviSynth frameserver
    Now we need to install the frameserver, what this tool does will be explained later. In explorer, go to Installers\Avisynth_256, run Avisynth_256.exe and follow the installation instructions.

=2= Capturing video with VirtualDub

In order to get the video on your computer, you'll need to capture it. I'll walk you trough the process on a step-by-step basis.

  1. Start VirtualDub-1.6.14\VirtualDub.exe from the zipfile

  2. File -> Capture AVI and VirtualDub will go from processing to capture mode

  3. File -> Set capture file. A "Save As" dialog will appear.
    Check "Set this capture filename as the default"
    Now choose a filename on a drive where you have plenty space free. (55gb for 90mins of captured video)
    Click Save

  4. Now we're back in the main capture screen. Click "Device" next to "File" and select your capture card in the device list.
    For people who installed the btWincap drivers earlier, the device name will be "Conexant's BtPCI Capture (DirectShow)"
    virtualdub capture device

  5. Click Video->Preview
    Click Video->Preview Acceleration->Both fields
    virtualdub preview acceleration

  6. Click Video->Video source->Video Composite or S-Video.
    (If you connected your cam to the pc with the yellow plug its Composite. If you're using the cable that looks like a mouse PS/2 plug, then its S-Video)
    virtualdub video source

  7. Click Video->Capture filter
    Select the appropriate PAL standard for your system. For me this is PAL_B as I live in the Netherlands, I don't know what it is for you.
    If you don't know either, get the standard by partially running the btwincap installer again. In the step where you select a country, your standard is shown. When you see it just cancel the installation.
    virtualdub capture filter

  8. Click Video->Set Custom Format
    Select the number 720 in the first column, 576 in the second and YUY2 in the third. Then ok the dialog.
    Note that this step is very important for the capture quality
    virtualdub custom format

  9. Now make sure the device you're going to capture from is hooked up to your capture card and press play. The video should now show up in the VirtualDub window. Are there borders with noise? Then we have to enable cropping. If there isn't any noise on the borders, skip this step.
    Click Video->Cropping and a new dialog will appear. Increase the number textboxes until the noise has disappeared but WATCH OUT. You may ONLY crop by multiples of 4. So that's 4, 8, 12, 16 etc. If you use a number that's not a multiple of 4 you won't be able to finish this guide.
    Click OK when done.

    An image with noise on the borders which needs to be cropped: (removed the head for privacy reasons ;)
    virtualdub cropping settings

  10. If you're capturing from an analog video source like VHS, you probably need to enable noise reduction.
    Click Video->Noise reduction->Enable
    Click Video->Noise reduction->Threshold
    Drag the slider all the way to the left and press the arrow button "right" on your keyboard 20 times. Then close the little dialog.
    virtualdub noise reduction


So much for the video configuration, now we're gonna setup the audio config!

  1. Make sure "Enable audio capture" is checked in the Audio menu (Right next to Video).
    virtualdub audio capture

  2. Audio->Raw capture format, select "PCM: 44100Hz, stereo, 16-bit" and OK
    virtualdub raw capture format

  3. Audio->Compression, select "<No Compression (PCM)>" and OK

  4. Audio->Input Source->Line in (Assuming you have connected the audio to the line-in port of your soundcard (best solution))

  5. Audio->Audio Source->Audio Line

  6. Audio->Volume meter, and a volume meter will show up in the bottom of the screen.
    Audio->Windows Mixer, keep this dialog open
    Now play some parts on your video device with some loud noise in it, drag the slider on the windows mixer to a point where the 0dB mark isn't reached. On my system this slider is almost all the way down to the very first mark on the slider.
    virtualdub windows mixer

  7. Capture->Settings, set framerate to 25.0000 and OK
    virtualdub capture settings

  8. Capture->Stop conditions
    Check "capture time exceeds", uncheck the others.
    Check how many minutes are on your tape or tv-program, add about 10mins to that, calculate how many seconds that is and fill that in.
    So a 90min tape: 90min+10min=100min 100min*60secs=6000secs
    Click "Save"
    virtualdub stop conditions

  9. Capture->Timing
    These settings make sure the captured video will remain synced with the captured audio. In the past there were lots of VirtualDub mods which added this feature. As far as I can see you don't need those mods anymore as VirtualDub now supports this syncing from stock.
    The default settings are ok here, or at least, they work just fine for me.

  10. Capture->Disk IO
    If you're not sure what kindof buffer your harddisk has, just check "Disable windows write buffering" and OK the window.
    If you know what your HDD buffer is, set "Chunks in buffer" to 2, and increase the "Chunk size" until the "Total buffer" value equals your HDD buffer.

  11. Capture->Capture Drives
    Because AVI files can only be ~2gb large, the recorded stream will be split up in multiple AVI files. In this dialog you can configure where these files will go.
    Click "Add spill drive", set priority to "+0" Threshold to "50Mb" and Path to the path where you selected the capture destination file in step 3.
    For instance, in step 2 I saved my capture file as D:\WORKCAPTURE\capture.avi so my path is: D:\WORKCAPTURE
    Set "Try not to create AVI files smaller than" to 50 megabytes
    Set "Try not to create AVI files larger than" to 1900 megabytes
    virtualdub spill system

  12. Make sure that "Capture->Enable multisegment capture" is checked.

    virtualdub multi segment

Now we're done configuring!
Rewind your tape or whatever, press play, now in virtualdub go Capture->Capture video to start capturing!
Pres escape to manually stop the capture.

Capturing Pitfalls:


=3= Frameserving with AviSynth

In order to get the right format of video to the encoder, you'll need to frameserve it. I'll walk you trough the process on a step-by-step basis.
  1. Copy Misc\PAL.DVD.avs from the zipfile to the directory where your captured files are, these are the contents of the avs script.
    # Put this script in the same dir as your captured files
    # All sources go here
    AviSource("capture.00.avi")+< I cut some text here so it displays nicely :) >+AviSource("capture.26.avi")
    # If you captured, its likely you pressed the stop button 'too late'. A number of frames with no video will be on the end of the last avi file. 
    # We're gonna trim these off here #Trim(0,139464) # We're de-interlacing the captured video before applying any other filters! Bob() # Bob() doubles the framerate, SelectOdd() brings it back down again. SelectOdd() # Resizing to PAL format # Use bilinear resizing instead if you're shrinking instead of enlarging. #BilinearResize(720,576,0,0.75) Lanczos4Resize(720,576) # Fadein/out from/to black on the start and end of the video. FadeIn(4) FadeOut(4) # Fix audio sync, value depends on captured material. DelayAudio(-0.15) # Fix audio loudness. Normalize(0.98) # Convert to YV12 so HCenc will accept it ConvertToYV12()
    Change the third line with all the AviSource()'s on it to match your number of captured files.
    Note that the last of the capture.XX.avi file is often like 11kB large. Don't add this one to the script, it's only a placeholder with no valid video data in it!!

    Note: this script resizes your captured video to the PAL format. If you have cropped off a lot of pixels, this resize method might mess up the aspect ratio. Use PARanoia to generate a resizing script which adds black borders on the sides. As I only had to crop by a few pixels with my capture card, I'd rather have a video stretched with a few pixels than black borders along the sides.

  2. Fix audio sync
    - Open VirtualDub-1.6.14\VirtualDub.exe in the zipfile
    - File->Open Video File, select one of the avi files you have captured
    - Press play and check if the audio is in sync with the video
    - If not, go Audio->Interleaving and enter an audio skew correction until you get it right.
    - Write down the delay value, write down 0 if the audio was already in sync
    - Open up PAL.DVD.avs with notepad (you just copied this to the dir where your captured files are).
    - Look for the line "DelayAudio(-0.15)". Replace -0.15 with the following number:
    (The value you just wrote down * -1) / 1000
    So if you wrote down a delay of 150ms, thats -0.15

    if you wrote down a delay of 450ms, thats -0.45

    if you wrote down a delay of 1500ms, thats -1,5

    if you wrote down a delay of 0ms, then you dont need to fix the audio sync. Add the character # before DelayAudio.
    the line should then look like "#DelayAudio(whatever)"
    (If a # is the first character of the line, it will be ignored. It's called a comment)

    - Save the notepad file.

  3. Fix video trimming,
    If you captured, its likely you pressed the stop button 'too late'. A number of frames with no video will be on the end of the last avi file. We're gonna trim these off.

    - Make sure the Trim() command in your .avs script is commented out so it looks like #Trim(whatever)
    - Open VirtualDub-1.6.14\VirtualDub.exe
    - File->Open Video File, select the PAL.DVD.avs file you just copied to the dir where your captured files are.
    - Drag the time slider all the way to the right.
    - Now start pressing the left button and you'll probably get a blue screen. This blue screen is what could be snow/noise on your TV when there is no signal. Find the last actual frame of the video with an image on it.
    - In the bottom of the screen, it shows the current frame number and the time. Write this frame number and time down.
    virtualdub framenumber

    - Open up the PAL.DVD.avs in notepad, look for the #Trim() line.
    - Remove the leading # character.
    - If the frame number you wrote down was 123456, make sure the Trim() command looks like "Trim(0,123456)". Without the leading # char!!
    - Save the file and open up the .avs file with Virtualdub again and see if it looks allright. The end should now be an image, not a blue screen like before!

Frameserving pitfalls

If you get the error below while trying to open your .avs script:

#Message: "Could not decompress frame 0"

Then this can mean two things. You either have a file in your AviSource() list which has no video in it at all, or the first frame of the video file is actually bad. I only had this problem on one occasion. One of the .avi files had a bad first frame. To fix this problem, there are two solutions. The easiest solution is just capturing the entire video again. But there's a faster way too!

Now open the original .avs script again and see if its fixed!

=4= Encoding with HCenc

Now we're going to convert the video to DVD compatible format. I'll walk you trough the process on a step-by-step basis. HC encoder is a very good CCE alternative. HC has some significant advantages over CCE. It's freeware and, on my system, a lot more stable (try googling for "cce crash"). I have compared the encoding results with other software like ULead, TMPGEnc, QuEnc *and* CCE. It suprised me the free HC encoder came up with the best results every time, and also the fastest encoding time!

We're going to assume 192kbps audio

  1. Bitrate calculation
    Go to
    In the previous step "Frameserving" we wrote down how many hours and minutes our video takes. Enter this amount of time in the calc tool.
    Now select audio bitrate 192kbit/s
    Now press the "Advanced mode" button and change the 4480MB value to something like 4400. We're doing this because we need to keep some free space for the DVD Menu later on.
    Write down the calculated bitrate and the DVD Max bitrate.

  2. Input/outputs
    Now start HC018\HCgui_018.exe from the zipfile
    Select the PAL.DVD.avs file you copied to the dir where the captured files are as input file.
    Choose an output file, this will be the encoded mpeg file for the DVD.
    Choose a logfile.

  3. Bitrates
    Check the bitrate-average bitrate radiobutton.
    For average (kb/s) fill in the calculated bitrate you wrote down earlier (step 1)
    For maximum (kb/s) fill in the max bitrate you wrote down earlier (step 1)

  4. Encoding quality
    Select encoding profile "normal", or higher if you have plenty time to spare. The ideal option would of course be 'best'. On my AMD 64 3200+ it takes a little over 5 hours, to encode 90mins of video with 'best' checked.

  5. Aspect ratio
    Select 4:3 (Assuming you didnt capture in widescreen resolution)

  6. Miscelanious
    Make sure interlaced is UNchecked (as in blank),
    These ones should be checked: scene change, autogop, VBV check, seq encode

  7. Frames
    Click "All frames" button to make sure HCenc will process all frames.

  8. Hit the "Make DVD compliant" button (just to be sure).

  9. Click the "save HC.ini" button, so you wont have to enter all these settings again the next time.

    Leave all other settings as default, your HCenc screen should now look something like this:
    hcenc settings
  1. Click the encode button, and have a lot of patience

  2. When encoding is done, run GSpot\GSpot.exe from the zipfile

  3. File->Open, select m2v/mpeg file you just encoded, check if it says dvd compliant

    If so, we're done encoding the video.

You now have encoded the video file. There indeed is no sound yet when you play it, that's the next step!

=5= Ripping the audio from the captured files

  1. Open VirtualDub-1.6.14\VirtualDub.exe from the zipfile

  2. Open the PAL.DVD.avs file you copied to the dir where the captured files are as input file.

  3. Audio->Full Processing Mode
    virtualdub full processing mode

  4. Audio->Conversion, select 84000 Hz and OK
    virtualdub conversion

  5. File->Save WAV
    virtualdub save as wav

  6. Have some patience

=6= Encoding the audio with BeSweet

  1. Open BeSweetv1.5b31\BeSweetGUI.exe from the zipfile
  2. Choose Wizard mode and press GO
  3. Drag the WAV file you just saved in the dialog, then click Next
  4. Select MP2
  5. Choose Mono or Stereo, click Next
  6. Choose 192 bitrate in the list, and "None" in the FRC Presets, Click Next
  7. Click GO (this will take much less time than encoding the video part).

BeSweet will now encode a DVD compatible audio file which we can use in our DVD Author program!
The encoded file will be saved in the same dir as where the WAV file is.

=7= Authoring the DVD

In this step we'll be combining the video and audio, and put it on a dvd with a nice menu.
This step is written for TMPGEnc DVD Author v1.6. This program is available as trial, but not included in my zipfile. You can download it here.

Adding the files

  1. Start TMPGEnc DVD Author. (Im using version 1.6)
  2. Click "Create New Project"
  3. Click "Add File", select the video file you encoded with HCenc (the m2v file)
  4. Select the Audio file BeSweet just encoded

    tmpgenc dvd author add clip

Adding chapters

  1. Now press the "Chapter cut edit" button
  2. Drag the horizontal slider to the points where you want the first chapter cut to be you can also use the arrow buttons.
  3. Press the "Add current frame to chapter button"
  4. Repeat step 6 & 7 till you're done.

    tmpgenc dvd author chapters

  5. Hit OK

Setting titles

  1. Hit the settings button in the left column
    Change the title to what you would consider to be the general title for all of the video you just encoded

Menu Settings
(This is all just the way I did it, you can decide about your own approach.)

  1. Hit Menu Display Settings
    Select "Only track menu"
    Firstplay action: Display Main Menu
    Action to take after each track has been played: Display Main Menu

  2. Change chapter thumbs by clicking the thumbnails in the preview windows

  3. I really dont think I have to explain more things as its all pretty easy to use

Good luck!