Skip to main content

WMV file output

Products: Video Capture SDK .Net, Video Edit SDK .Net

WMV (Windows Media Video): Developed by Microsoft, WMV is a series of video codecs and their corresponding video coding formats. WMV is commonly used for streaming applications on the Windows platform.

To capture video in WMV format using Video Capture SDK .Net, you need to configure video output format using WMVOutput. Windows Media Video supports several codecs for video and audio streams. Usually, the v9 version of codecs should be used. Use the dialog to set settings in UI or set settings in code.

The same sample code can be used for Video Edit SDK .Net. Use the VideoEditCore class instead of VideoCaptureCore.

Sample code

Create WMVOutput object for WMV capture

var wmvOutput = new WMVOutput();

Set WMV settings using the settings dialog

WMVSettingsDialog wmvSettingsDialog = new WMVSettingsDialog(VideoCapture1.Core);

wmvSettingsDialog.WMA = false;

wmvSettingsDialog.ShowDialog(this);

wmvSettingsDialog.SaveSettings(ref wmvOutput);

Or

Set WMV settings using an external profile

wmvOutput.Mode = WMVMode.ExternalProfile;

wmvOutput.External_Profile_FileName = edWMVProfile.Text;

or

Set custom output WMV mode

You can enumerate video and audio codecs available in your OS, set them for WMV output, and set profile, quality, and other settings.

TODO: Code sample

Apply WMV capture settings

1. Set WMV format for output

VideoCapture1.Output_Format = wmvOutput;

2. Set video capture mode and file name (be sure that you have to write access rights)

VideoCapture1.Mode = VideoCaptureMode.VideoCapture;

VideoCapture1.Output_Filename = "output.wmv";

3. Start capture (sync or async)

await VideoCapture1.StartAsync();

Required redists

  • Video capture redist x86 x64
  • Video Edit SDK redist x86 x64

Visit our GitHub page to get more code samples.