Microsoft DirectX 8.0

Digital Video in DirectShow

This section provides an overview of using digital video (DV) in Microsoft® DirectShow®. It contains the following sections:

DV Scenarios

When you work with DV, the data typically follows a life cycle from the device to the computer and then back again. DirectShow provides support at each stage, as shown in the following table.

StageDirectShow SupportSee Also
Capture video from the camera to a file.ICaptureGraphBuilder2How to Write a Capture Application
Edit the file.DirectShow Editing Services 
Play the file.IGraphBuilder::RenderFileHow to Play a File
Transmit from file to tape.Device control interfaces on the WDM Video Capture filterControlling a DV Camcorder

Type-1 vs. Type-2 Files

DV cameras produce interleaved audio-video; each frame of video also contains the audio information. If you save DV data to an AVI file, you have a choice. You can:

For video capture, where maximum throughput is crucial, it is better to save the data as type-1. This is because type-2 files carry redundant data: the video stream in a type-2 file still contains the audio data, but it is hidden by labeling the stream as video. Also, it takes a certain amount of processor time to split the interleaved stream.

On the other hand, type-1 format can present problems for real-time editing. The application must extract the audio from the interleaved stream, make the edits, and interleave the data again. Also, the type-1 format is not compatible with Microsoft® Video for Windows® (VFW). DirectShow can handle both types of files.

DirectShow DV Filters

DirectShow provides the following filters for manipulating DV data:

These filters work in pairs, as shown in the following diagrams. The DV Splitter splits type-1 into type-2, and the DV Video Decoder converts the type-2 video to uncompressed video.

In the other direction, the DV Video Encoder converts uncompressed video to type-2 video, and the DV Muxer combines type-2 streams into a type-1 stream.

The DV Video Encoder exposes the IDVEnc interface, which contains methods for setting the encoding standard (NTSC or PAL). The DV Video Decoder exposes the IIPDVDec interface, which contains methods for setting the decoding resolution.

MSDV Driver

Microsoft® Windows® provides a WDM driver for DV camcorders, called MSDV (Msdv.sys). This driver is exposed to applications as the WDM Video Capture filter. MSDV supports a subset of the interfaces described on the filter's reference page. If a DV camcorder is available on the user's system, it appears in the video capture sources category (CLSID_VideoInputDeviceCategory) when you enumerate the system devices. It also appears as a rendering device. The friendly name is "Microsoft DV Camera and VCR." For more information, see Enumerating Devices and Filters.

MSDV has two output pins. One delivers interleaved audio-video data, and the other delivers video data with no audio. MSDV also has one input pin, which transmits data to the camcorder. MSDV will not accept simultaneous input and output connections, because a camcorder cannot capture and transmit at the same time.

Some tips on using MSDV: