快速屏幕捕获和丢失垂直同步
我想用一个自制的应用程序实时生成一部电影,该应用程序可以快速捕获屏幕,并且部分屏幕被正在运行的 3D 应用程序占据。
我知道已经存在几个用于此目的的应用程序(如 FRAPS 或 Taksi),甚至还有专用的 DirectShow 过滤器(如 UScreenCapture),但我确实需要使用自己的外部应用程序来实现此目的。
正确设置后(UScreenCapture + ffdshow),捕获并压缩全屏不会消耗您预期的那么多 CPU(大约 15%),并且不会影响 3D 应用程序的性能。
从外部应用程序进行捕获的问题是 3D 应用程序失去了垂直同步并创建了一个杂乱的、难以使用的 3D 应用程序(3D 应用程序仅呈现在屏幕的一小部分上,其余的是 GDI、DirectX)
FRAPS通过允许您一次仅捕获一个应用程序(具有焦点的应用程序)来解决此问题。根据所使用的技术(OpenGl、DirectX、GDI),它会挂钩 Vsync 并进行捕获(使用 glReadPixels,...),而不会干扰它。 这样做并不能解决我的问题,因为我想要完整的合成屏幕图像(包括 3D 和其余部分)和流畅的 3D 应用程序。
UScreenCapture 似乎使用快速 DirectX 调用来捕获整个屏幕,但 openGL 3D 应用程序仍然不同步。
执行 BitBlt 太慢,并且消耗 CPU 来进行实时 30 fps 采集(至少在 Windows XP 下,不确定 7)
我的问题是知道是否有办法使用 Windows 7 实现我的目标,它是全新的 DirectX合成引擎?
Windows 7 成功地显示每个应用程序的实时垂直同步重复预览(在任务栏中),因此必须有一种方法可以访问当前显示的屏幕缓冲区,而不干扰 3D OpenGL 应用程序的渲染?
还有其他建议、技术吗? 谢谢
I'd like to generate a movie in real time with a self-made application doing fast screen captures with part of the screen occupied by a running 3D application.
I'm aware that several applications already exist for this (like FRAPS or Taksi), and even dedicated DirectShow filters (like UScreenCapture), but i really need to make this with my own external application.
When correctly setup (UScreenCapture + ffdshow), capturing an compressing a full screen does not consumes as much CPU as you would expect (about 15%), and does not impairs the performances of the 3D app.
The problem of doing a capture from an external application is that the 3D application loses it's Vsync and creates a shaggy, difficult to use 3D application (3D app is only presented on a small part of the screen, the rest being GDI, DirectX)
FRAPS solves this problem by allowing you to capture only one application at a time (the one with focus). Depending on the technology used (OpenGl, DirectX, GDI), it hooks the Vsync and does its capture (with glReadPixels,...), without perturbing it.
Doing this does not solve my problem, since I want the full composed screen image (including 3D and the rest) AND a smooth 3D app.
The UScreenCapture seems to use a fast DirectX call to capture the whole screen, but the openGL 3D app is still out of sync.
Doing a BitBlt is too slow and CPU consumming to do real time 30 fps acquisition (at least under windows XP, not sure with 7)
My question is to know if there is a way to achieve my goal with Windows 7 and it's brand new DirectX compositing engine?
Windows 7 succeeds to show live VSynced duplicated previews of every app (in the taskbar), so there must be a way to access the currenlty displayed screen buffer without perturbing the rendering of the 3D OpenGL app ?
Any other suggestion, technology ?
thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
上列出了可能有用的链接
我在http://betterlogic.com/roger/?p=3037
如果您取得了任何成功,请告诉我 - 最终我也会对 Windows 的快速开源屏幕捕获感兴趣...
相关:最快的屏幕捕获方法
I made a list of possibly useful links at
http://betterlogic.com/roger/?p=3037
let me know if you have any success--eventually I would also be interested in a fast open source screen capture for windows...
related: Fastest method of screen capturing