2

My Software is to record continuously 5min of video. Example: the software should start the recording on program-start and hold continuously 5min of video in buffer. When I stop the recording the last 5min of recording should save to disk

private void CaptureMoni()
        {

            try
            {
                Rectangle _screenRectangle = Screen.PrimaryScreen.Bounds;
                _screenCaptureJob = new ScreenCaptureJob();
                _screenCaptureJob.CaptureRectangle = _screenRectangle;
                _screenCaptureJob.ShowFlashingBoundary = true;
                _screenCaptureJob.ScreenCaptureVideoProfile.FrameRate = 20;
                _screenCaptureJob.CaptureMouseCursor = true;

                _screenCaptureJob.OutputScreenCaptureFileName = string.Format(@"C:\test.wmv");
                if (File.Exists(_screenCaptureJob.OutputScreenCaptureFileName))
                {
                    File.Delete(_screenCaptureJob.OutputScreenCaptureFileName);
                }
                _screenCaptureJob.Start();
            }
            catch(Exception e) { }
        }

something like that:

private void SaveRecord(int cntMinutes)
        {

            try
            {
                _screenCaptureJob.Stop();
                // something like that
                _screenCaptureJob.SaveLastXMinutes(cntMinutes);
            }
            catch(Exception e) { }
        }
Soumya
  • 13,677
  • 6
  • 34
  • 49
masterchris_99
  • 2,683
  • 7
  • 34
  • 55
  • I don't think you can. since you actually want it to stop recording while continuing to capture the next video. the best solution would be to capture long video, and then cut it into 5min pieces. (but you probably already know it, since it's been a while since this question was asked.) – itsho Sep 22 '12 at 22:54

0 Answers0