Related products: Video Capture SDK .Net

Video capture to AVI using Video Capture SDK .Net

Create VFAVIOutput object

VFAVIOutput aviOutput = new VFAVIOutput();

Set AVI settings using settings dialog

AVISettingsDialog aviSettingsDialog = new AVISettingsDialog(VideoCapture1.Video_Codecs.ToArray(), VideoCapture1.Audio_Codecs.ToArray());

aviSettingsDialog.ShowDialog(this);

aviSettingsDialog.SaveSettings(ref aviOutput);

Or

 

Set AVI settings without using settings dialog

 

1. Get lists of audio and video codecs, fill comboboxes

foreach (string codec in VideoCapture1.Video_Codecs)
{
  cbVideoCodecs.Items.Add(codec);
}

foreach (string codec in VideoCapture1.Audio_Codecs)
{
  cbAudioCodecs.Items.Add(codec);
}

2. Set video settings

aviOutput.Video_Codec = cbVideoCodecs.Text;

3. Set audio settings

aviOutput.ACM.Name = cbAudioCodecs.Text;
aviOutput.ACM.Channels = 2;
aviOutput.ACM.BPS = 16;
aviOutput.ACM.SampleRate = 44100;
aviOutput.ACM.UseCompression = true;

Apply settings

1. Use AVI format for output

VideoCapture1.Output_Format = aviOutput;

2. Set video capture mode

VideoCapture1.Mode = VFVideoCaptureMode.VideoCapture;

3. Set file name (be sure that you have write access rights)

VideoCapture1.Output_Filename = "c:\\123.avi";

4. Start capture

VideoCapture1.Start();

VisioForge © 2006-2019

  • GitHub-Mark-64px
  • Twitter Социальные Иконка
  • VisioForge Facebook page
  • YouTube channel