I'm coding a screen capture program in C# using windows media encoder. While the screen is being recorded i want to save the last 30sec of the current video being recorded in a separate video when a btn gets clicked. Is there a function in encoder that would allow me to do that?
I've attached the code that I'm currently using. Couldn't find any documentation on media encoder...
void startRecording() {
System.Drawing.Size workingArea = SystemInformation.WorkingArea.Size;
Rectangle captureRec = new Rectangle(0, 0, workingArea.Width -(workingArea.Width % 4), workingArea.Height - (workingArea.Height % 4));
job.CaptureRectangle = captureRec;
job.ShowFlashingBoundary = true;
job.ShowCountdown = true;
job.CaptureMouseCursor = true;
job.AddAudioDeviceSource(AudioDevices());
job.OutputPath = @"C:\Users\Moe36\Desktop\Screen Recorder";
job.Start();
}
void saveLast30Sec() {
//Save last 30sec of the currently recorded video as a separate video file.
}