DirectShow Animated Header -- Improving Capture Performance DirectShow Animated Header -- Improving Capture Performance* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: About Capture Filter Graphs
*Next Topic: Data Flow in the Filter Graph

Improving Capture Performance


Capturing is a hardware-intensive operation that requires saving a large amount of information to disk as quickly as possible. This information is typically in the form of video and audio data. Reducing bottlenecks that slow down the system is very important, because it can help improve the quality of the captured movie.

This article presents some general suggested practices and hints and tips that can help you, as the user of a capture application, set up the capture system for optimal capture performance.

Note Be sure to read your capture card manual for information specific to your capture card. Systems vary as well, so all the information presented in this article might not apply to your system configuration.

See Capture Introduction for a brief introduction to capture. See capture topics for a list of Microsoft® DirectShow™ interfaces and articles relating to capture.

Contents of this article:

Capture Numbers

Capturing involves transferring a large amount of data from a capture card to disk. To get an idea of the amount of data and the data throughput required for a particular capture scenario, consider the following:

Suppose you want to capture a movie with a height of 320 pixels, a width of 240 pixels, a capture rate of 30 frames per second (fps), and in 24-bit color format. The movie does not include any sound.

Use the following formula to determine the number of bytes of uncompressed data that must be transferred every second in order to capture all of the image data, and therefore to maintain the image quality.

bytes of transferred video data = height (in pixels) x width (in pixels) x rate (in fps) x color depth (in bytes)

Plugging in the numbers from the preceding scenario produces the following result.

320 x 240 x 30 x 3 = 6912000 bytes of transferred video data

Capturing one second of this movie at the desired size, frame rate, and color depth requires approximately 6.9 million bytes of disk space. Multiplying by 60 seconds produces the results for a minute; each minute of capture requires 414,720,000 bytes in this case. You can reduce the amount of data required by reducing any of the parameters in the above formula: capture a smaller image, at fewer frames per second, or with fewer colors. However, in cases where your image requirements push the system to its limits and you need to be able to capture at the highest possible number of megabytes per second, you'll want to optimize your system as much as possible. After all, the capture settings you use affect how the movie will look when someone plays it back.

The preceding numbers are for a silent movie. If you want to capture audio as well as video, you have to add the amount of required audio data. For example, CD-quality audio, recorded at 44 kilohertz (kHz), 16-bit, stereo, requires about 172 kilobytes (KB) per second. Audio capture is also very CPU-intensive, and synchronizing the audio and video data (to achieve proper lip synch, for example) can cause delays as well.

You might find that your system can't keep up with the required amount of data transfer for the settings you've chosen. When capturing, your system might pause, the video might be jerky or jitter (not smooth), and some of the frames might be dropped (not saved to disk). Playback quality of such an image is typically unsatisfactory. To avoid such problems, you can follow a number of practices to optimize your system for capturing.

The suggestions presented in this article can help you reach the goal of optimal capture performance. At the same time, bear in mind that each system is different and something that improves performance on one system might not be effective on another system.

Optimizing the Hard Disk for Capture

Because capturing is very hard-disk intensive, optimizing the files on the hard drive that you'll use for capturing (also called the data drive or data disk) is the most important task in optimizing capture performance. The following list contains goals in optimizing the data drive and techniques you might use to achieve those goals. The techniques discussed here are suggestions and might not be helpful given particular capture requirements. Your requirements and resources govern precisely which techniques you might want to try.

Revisit these goals as necessary before each capture session to ensure your disk is configured for optimal performance. Defragment the data disk before each capture session and defragment the drive containing your saved images before you play back the saved files.

Disk Settings in Window 95 and Later

The System applet of the Windows 95 and OSR2 Control Panel contains several options you can disable for optimal capture performance. In high-bandwidth situations like capture, it's important to make sure the drive is writing as much data as possible and not spending time with software optimizations or checking for system changes. The options to disable include the following:

To access these options in Windows 95, click the Start menu. Under Settings, click Control Panel, and double-click the System applet. Select the appropriate tab and proceed as outlined below:

You will have to restart your machine for the new settings to take effect.

Note For optimal performance for other applications, be sure to return these settings to their original values after your capture session is complete.

Reducing Noncapture-Related Machine Activity

Anything that interrupts the system or consumes CPU time for purposes other than capture can potentially decrease capture performance. Consider performing the following tasks to see if they affect performance on your system.

Additional Hints and Tips for Improving Capture Performance

This section contains a collection of hints and tips for improving capture performance that you might want to try after experimenting with the other suggestions in this article. The suggestions are grouped according to hardware and software-related suggestions.

Software

Hardware

Choosing a Capture System

Capturing is possible with a wide range of systems and capture cards. Shop around to compare capture cards and features to see what best meets your needs. See Suggested Capture Reading for possible sources of information. The optimal hardware configuration varies depending on the capture card.

If you're setting up a new machine to devote to capture, consider a 166-megahertz Pentium or later, with 64 megabytes or more of EDO RAM (as much RAM as possible), and a 2-gigabyte or larger Wide SCSI 2.0 AV-certified hard disk. AV-certified drives are designed for high-bandwidth data transfer. The SCSI hard disk controller should support PCI bus mastering 2.0 and later, which uses 32-bit drivers. If your capture card supports overlays, ensure that your video card also supports overlays. Make sure the capture card has drivers for the operating system you plan to use.

Suggested Capture Reading

This section lists possible sources of information about capture.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page