Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Digital Video (DV) capture application.
This sample demonstrates how to build various types of filter graphs for controlling DV camcorders. It also shows how to perform capture, preview, transmit, and device control with a DV camcorder.
The DVApp application supports the following modes:
The capture and transmit modes also perform preview. Each of those modes has a No Preview option as well, which disables preview. Capturing without preview is more efficient and can reduce the number of dropped frames.
The application starts in preview mode. To select another mode, choose a mode from the Graph Mode menu. For each mode, DVApp builds a filter graph that supports the functionality of that mode. To save the graph as a GraphEdit (.grf) file, select Save Graph to File from the File menu. Quit DVApp before opening the file in GraphEdit.
To capture to a file:
To transmit from a file to the camcorder:
If the camcorder is in VTR mode, the user can control the transport mechanism through the application's VCR-style buttons. To seek the tape, enter the target timecode and click the seek button.
To limit how much data the application captures, choose Capture Size from the File menu.
To check the tape format (NTSC or PAL), choose Check Tape from the Options menu.
To change the size of the preview window, choose Change Decode Size from the Options menu.
The main purpose of this application is to show how to build various DV capture and transmit graphs.
The application handles device arrival and removal, using two different techniques. For device arrival, the application's message loop responds to WM_DEVICECHANGE messages. For device removal, the application responds to EC_DEVICE_LOST events from the filter graph manager. Either approach works, although the EC_DEVICE_LOST event depends on the existence of the device in the filter graph.
The application only handles one device at a time. If the current device is removed, the application looks for another DV device on the system.
On some DV camcorders, the user must shut off the device when switching it between camera mode and VTR mode, which triggers a device-lost message. The application responds by enabling or disabling the appropriate menu commands. However, if the user toggles rapidly between modes, the camcorder might not generate a device-lost message. You can force the menus to update by choosing Refresh Mode from the Options menu. Some DV camcorders can toggle modes without shutting off, but send a device-lost message only when they switch to VTR mode.
The functionality of the Play and Record button depends on the current mode:
The sample application does not perform frame-accurate capture. At various points, the application calls the Sleep function to wait for the device to respond. Newer DV camcorders send a notification when the state of the device changes. Older devices might not support notification; for the purposes of a sample, calling Sleep is a simpler solution.
To download the DirectShow SDK samples, install the latest version of the Windows SDK.
This sample is installed under the following path: [SDK Root]\Samples\Multimedia\DirectShow\Capture\DVApp.
Events
Nov 19, 11 PM - Nov 21, 11 PM
Gain the competitive edge you need with powerful AI and Cloud solutions by attending Microsoft Ignite online.
Register nowTraining
Module
Capture Web Application Logs with App Service Diagnostics Logging - Training
Learn about how to capture trace output from your Azure web apps. View a live log stream and download logs files for offline analysis.