0

I'm using ScreenCaptureJob to try to capture video of my screen. While it works fine, the issue is that the files sizes are HUGE. A 2-3 minute recording will have a whopping 600 MB file size.

I've tried reducing the framerate but it doesn't do much, and even reducing the Quality to 10% only brought me down to 100 MB and it looks awful. That's about the filesize you'd expect for 3 minutes of a 1080p HD movie, not a terrible quality, 30 FPS screen recording.

Is there something here I am missing, or any way to fix this, or does ScreenCaptureJob just record massive file sizes? Perhaps there is a way to shrink these files, or a different method I should be using?

Thanks a ton for any help:

    private void CaptureMoni(string x)
    {

            try
            {

                Rectangle _screenRectangle = Screen.PrimaryScreen.Bounds;
                ScreenCaptureJob scJob = new ScreenCaptureJob();
                scJob.CaptureRectangle = _screenRectangle;
                scJob.ShowFlashingBoundary = true;
                scJob.ScreenCaptureVideoProfile.FrameRate = 30;
                scJob.ScreenCaptureVideoProfile.Quality = 10;
                scJob.CaptureMouseCursor = true;

                scJob.OutputScreenCaptureFileName = string.Format(@"C:\cSharp\10quality" + x +".wmv");
                if (File.Exists(scJob.OutputScreenCaptureFileName))
                {
                    File.Delete(scJob.OutputScreenCaptureFileName);
                }

scJob.Start();
[[ code to set recording time ]]
                scJob.Stop();
}
catch (Exception e) { }
}
user2463732
  • 29
  • 2
  • 10
  • 1
    You could use something like ffmpeg to convert the file to a more disk space friendly format. – itsme86 Jun 04 '14 at 22:04
  • What was your resolution you recorded at? You said you expected a 1080p movie to be 100MB, that would be 1920x1080, is your resolution higher that that? Also `catch (Exception e) { }` that is a horrible thing to do. You can't tell when things go wrong, either do something in the exception that shows information to the user something went wrong or let your program crash. – Scott Chamberlain Jun 04 '14 at 22:47
  • Also what bitrate you use will GREATLY effect how big the file is. What is the value of `scJob.ScreenCaptureVideoProfile.Bitrate.BitrateValue`? – Scott Chamberlain Jun 04 '14 at 22:54

1 Answers1

0

Use ffmpeg to compile your files. for that u need to create sequence of images

@" -r 5 -i " + RawFolderPath + "img_1%04d.png -pattern_type sequence -start_number 0001 -pix_fmt yuv420p " + path + filename

Bhushan Pawar
  • 451
  • 4
  • 13