简体   繁体   English

从屏幕捕获视频,文件很大吗?

[英]Capturing Video from Screen, massive file size?

I'm using ScreenCaptureJob to try to capture video of my screen. 我正在使用ScreenCaptureJob尝试捕获屏幕视频。 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. 2-3分钟的录制文件大小将达到600 MB。

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. 我曾尝试降低帧速率,但并没有太大作用,甚至将“质量”降低到10%只能使我降低到100 MB,而且看起来很糟糕。 That's about the filesize you'd expect for 3 minutes of a 1080p HD movie, not a terrible quality, 30 FPS screen recording. 这是关于您希望3分钟观看1080p高清电影的文件大小,而不是糟糕的质量,30 FPS屏幕记录。

Is there something here I am missing, or any way to fix this, or does ScreenCaptureJob just record massive file sizes? 是否有我缺少的东西,或者有什么方法可以解决此问题,或者ScreenCaptureJob只是记录了大文件大小? 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) { }
}

Use ffmpeg to compile your files. 使用ffmpeg编译文件。 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 @“ -r 5 -i” + RawFolderPath +“ img_1%04d.png -pattern_type序列-start_number 0001 -pix_fmt yuv420p” +路径+文件名

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM