The Anal-Retentive Obsessive-Compulsive's Guide to Perfect Laserdisc Captures VCD Edition by Kris Kelley 1. Introduction This is yet another "how-to" on video capture, with a specific focus on capturing programs from laserdisc. I chose to write about laserdiscs because, quite simply, there are a ton of good movies and other programs still not available on DVD! Examples are the 'Indiana Jones' trilogy, the first 'Star Wars' trilogy, and a number of old television cartoons. I expect they will be released on DVD eventually, however, I am not holding my breath, especially when I know George Lucas has vowed not to release the early 'Star Wars' movies until 2005! Until then, watching laserdiscs is fine, but CD- sized discs are much easier to handle and carry. In fact, depending on the format used, it is often possible to use one single-sided disc to store programs that require two or more laserdisc sides! Of course, it is quite possible to use this guide to make captures from VHS tape. However, laserdiscs are ideal for those who want their captures to be as clean as possible without going out and hunting down the original film master. Laserdiscs do not degrade with each playback like VHS tapes do, and many laserdiscs have features movie-philes love, such as letterboxing and CD- quality digital audio. 2. Things to Know before Starting I must warn you that it is absolutely impossible to talk about video capture without spouting off a host of technical terms. Any attempt to explain what these terms mean, while at the same time using them to explain other things, would kill all hope of being understood. Therefore, I'm not even going to try. I have added some sections to the end of this guide, to better explain certain words and concepts. However, if you are new to the world of A/V capturing, please do not expect this guide to explain everything. I will be as clear as I can, however, I am writing for one particular project, and to thoroughly explain everything would require a very thick book. In fact, several very thick books have already been written on these topics. This guide is intended for North American, Japanese, and other audiences who live where the "NTSC" standard for home video is used. The rest of the world follows the "PAL" standard, with different technical specifications. There are three editions of this guide, each one focusing on saving to different file and disc formats. This is the VCD edition. Finally, I do not call this an "Anal-Retentive, Obsessive-Compulsive" guide for nothing. This is not the best reading material for someone looking for a quick and casual way of recording movies on their computer. 3. What Is the Primary Goal? Before starting a new project, one important question needs to be answered: What disc format should be used for storing and watching the captured program? There are a lot of options here, and the final decision should be based on the level of quality desired versus how "portable" the disc should be (some disc formats are more widely supported than others). Some choices are: * VCD (Video Compact Disc) A predecessor to DVD, VCD uses standard CD-ROMs to store up to 74 (or 80) minutes of digital audio and video on a single disc. VCD video, based on the MPEG1 video codec, is roughly similar in quality to a VHS tape that has been played a few times. VCD audio, based on the MP2 codec (also known as MPEG1 Layer 2, older than the popular MP3 or MPEG1 Layer 3 codec), is somewhat inferior to CD audio, though the difference is largely negligible. VCDs have very wide support. They are by far the easiest to create, with many video editing and CD creation tools offering VCD support. They are also by far the easiest to play; most stand-alone DVD players will play VCDs, and there is software available to play VCDs on computers and even some game consoles like the Sega Dreamcast. The disadvantage is that VCD uses older digital video technology, and the the difference in quality is very noticeable. I do not consider VCD to be a high quality format. * SVCD (Super Video Compact Disc) When DVDs were first coming out, several institutions, most notably the government of China, sought an alternative that wasn't quite as restricted by royalties and license agreements. The SVCD format was spawned from this desire. SVCD offers greater quality control, and yields better results than VCD. Like VCD, SVCD uses the same media as audio CDs. SVCD video is based on the same codec used for DVD video (MPEG2), while SVCD audio is basically the same as VCD audio. Depending on the quality settings used, a single SVCD can hold anywhere from 30 to 80 minutes of digital audio and video. Unfortunately, SVCDs are not as widely supported as VCDs. Fewer stand-alone DVD players play SVCDs, though some do. Most computer DVD DVD programs will play SVCDs, though sometimes a little trickery is needed. Also, because SVCD uses the MPEG2 video codec, which is licensed technology, there are fewer tools available for creating SVCDs, and these tools are not free. However, there are high quality tools available at decent prices. An SVCD created with the right amount of care will look *much* better than a VCD created from the same source. If you want to use a stand-alone DVD player to watch laserdisc captures, and the stand-alone player has SVCD support, then I highly recommend using the SVCD format. (NOTE: To find out all the abilities of your stand-alone DVD player, including whether or not it will play home-made VCDs and SVCDs, check out the player database at http://www.dvdrhelp.com. This is a very helpful site, offering all sorts of information, tutorials, and links to software concerning digital audio and video.) * AVI (Audio Video Interleaved) AVI technically isn't a disc format. However, people often create AVI files with the intention of storing them on CD-ROM. This makes AVI a disc format of sorts, at least for the purposes of this guide. AVI offers the greatest creative freedom, with virtually no restrictions on codecs or level of quality. The only limits are personal preference and the intended amount of storage space. Nowadays, a popular way to use AVI is to create CD-sized AVI files using the DivX video codec and the MP3 audio codec. A single 700MB CD can store a 90-minute DivX-based AVI with excellent quality, and a 2-hour DivX-based AVI with good quality, which neither the VCD nor SVCD formats can offer. (NOTE: The DivX video codec is free for personal use, and is available at http://www.divx.com. The MP3 audio codec is technically not free, but it does come bundled with many audio software and hardware packages, and people have found other ways of acquiring it.) The biggest disadvantage of AVI files is their reliance on a computer. Specifically, they can only be played on a computer that supports the codecs used to create the files. Some programmers are working on bringing DivX-based AVI support to the Sega Dreamcast and the Sony PlayStation 2 video game consoles, however, these projects tend to require quality settings lower than what I personally would be happy with. Having said all that, I do expect AVI support to broaden in the future. There will probably be a day when AVIs can be played on a stand-alone player, or at least something more easily integrated into a home entertainment system. * DVD (Digital Video Disc) DVDs are currently the pinnacle of digital video, at least compared to other formats used by stand-alone players. The video and audio quality is very high, and the list of possible features is enormous. With recordable DVDs, proper care will yield a disc that plays indistinguishably from the original laserdisc, except the DVD will not have to be flipped over! The disadvantage to using DVDs is the obvious hardware and media requirements, namely, a recordable DVD drive and recordable DVD discs. These are more expensive than recordable CD drives and discs, making inevitable mistakes that much more costly. DVD mastering software is also required, and this is usually not cheap, although some DVD recordable drives come bundled with this software. To make matters even more confusing, there are multiple, competing standards for recordable DVD discs, and care must be taken to use discs that are compatible with both the recordable drive and the stand-alone player to be used. (NOTE: The DVD player database mentioned above at http://www.dvdrhelp.com also includes information about which players support which types of recordable DVD discs.) This is by no means a complete list of available formats, but it is a list of the most popular. This edition of the guide focuses on the VCD format; other editions focus on SVCD and AVI. I may write a DVD edition in the future, once I have had more experience using the DVD format. 4. Setting Up Getting the system ready is necessary before any capture project can begin. 4.1. Gathering Supplies To capture laserdisc programs, the following are needed: * A computer. A relatively fast computer and *plenty* of hard drive space are necessary for working with high quality captures. If any part of the computer is too slow, the capture will drop frames, resulting in video that skips. If hard drive space is skimped on, lower quality settings will have to be used during capturing, and this will be evident in the final file. My system sports a Pentium Celeron 900, an IDE 7200RPM 120 gigabyte hard drive, and 256 megabytes of PC-100 RAM. 80 gigabytes of the hard drive is reserved for A/V projects. During the capture process, the CPU typically hovers between 40% and 60% utilization. * Video and audio capture hardware. Quality is essential here. The video hardware should be capable of capturing 29.97 frames per second at a resolution of 640x480. The audio hardware should be capable of recording stereo audio at a 48kHz sampling rate with 16 bit sample sizes. I use the ATI All-in-Wonder Radeon video card and the Soundblaster Live! sound card. * Software. For capturing, I use VirtualDub, available at http://www.virtualdub.org. I have found VirtualDub to be the best free capture program for Windows, and it also provides basic editing tools. I run VirtualDub on Windows 2000 with NTFS support, so that my A/V files are not limited in size to 4 gigabytes. Sometimes I am working with files well over 30 gigabytes! (NOTE: Some programs, VirtualDub included, are capable of automatically spanning large A/V files across multiple smaller files, to work around file-size limitations. However, I do not like using this feature, because not all AVI-based programs offer support for automatically stringing multiple files together.) (NOTE: VirtualDub uses the AVI file format to save its captures. This means there is an excellent amount of freedom over the audio and video within these captures, and plenty of free tools available to work on them. I take advantage of this freedom by exerting powerful control over the capturing and editing processes, to preserve the highest amount of quality possible. The money I save using free software doesn't hurt, either. Some capture programs, including a few that come bundled with video capture cards, use the MPEG2 file format to save their captures. Capturing with these programs is relatively easy compared to using VirtualDub, because there are less decisions to make, and these programs often have convenient configuration presets. However, these advantages come at a price. MPEG2 technology is not free, therefore there are few, if any, legally free programs with MPEG2 file support. Also, the MPEG2 file format uses lossy codecs; repeatedly saving the same A/V file as an MPEG2 will significantly degrade its quality. If you decide to use an MPEG2-based capture program, please note that the rest of this guide contains instructions specific to VirtualDub and the other software packages I use. This guide will still be good for general tips and ideas, however, you will need to read the documentation provided with your software to learn how to edit and convert your captures with minimal loss of quality. By the way, if you are thinking about using an MPEG1-based capture program, forget it. MPEG1 quality is just too low to use in anything other than the final encode.) For VCD encoding I use TMPGEnc, an excellent free encoder available at http://www.tmpgenc.com. (NOTE: TMPGEnc, when downloaded from the company web site, will actually be a 14-day demo of TMPGEnc Plus. TMPGEnc Plus offers additional features, most notably MPEG2 support for SVCD and DVD encoding. However, all of the features necessary for VCD encoding are provided by TMPGEnc, which TMPGEnc Plus will revert to after the 14-day trial is up.) During the capture process, I also use the Huffyuv video codec, which currently does not have a web site. However, a web search will turn up several download sites. * The laserdisc(s) of the program to capture. * A laserdisc player. For best results, use a player capable of reading digital audio tracks, and supporting S-video output. A dual-sided player is not essential. I use the Pioneer DVL-919. * Cables for connecting the laserdisc player to the computer. 4.2. Putting It Together Getting the system ready should be a matter of following the instructions for installing the capture hardware and software, and then making the necessary connections between the computer and laserdisc player. For my system, a couple of extra steps are necessary: * VirtualDub uses an older standard known as Video for Windows (VFW) to communicate with video capture hardware. This standard is not natively supported by Windows 2000, however, Windows 2000 Service Pack 2 includes wrapper code that allows VFW-compatible programs to work. This code is not enabled automatically, so follow the instructions at http://www.virtualdub.org/docs_vfwwdm to utilize the wrapper. * While the ATI All-in-Wonder Radeon includes hardware for capturing audio as well as video, the cables actually work as a pass-through, and the computer's sound hardware (the SoundBlaster Live! in my case) is responsible for the recording. However, for whatever reason, connecting the cables as prescribed by the All-in-Wonder Radeon's instructions allows only mono audio to be captured when using VirtualDub under Windows 2000. This is perhaps due to the Windows 2000 VFW wrapper not offering full support for stereo audio. The simple workaround is to not use the All-in-Wonder Radeon's pass-through technique, and instead connect the laserdisc player's audio output directly to the sound card's audio input. This requires an extra adapter to go between the SoundBlaster Live!'s 1/8" (headphone style) jack for audio input, and the laserdisc player's RCA jacks for audio output. 5. Capturing Everything for capturing should now be in place. 5.1. Configuration Configure the system and the capture program, using settings ideal for AVI. For a Windows 2000 system running VirtualDub, this involves the following: (NOTE: Enterprising users will definitely want to read VirtualDub's documentation, to find out what all the little knobs and switches do. These instructions are the result of my experience in capturing laserdisc programs, and may not suit everyone's tastes.) * Using the sound mixer applet in the Windows system tray, select for recording the audio source the laserdisc player is connected to (usually "Line-in"), and make sure the volume slider is as high as it can be without clipping the incoming audio. (NOTE: Newer versions of VirtualDub also provide a link to the sound mixer applet. When in capture mode [see below], use "Audio" -> "Windows mixer".) * Start VirtualDub and select "File" -> "Capture AVI..." This switches VirtualDub to capture mode. Before capturing for the first time, VirtualDub requires a significant amount of configuration, which is outlined in the following steps. Fortunately, most of this configuration is a one-time process, and preferences can be saved to allow future captures to progress much more quickly. * Select "Audio" -> "Compression..." In the window that appears, use the "Format" pull-down menu to select which audio codec VirtualDub will use during capturing, then use the "Attributes" menu to configure that codec. I strongly recommend using uncompressed, high quality audio. Therefore, select "PCM" for the audio codec, and "48,000 kHz, 16 Bit, Stereo" for configuration. Click "OK" when finished. * "Audio" -> "Volume meter" brings up a window where the level of incoming audio can be changed. This ties directly into the controls provided by the sound applet in the Windows system tray, therefore, adjusting the controls here may not be necessary. However, this window also displays level meters for both channels of stereo audio, and can therefore be used to troubleshoot audio problems. If desired, begin playing a laserdisc, and monitor the level meters during this time. If the meters never max out, the volume can be increased without fear of degrading the sound quality. If the meters are constantly maxing out, the volume should be decreased, otherwise it will sound awful in the capture. If one or both of the meters are not moving at all, there is a problem either in the hardware connections, or in the selection of which audio source to record from. Check the cables and use the system tray applet to investigate. Close this window when finished. * There are two ways to set the video resolution and color standard used during capturing, "Video" -> "Format..." and "Video" -> "Set custom format..." Only one method needs to be used. "Video" -> "Format" is the easiest, as it will offer only the most common resolutions, and only the color standards supported by the video capture hardware. For resolution, I recommend 640x480. I only have one color standard available, so I leave it set at UYVY. I am not familiar with the intricasies of the different color standards, so I cannot offer much advice. When using a capture card that offers more than one option here, my advice is to find out which one does the best job of preserving color information while also allowing use of the desired video codec (see below). The author of VirtualDub has a more informed opinion on selecting a color standard; read his take at http://www.virtualdub.org/docs_capture, under the question "Which capture format should I choose if I'm going to use video compression?" "Video" -> "Set custom format..." offers every choice of resolution and color standard possible, including some that may not be supported by the video capture hardware. This method can be used to capture at the standard resolution for VCD, 352x240. I do not recommend using this resolution when capturing theatrically released movies, as some of the techniques given in this guide specific to theatrical movies will only work on captures with a vertical resolution of 480. However, 352x240 is safe to use when capturing television programs, if hard drive space needs to be conserved. Note that VirtualDub will complain if you try to select a resolution or color standard not supported by the video capture hardware. In either case, click "OK" when finished. * Use "Video" -> "Source" to select the video source and perform some additional configuration to the video capture hardware. This option will present a new window with three available tabs. The "Capture Source" tab, first displayed when the new window appears, is where the video source is selected. The capture hardware to be used should be selectable under "Select a Video Device". If the hardware has more than one available video input, such as offering both composite video and S-video, select the active connection under "Select a Video Source". S-video is greatly preferred! The "Device Settings" tab offers controls such as brightness, contrast, and other such picture manipulation tools. Any such configuration not supported by the video capture hardware will have its control greyed out here. It is generally safe to leave all of the controls at their defaults, value 128, right in the middle. However, experienced users may want to fiddle with these controls. In my case, I have found that my All-in-Wonder Radeon captures somewhat more darkly than I would like, so I move the brightness slider a little higher to make up for it. I then move the contrast slider slightly higher as well to compensate. The "Camera Controls" tab is relevant only to digital cameras, and does not apply here. Click "OK" when finished. * Select "Video" -> "Compression..." In the window that appears, use the list on the left side to select the video codec that VirtualDub will use during capturing. Only the codecs compatible with the selected color standard will be listed. After selecting a codec, click the "Configure" button to adjust the settings relevant to that codec. While I would strongly recommend using uncompressed video, the storage space and transfer rate required are obscene. Therefore, I instead recommend using a codec that uses lossless compression. The best I have found is Huffyuv. Note that Huffyuv will only work with YUV-based (YUY2, UYVY, YVYU) and RGB-based (RGB16, RGB24, RGB32) color standards. Configuring Huffyuv is easy. If capturing with a YUV-based color standard, choose one of the options from the left pulldown menu; if capturing with an RGB-based color standard, choose one of the options from the right pulldown menu. The options are similar for both, with the top option ("Predict left") being the least CPU intensive, and the bottom option ("Predict gradient") potentially creating the smallest (but still very large) files. There is an extra option for RGB-based color standards, "Convert to YUY2". If selected, an option from the left pulldown menu will also have to be selected. Converting to YUY2 will result in a slight, probably unnoticeable loss of color information, but will also result in significantly smaller files. The checkboxes can be left alone or experimented with as desired. Click "OK" on all windows when finished. (NOTE: The "Video" -> "Compression (compatibility)" option is relevant only to those who need to use VirtualDub's compatibility mode for capturing. This mode relies solely on the VFW standard for capturing to an AVI file, whereas VirtualDub normally handles the AVI file itself, allowing for more features. The author of VirtualDub offers more information at http://www.virtualdub.org/docs_capture, under the question "What's the difference between compatibility mode and normal (internal) capture?" In short, I have never used compatibility mode, and I doubt I would want to. Therefore, this guide does not go into any detail about the settings specific to compatibility mode.) * The remaining options listed in the "Video" menu provide additional picture manipulation tools. However, I do not feel it is wise to make the computer work any more than necessary while capturing. Therefore, leave the rest of these options alone. Any necessary editing can be done after the capture is finished. * Use "Capture" -> "Settings..." to set the frame rate. In the space provided, enter "29.97" to match the frame rate used by North American and Japanese laserdiscs. Make sure the box for "Capture audio" is checked, also. The remaining options here can be left at their defaults. Click "OK" when finished. * Use "Capture" -> "Preferences..." to select where the capture file will be stored. Either use the browse button next to the space labelled "Default capture file", or enter a path in that space, to select the name and location of the capture file. Make sure there is plenty of room free! Additional options here can be used to define most of VirtualDub's capture configuration as the default. The four checkboxes of "Save current capture settings as default", "Save current audio format as default", "Save current video format as default", and "Save video compression settings" can all be used to preserve the relevant set of configurations, so those steps can be skipped during future captures. I have found that the only settings not preserved are the volume slider under "Audio" -> "Volume meter" and the video source settings under "Video" -> "Source". The rest of the settings here can be changed as desired; they will not affect the capture process. Click "OK" when finished. * Use "Capture" -> "Stop conditions..." to enable automatic capture stopping, if desired. For example, since no laserdisc side exceeds 60 minutes, the checkbox for "capture time exceeds" could be used to automatically stop capturing after 60 minutes (3600 seconds). Click "Accept" when finished. * Under "Capture" -> "Timing..." make sure the box is checked for "Adjust video clock dynamically to match audio clock". Because separate hardware is responsible for audio and video capturing, they are not always guaranteed to be in sync with each other. This option enables VirtualDub to exert more control over keeping the audio and video in sync. More on audio and video sync in section 6 of this guide. * I have not used most of the remaining options of the "Capture" menu, and largely they do not directly affect the quality of the capture. In particular, I do not use the "Capture drives..." or "Enable multisegment capture" features, because I prefer to keep each capture in a single file. However, I do have the "Show information panel" feature enabled, so that I can keep an eye on VirtualDub's status while it is capturing. If any of these features look useful, read the author's documentation for more information on them. 5.2. Capturing, Really This Time Now the capture is ready to begin. Because I am leery of A/V synchronization problems, and also to keep the capture files as small as possible without breaking up the audio and video, I capture no more than one side of a laserdisc at a time. This means most movies will be stored in two or three capture files by the time I am finished. After configuring VirtualDub, capturing is easy: * Start the laserdisc and verify the computer is receiving both audio and video. * At the right moment, press F6 to begin the capture. Then, sit back. Do not try to use the computer while it is capturing. During the capture process, if the "Show information panel" feature is enabled, information about the capture will be displayed on the right side of VirtualDub's window. Of particular importance is the "Frames dropped" number. Zero is the ideal number of frames dropped, however, seeing this number increase is not necessarily a reason to panic; in fact, sometimes frames are not really dropped at all (more information about that in section 6). Generally, because the laserdisc program is being captured at almost 30 frames per second, a single-digit or even double-digit number of dropped frames will not be very noticeable, provided the drops occur evenly throughout the capture. * When the capture has completed, and assuming no automatic stopping features are being used, press the escape key to stop the capture. There will now be an AVI file containing the captured audio and video. 5.3. Additional Captures? Again, I prefer using only one side of a laserdisc to create each capture. However, there will be times when more than one capture can be used to create a single VCD. The obvious example is when CAV laserdiscs (30 minutes per side) are being captured. Depending on how much is stored on each CAV laserdisc side, two or three captures (up to 74 or 80 minutes, whichever is appropriate) can be used to create a single VCD. Another example is when a movie spans three laserdisc sides, but is still less than 2 hours, 40 minutes in length (2 hours, 28 minutes if 74-minute recordable CDs are used). In this case, only two VCDs would be needed to store the entire movie. Because VCD quality doesn't depend on the length of audio and video used, there is no harm in using the maximum length allowed. Section 6 gives information on how to combine captures and, if necessary, cut the combined capture to the proper length. In the meantime, make any additional captures now. 6. Editing Most likely the capture file or files are not ideal for archiving as is. Despite the capture program's best efforts, the audio and video may still be slightly out of sync. There may be extra audio and video at the beginning and/or end of the capture that can be removed. And that's just the beginning. This is where my control-freak nature really shines. Read on to discover how I go about editing my captures. (NOTE: Do not take any of the instructions in section 6 as mandatory. They are here to give an idea of the possibilities of laserdisc capture editing. You are free to exert as much or as little effort as you like here. In fact, you can skip this section entirely and go on to section 7 if you are happy with the way your captures look and sound, and you plan on using only one capture for each VCD. However, if you are as obsessive and compulsive as I am, read on.) 6.1. Getting the Audio and Video Back in Sync VirtualDub is also an AVI editor in addition to being a capture program. When a capture is finished, I open the AVI file in VirtualDub (first selecting "File" -> "Exit capture mode" if necessary). Then, before I do anything else, I resave the capture using a different frame rate. For whatever reason, even with VirtualDub's attempts to keep the audio and video in sync, I find that they still skew a little; after 50 minutes, the audio is off by a fraction of a second, just enough to be annoying. So, I perform these steps to fix the skew: * Select "Video" -> "Frame Rate..." The first section of the resulting window offers three options: "No change", which shows the current frame rate; "Change to _____", which allows a new frame rate to be entered; and "Change so video and audio durations match", which shows what the frame rate would be in that case. On my system, captures always end up with a 29.971 frame rate initially, the result of VirtualDub tweaking the frame rate in an attempt to keep the audio and video in sync. The third option always suggests a frame rate of 29.969. From experience, I have found that using the second option and entering a frame rate of 29.970 does the trick. (NOTE: One might think that since 29.970 happens to be the frame rate originally requested, perhaps VirtualDub shouldn't be given the ability to change the frame rate. In my case, however, disabling that feature in VirtualDub resulted in captures where the audio and video were even *more* out of sync! This is just one of many idiosyncrasies to be found in the world of digital audio and video, and the only way to discover them is through experience, hopefully somebody else's.) Leave the remaining options in this window as they are: "Process all frames" should be checked in the second section, and "None (progressive)" should be checked in the third section. Click "OK" when finished. * Under the "Audio" menu, make sure "AVI audio" and "Direct stream copy" are selected. * Under the "Video" menu, make sure "Direct stream copy" is selected. * Select "File" -> "Save as AVI...". Decide on a name and a place where the new AVI will be saved. This new file will be virtually the same size as the initial capture, so make sure there is enough room. The save may take a while. Once it is complete, the original capture file can be deleted to free up space. If working with more than one capture file, repeat the above steps for each capture file. 6.2. Combining Captures, and Removing Unwanted Audio and Video After I have corrected the audio/video sync problem for each capture, I use VirtualDub to combine multiple capture files (if necessary), and then remove any extraneous parts from the beginning and end. I also remove any duplicate frames at this time. During the capture process on my system, VirtualDub records a number of "dropped" frames that in reality are frames duplicated to achieve the 29.971 frame rate. These duplicate frames do not offer any extra video information. Open the first (or only) capture file in VirtualDub. Then, run each of these steps as desired. * To add an additional capture file at the end, select "File" -> "Append AVI segment..." and select the next capture file. * To remove a section at the beginning, use the slider at the bottom of the screen, the "Backward" and "Forward" navigation buttons, and/or the arrow keys on the keyboard to find the last frame of the part to be removed at the beginning of the file. Then, press the "End" key on the keyboard. Next, drag the slider to the very beginning, or use the "Start" navigation button, and press the "Home" key on the keyboard. The section to remove has now been marked. Press the "Delete" key on the keyboard to remove it. * To remove a section at the end, use the slider at the bottom of the screen, the "Backward" and "Forward" navigation buttons, and/or the arrow keys on the keyboard to find the first frame of the part to be removed at the end of the file. Then, press the "Home" key on the keyboard. Next, drag the slider to the very beginning, or use the "End" navigation button, and press the "End" key on the keyboard. The section to remove has now been marked. Press the "Delete" key on the keyboard to remove it. * To remove a section in the middle (usually necessary after combining captures), use the slider at the bottom of the screen, the "Backward" and "Forward" navigation buttons, and/or the arrow keys on the keyboard to find the first frame of the part to be removed. Then, press the "Home" key on the keyboard. Next, search for the last frame of the part to be removed. Then, press the "End" key on the keyboard. The section to remove has now been marked. Press the "Delete" key on the keyboard to remove it. * To remove dropped frames, use the "{" and "}" keys on the keyboard (the shift key is required) to move to each frame marked as dropped in the AVI. Then, press the "Home" key followed by the "End" key on the keyboard to highlight this single frame. The "Delete" key on the keyboard can then be used to delete this frame. (NOTE: Deleting frames in this manner also deletes the related section of audio. However, this only amounts to about 1/30th of a second of audio, which I have not found to be noticeable.) (NOTE: Do not delete frames marked as dropped if they really are dropped frames! I do this only when frames are actually duplicated, not dropped. See appendix B for more information.) * To save the AVI after doing all desired removals, perform the last three steps in section 6.1. Again, make sure there is enough space for the new file. After the new AVI has been saved, the original capture files can be safely deleted. (NOTE: If working with a capture that will be used on more than one VCD [such as the second capture of a movie spanning three laserdisc sides], do not delete the original capture file. Also, take note of where the program was cut, so that there is no overlap between VCDs.) 7. Encoding The next step is to create an MPEG1 A/V file, encoded to meet the requirements for VCD. The program I use for encoding, TMPGEnc, also provides additional editing tools that can be taken advantage of. Open TMPGEnc, then follow these steps: * When TMPGEnc is first started, the project wizard is automatically run. In the first window of the project wizard, select the desired disc format. Under "Video-CD", select "NTSC Film" if the program is a movie that was originally released in theaters; otherwise, select "NTSC". Then, click the "Next" button. (NOTE: See appendix B for an explanation on the difference between "NTSC" and "NTSC Film".) * In the second window of the project wizard, click the "Browse" button next to the space labeled "Video File", and select the appropriate AVI file. The path to this file should show up in the spaces for both "Video File" and "Audio File". This means that the AVI file selected will provide both the audio and the video to be used in the final encode. The settings in the "Expert Setting for Source" section can be left alone. Click the "Next" button when finished. * The third window of the project wizard offers controls to manipulate how the picture will look in the final encode, organized into four sections. The "Source range" controls provide the ability to select only a subsection of the AVI file to encode, as well as the ability to manually realign the audio with the video. Neither of these should be necessary here, so the box next to "Source range" can be left unchecked. The "Clip frame" controls provide the ability to remove or mask certain parts of the picture frame. In particular, if the captured program is a letterboxed movie, the "Clip frame" controls can be used to mask the letterbox bars, replacing any visual noise that was picked up during the capture process with true black. If this is desired, check the box next to "Clip frame". A new window will appear, showing the movie and providing clipping controls. Use the "Top" and "Bottom" controls to remove the letterboxing bars, and then check the "Top Mask" and "Bottom Mask" boxes to recreate the bars with solid black color (the original resolution must be preserved, or else the picture will be resized improperly in the final encode). The "Mask Color setting" button can be clicked if a color other than black is desired for letterboxing. Click the "OK" button when finished. The "Noise reduction" controls provide the ability to smooth away visual noise, such as the grainy texture present in old movie film, or extra noise that was introduced during the capture process. If desired, check the box next to "Noise reduction". A new window will appear, showing the movie and providing noise filter adjustment controls. I have found the default settings to be satisfactory, so I usually leave these controls alone. Checking the box labeled "High quality mode" will allow a little more time to be spent on each frame, which should improve the quality of the noise removal. Click the "OK" button when finished. Note that enabling noise reduction will slow down the encoding process, but the difference in picture quality is usually worth the wait. The controls in the "Other settings" provide some extra video filters and also offer the ability to fine tune the settings to be used during the encoding process. These controls are for advanced users, and generally do not need to be tweaked. In particular, changing the options for MPEG may result in an improperly formatted MPEG1 file that cannot be used to create a VCD. Click "Next" when finished. * The fourth window of the project wizard is where the bitrate can be adjusted. However, VCD allows only one bitrate, so these options are greyed out. Click the "Next" button to move on. * The fifth and final window of the project wizard is where the name and location of the output file can be set. Also, if the encode should begin immediately, check the box labeled "Start encoding immediately". (NOTE: If you want, you can prepare multiple capture files using the steps in sections 4 and 5, and then have TMPGEnc encode them one after the other in a batch process. When all the files are ready, run TMPGEnc as documented in section 6. When you get to this step, check the box labeled "Create another project(s) for batch encoding" and go through the steps in section 6 again for the next AVI file. When you have finished setting up all encoding jobs, check the box labeled "Start encoding immediately". Note that setting up multiple encoding jobs is a good idea for leaving the computer on overnight, as each job will take a long time to complete.) Click the "OK" button to proceed. The encode will begin. * During the encode, TMPGEnc will display information about its progress. The encode will most likely take a long time to finish, but the computer can be used for other tasks in the meantime, provided they are not CPU intensive. After the encoding process finishes, the final MPEG1 file (or files) should be ready. 8. Disc Creation Test the MPEG1 file using a player that offers MPEG1 support, such as Windows Media Player. If the file plays cleanly, it can now be used to create a VCD. There are many CD creation tools that offer VCD support. Some, like Roxio's Easy CD Creator, provide basic support, creating VCDs that play similarly to laserdiscs. Other programs offer extended support, boasting the ability to take advantage of extra features supported by the VCD standard, including high quality still pictures and basic menu controls, creating VCDs that play more like DVDs. I leave it as an exercise to the reader to decide on a favorite VCD creator. Follow the instructions provided by the software package chosen. 9. Is It Possible to Be Even More Anal? The process outlined in this guide can produce VCDs that look and sound very good. However, perfectionists may object to the way the audio gets nipped and tucked along with the video during the editing process. One remedy is to save the audio to a separate WAV file immediately after the capture finishes, editting the audio and video independently of each other, and then merging the audio and video back together after all edits have been taken care of. Care must be taken to ensure the audio lines up properly with the video after merging them back together, and even then, they may not stay properly in sync. In that case, audio software capable of changing the audio playback rate could be used. Also, if the original capture files end up with a frame rate other than 29.97, the encoding program may complain, as VCD requires a frame rate of 29.97 (or 23.976; see appendix B). TMPGEnc is able to handle source A/V files that have a frame rate relatively close to 29.97. If this is cause for concern, however, the frame rate should be changed to 29.97. The audio may then also have to be adjusted to keep it in sync. VirtualDub supports exporting audio to a WAV file, and also supports importing external audio into an AVI, so VirtualDub can be used for splitting and remerging audio and video. As described earlier, VirtualDub can also be used to change the frame rate, if desired. I am not familiar with any free audio tools capable of adjusting the rate of audio playback, so I cannot make any further recommendations here. 10. Final Words This guide covers a lot of ground. I hope I didn't write too confusingly. If you have any questions or comments about this guide, especially if you see an error that needs correcting, feel free to email me at skunkworx@kingwoodcable.com. Appendix A - A Brief Explanation of Audio/Video Files When it comes to computer files containing digital audio and video (A/V files), there are three things to keep track of: the video codec, the audio codec, and the file format. The video codec determines how the video is encoded. Most video codecs support a variety of resolutions and bitrates. The higher the resolution and bitrate, the higher the quality of the picture, but also the more storage space the video will require. Examples of video codecs include MPEG1 (used in VCDs), MPEG2 (used in SVCDs and DVDs), and DivX (a popular choice for home-made A/V files). The audio codec determines how the audio is encoded. Most audio codecs support a variety of frequency ranges (equivalent to sampling rates in uncompressed audio) and bitrates. Some audio codecs also support more than two channels of audio. Broader frequency ranges and higher bitrates give higher quality audio, but again, they also take up more storage space. Examples of audio codecs include MP2 (or MPEG1 Layer 2, used in VCDs and SVCDs), MP3 (or MPEG1 Layer 3, popular for home-made audio and A/V files), and AC3 (or Dolby Digital, used in virtually all DVDs). The file format defines how the audio and video are mixed together and stored in a single computer file. AVI is the most popular file format, and the audio and video contained in an AVI can be encoded with any codec the computer has been set up to play. Quicktime Movie is another popular file format, and also supports a variety of audio and video codecs. MPEG1 and MPEG2 are file formats as well, but they are more limited than AVI and Quicktime. MPEG1 files can only have MPEG1 video and MP2 audio. MPEG2 files can only have MPEG2 video and MP2 audio. What people call "DivX" files are actually AVI files with DivX video and usually either MP3 or AC3 audio. What I call "disc formats" go a step further; each disc format not only requires a specific A/V file format to be used, but also defines how the A/V file is stored together with other information on a disc. VCD, SVCD, and DVD are disc formats. AVI is not really a disc format, however, AVI quality can still be compared to the quality offered by disc formats. Appendix B - Frame Rates, and the Difference between "NTSC" and "NTSC Film" The "NTSC" standard for home video requires a frame rate of 29.97 frames per second. However, movies that were released theatrically use a frame rate of 24 frames per second. Before these movies can be released on home video, they have to be put through a process known as "telecining." Basically, this process alters the movie's frame rate, so that it can be stored on conventional media and viewed on conventional televisions, all of which use the 29.97 frames per second frame rate. VCDs, however, do not necessarily require telecining. The VCD standard allows for two different frame rates, 29.97 ("NTSC") and 23.976 ("NTSC Film"). The latter frame rate allows theatrically released movies to be stored without telecining. This offers two big advantages: One, a VCD running at 23.976 frames per second stores 20% fewer video frames than one running at 29.97 frames per second; this means each stored frame can use a larger share of the VCD bitrate, resulting in better quality. Two, modern computers and computer monitors, as well as some newer televisions, can be made to play at the lower frame rate if desired; this gives the effect of smoother, more fluid motion in movies that were originally meant to be played at 24 frames per second (VCD players connected to conventional televisions provide on-the-fly telecining when playing a VCD with the 23.976 frame rate). Theatrical movies released on laserdisc require telecining. The good news is, it is possible to "untelecine" a movie captured from laserdisc, creating a capture file with a 23.976 frame rate without any loss of picture information. To determine if a movie has been telecined, play a section of the capture frame by frame. If for every five frames there are three frames that look normal followed by two frames that appear to have different pictures mixed together, the movie has been telecined. (NOTE: By the way, looking for the telecine pattern was how I determined VirtualDub was often duplicating frames instead of dropping them. Removing the duplicated frames restored the pattern.) In theory, untelecining is an easy process for a computer. TMPGEnc offers untelecining, and this feature is automatically enabled when "NTSC Film" is selected. In practice, software programs that offer automatic untelecining don't always do the job perfectly, because the telecine pattern breaks frequently over the course of most movies released on laserdisc. TMPGEnc's untelecining routine is programmed to tell when the pattern has broken, and adjust accordingly. While this process can never be foolproof, TMPGEnc does the best job I have seen. Also, due to the low resolution used by VCD, any hiccups in the untelecining process are not likely to be noticed in final MPEG1 file. (NOTE: Frame rates like 29.97 and 23.976 are used instead of 30 and 24 because of a technical decision made by the U.S. Federal Communications Commission back in the 1950s. Needless to say, movies originally run at 24 frames per second have to be slowed down to match the 23.976 frame rate. This slow-down is very slight, and is seldom noticed by anyone.) Appendix C - Glossary These terms are defined with respect to digital audio and video (computer files, DVDs, audio CDs, and so on). They may mean different things with respect to analog audio and video. aspect ratio A relative measurement of a picture's width compared to its height. This measurement is *independent* of the picture's resolution (see "resolution"). Conventional televisions and computer monitors use a 4x3 or 1.33:1 aspect ratio. VHS, laserdisc, VCD, SVCD, and many DVD titles conform to this aspect ratio. "Widescreen" televisions and computer monitors use a 16x9 or 1.78:1 aspect ratio. Some DVD releases are geared to use this aspect ratio. Most theatrical-release movies use aspect ratios wider than 4x3 and 16x9. There are a variety of tricks used by the movie studios to fit presentations of these movies onto a home television or monitor. Discussion of these aspect ratio modifications is largely beyond the scope of this guide, however, they generally fall into one of two categories: either the original picture is modified to a different aspect ratio, or it is "letterboxed," adding black bars above and below the picture until the desired aspect ratio is achieved. Letterboxing is also how DVD players adjust programs using a 16x9 aspect ratio to play on a 4x3 screen. bitrate A measurement of the amount of data used to store or present a certain amount of audio or video. The bitrate of uncompressed audio is tied directly to its sampling rate, sample size, and number of channels. The bitrate of uncompressed video is tied directly to its frame rate, resolution, and color standard. For compressed audio and video, the bitrate can vary depending on the codecs and settings used, and is usually significantly smaller than for uncompressed audio and video. capturing Basically, using a computer to record audio and/or video from an outside source. The resulting A/V files are called "capture files." channels The number of discrete audio sources within a given audio or A/V file. Stereo audio files, for example, have two channels. codec Short for "code decode". Generally speaking, a codec controls how a set of data is encoded for storage, and then later decoded for presentation. Audio codecs (such as MP3) are used for audio data, and video codecs (such as DivX) are used for video data. Codecs are used primarily to save space. Uncompressed audio and video can gobble up space in a hurry. Most codecs compress the audio and video, resulting in smaller file sizes and lower bitrates, allowing more audio and video to be stored in a given space. In order to achieve the smallest sizes and bitrates possible, many codecs employ what is called "lossy" compression, resulting in some reduction in quality. The amount of quality sacrificed can be controlled by configuring the codecs' settings, and some "lossy" codecs are better at preserving quality than others. For those who don't like the idea of lossy compression, other codecs provide the ability to compress data with little or no reduction in quality. However, the storage space required for files using these "lossless" codecs is often enormous, making them best suited for temporary, intermediate files, where preservation of quality is important until the final file is ready. color depth / color space / color standard "Color depth" and "color space" are often used to describe how the color information is stored in a video or A/V file, that is, how each pixel (see "resolution") of each frame (see "frame") should be colored. There are many different standards for storing color information in both compressed and uncompressed video, and the terms "color depth" and "color space" mean mean different things for different standards. For simplicity's sake, I use the term "color standard" in this guide when referring to these standards, and I try to describe each standard with enough detail as is necessary, without going too overboard. To give one example, the color standard of "RGB24" uses 24 bits of information to store each pixel's color information. Eight of these bits describe how much red to use, eight describe green, and eight describe blue. Due to the physical properties of light, and also due to how monitors and televisions are built, these levels of red, green, and blue light will mix together to form the appropriate color on screen. compression The process of running audio or video data through a codec to use a lower bitrate, and take up less storage space. This is similar to storing computer files in ZIP archives, however, audio and video are usually (but not always) compressed in such a way that they may not be perfectly recreated when uncompressed. See also "codec." frame What we call "motion video" is actually a collection of individual pictures played in rapid succession. Each one of these individual pictures is called a "frame." frame rate A measurement of how often the frame changes when video is played back. The faster the frame rate, the smoother and more convincing movement appears on screen. Theatrical films usually have a 24 frames per second frame rate. Television signals in North America and Japan have a 29.97 frames per second frame rate. letterboxing See "aspect ratio." resolution A measurement of how many individual dots, or pixels, are used to create a picture seen on screen. For example, 640x480 means 640 rows and 480 columns of pixels are used to create the picture, for a total of 307,200 pixels. Higher resolutions mean larger and/or sharper images, but also higher file sizes and memory requirements. VCDs in Japan and North America use a 352x240 resolution. SVCDs in Japan and North America use a 480x480 resolution. Region 1 DVDs can employ a variety of resolutions, but most of them use 720x480. Conventional televisions use analog signals to recreate video and audio, therefore it is technically inaccurate to say what resolution they have. However, high quality North American and Japanese televisions can display a picture comparable to 704x480. This means DVDs use a high enough resolution that individual pixels should not be visible when watching a DVD program. Higher resolutions would not make any noticeable difference in video quality. See also "aspect ratio." sample size A measurement of how many bits are used for each digital "sample" of an audio source. Simply put, higher sample sizes mean less noise is heard when the audio is played back. Conventional audio CDs, for example, use a sample size of 16 bits. This measurement is meant for uncompressed audio that has not been run through a codec. Compressed, encoded audio will sometimes boast a sample size, such as the 20-bit sample size of DTS audio CDs. This simply means the audio data is meant to be unencoded and played back using 20-bit samples, and has been compressed with enough quality preserved to do so. sampling rate A measurement of how often an audio source is "sampled" digitally. Simply put, higher sampling rates allow for a broader spectrum of audio frequencies to be captured. Conventional audio CDs, for example, use a sample rate of 44,100 samples per second. This measurement is meant for uncompressed audio that has not been run through a codec. Compressed, encoded audio will sometimes boast a sample rate, such as the 48,000 per second sampling rate of DVD audio. This simply means the audio data is meant to be unencoded and played back using 48,000 samples per second, and has been compressed with enough quality preserved to do so. uncompressed / raw Audio or video that has been stored exactly as captured by the hardware. The quality of uncompressed audio or video is tied directly to the quality of the capture hardware, and the settings used when capturing (sampling rate, sample size, and number of channels for audio; resolution, frame rate, and color standard for video). Guide Revision History 4/29/03 - First release. 6/14/03 - Updated the guide to reflect new releases of VirtualDub, as well as the web site for Huffyuv no longer existing.