private void StartVideoCapture(string fileName) { var path = baseDirectory + "AppFiles/TempFiles/" + fileName; //if (!File.Exists(path)) // File.Create(path); VideoSource = new VideoCaptureDevice(Properties.UserSettings.Default.WebCamera); VideoSource.SetVideoProcAmpProperty(VideoProcAmpProperty.Brightness, 0, VideoProcAmpFlags.Manual); VideoSource.NewFrame += NewVideoFrame; VideoSource.VideoSourceError += VideoError; AviManager = new AviManager(path, false); VideoSource.Start(); }