Click here to Skip to main content
13,260,330 members (40,558 online)
Rate this:
 
Please Sign up or sign in to vote.
I have DirectX C# dll. I need to capture video while video running. when i capture video while running, it just slow in the windows form(get slow moving). how to stop picture box video slow moving. however video save without any problem.

here is the sample code i used.

What I have tried:

Filters _Filters ;
Capture capture;
SaveFileDialog saveAvi = null;

private void startcammera()
{
capture = null;
capture = new Capture(_Filters.VideoInputDevices[comboBox1.SelectedIndex], _Filters.AudioInputDevices[comboBox2.SelectedIndex]);

capture.VideoCompressor = _Filters.VideoCompressors[comboBox1.SelectedIndex];
capture.AudioCompressor = _Filters.AudioCompressors[comboBox2.SelectedIndex];

capture.FrameRate = 29.997;
capture.FrameSize = new Size(640, 480);
capture.AudioSamplingRate = 44100;
capture.AudioSampleSize = 16;
capture.AudioChannels = 2;

capture.Filename = saveAvi.FileName;
capture.PreviewWindow = this.pictureBox1;
}

private void CaptureStart()
{
capture.Start();
}
Posted 17-May-16 20:37pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy |
Web02 | 2.8.171114.1 | Last Updated 18 May 2016
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100