本文介绍了在wpf / Windows中将桌面屏幕捕获为视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用wpf捕获/记录桌面活动作为视频获取解决方案 []在c#中使用WME编码器但是它收到错误检索具有CLSID的组件的COM类工厂{ 632B606A-BBC6-11D2-A329-006097C4E476}由于以下错误而失败:80040154.在我的系统中有x64位。

任何人都可以帮我完成必须做的事情。

先谢谢

i need to capture/record desktop activities as video using wpf
i getting a solution http://www.c-sharpcorner.com/UploadFile/armoghanasif/CaptureDesktopActivities11122005013755AM/download/CaptureDesktopActivitiesAsMovie.zip[^] using WME encoders in c# but it getting error Retrieving the COM class factory for component with CLSID {632B606A-BBC6-11D2-A329-006097C4E476} failed due to the following error: 80040154. in my system has x64 bit.
Can anyone help me on what has to be done.
Thanks in Advance

推荐答案

private void TakeScreenShot()
{
    Bitmap bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);

    Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot);

    gfxScreenshot.CopyFromScreen(0, 0, 0, 0, Screen.PrimaryScreen.Bounds.Size, CopyPixelOperation.SourceCopy);

    //Change the ImageFormat to jpeg to save hard disk or keep it in Tiff
    //for higher resolution
    bmpScreenshot.Save("Dependencies\\temp.tif", ImageFormat.Tiff);
    bmpScreenshot = null;
}





您可以虚构地使用VirtualDub等外部程序。也许你可以为它制作一个脚本,并从你的程序中运行它。我知道这不是你打算这样做的方式,但这是另一种方式。



You can adictionally use an external program like VirtualDub. Maybe you can make a script for it, and run it from your program. I know this is not the way you're intended to do it, but it's another way.


这篇关于在wpf / Windows中将桌面屏幕捕获为视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 17:24