Capturing Video from Screen, massive file size?

950 views Asked by At

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) { }
}
1

There are 1 answers

0
Bhushan Pawar On

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