简体   繁体   English

桌面复制录屏 API

[英]Screen Recording with Desktop Duplication API

I am building an application in WPF using.NetFramework.我正在使用 .NetFramework 在 WPF 中构建一个应用程序。 It can record full or partial desktop along with Audio to an mp4 file.它可以将整个或部分桌面与音频一起录制到 mp4 文件中。 Right now I am using ffmpeg for that which works fine but has certain issues.现在我正在使用 ffmpeg 来处理工作正常但存在某些问题的问题。

I want to give a try to Desktop Duplication API. Most of the related repositories I find on github are several years old.我想试试 Desktop Duplication API。我在 github 上找到的大多数相关存储库都有几年的历史了。 Why there's very little latest information available on this topic, especially for C#?为什么关于这个主题的最新信息非常少,尤其是关于 C# 的信息? Can you share any starting points that meet my requirements?你能分享任何满足我要求的起点吗?

As one of the comments mention Desktop Duplication API is a native low-level API, check this repo https://github.com/bmharper/WindowsDesktopDuplicationSample .正如其中一条评论提到的桌面复制 API 是本机低级 API,请检查此 repo https://github.com/bmharper/WindowsDesktopDuplicationSample

I read also your comment regarding "stick to WPF", there are 2 options in my opinion.我还阅读了您关于“坚持使用 WPF”的评论,我认为有 2 个选项。

The first one is a very simple RecordBook-Screen-Recorder, it is made in WinForms, and the UI is not in English but very easy to understand, I share it for inspiration: https://github.com/iEmreM/RecordBook-Screen-Recorder .第一个是一个非常简单的RecordBook-Screen-Recorder,它是用WinForms制作的,UI不是英文的但是很容易理解,我分享一下灵感: https://github.com/iEmreM/RecordBook-屏幕录像机

That said, I have previously played with Captura open source recording in .net and WPF, it can capture video and sound.也就是说,我之前在.net和WPF玩过Captura开源录音,它可以捕捉视频和声音。

here is the repo, the latest updated 2 years.这是回购协议,最近更新了 2 年。 https://github.com/MathewSachin/Captura . https://github.com/MathewSachin/Captura

It is feature-rich software as well.它也是功能丰富的软件。

With that said, you might search and find something more, but you won't find complete software that has everything without issues.话虽如此,您可能会搜索并找到更多东西,但您不会找到一切都没有问题的完整软件。

In addition, check this article does not cover what you need but gives inspiration to your comment regards Windows Graphic Capture API. https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/此外,查看这篇文章并没有涵盖您所需要的内容,而是为您的评论提供灵感 Windows Graphic Capture API. https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-屏幕截图/

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

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