OpenGL窗口视频采集问题
也许这很容易,但我找不到合适的词让谷歌说出我需要的东西。 我有一个自定义的派生 QGLWidget,想要进行一些视频捕获以将其展示给其他人。
捕获对于所有其他小部件(按钮、复选框等)效果很好,但我的 GLWidget 保持空白(对于普通用户来说它是完全响应的)。当我将鼠标悬停在其上时,鼠标的矩形区域将在小部件上重新绘制。
我怎样才能告诉我的小部件/窗口系统在运动捕捉时刷新整个区域?
可能与同样的问题有关:我曾经在 TeamViewer 中进行过一次会话,也出现了同样的问题。
编辑
当我使用 Qt Demo Hello GL 并捕获它时,存在同样的问题。
EDIT2
我尝试了我的一个 GLUT 演示,但它们也不起作用, 我还读到有关记录 opengl 输出的问题,但这是在 Windows 机器上。 也许linux上也有问题?
顺便提一句。我使用 xvidcap 进行捕获。
Probably this is very easy but I can't find the right words for google to spit out what I need.
I have a custom derived QGLWidget and want to do some video capturing to show it to others.
The capturing works well for all other widgets (Buttons, Checkboxes, ...) but my GLWidget remains blank (to the normal user it is fully responsive). When I hover the mouse over it, then the rectangular area of the mouse is redrawn on the widget.
How can I tell my widget/the windowsystem to refresh the whole area when motion capturing?
Probably related to the same problem: I once made a session in TeamViewer where the same problem occurred.
EDIT
When I use the Qt Demo Hello GL and capture it there is the same problem.
EDIT2
I tried one of my GLUT Demos and they did not work either,
also I read about problems recording opengl output but this was on windows machines.
Maybe there are also problems on linux?
Btw. I use xvidcap for the capturing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定,但 IIRC xvidcap 使用 Xdamage 扩展来仅抓取哪些程序报告为正在渲染新的。 OpenGL 操作不会设置损坏标志。
我个人在 X11 下使用 ffmpeg 进行屏幕截图。例如,
我
发现
mjpeg
、ljpeg
或x264 / fast lossless
编解码器非常适合此任务。I'm not sure, but IIRC xvidcap uses the Xdamage extension to grab only, what programs report as being rendered new. OpenGL operations don't set the damage flag.
Personally I use ffmpeg for screencapturing under X11. Something along the lines
For example
I found
mjpeg
,ljpeg
orx264 / fast lossless
codecs being well suited for this task.这是一个猜测,因为我对 GL 小部件没有什么经验,但我首先要尝试的是在您的小部件上设置不透明绘制事件标志:
This is a bit of a guess as I have little experience with the GL widget specifically, but the first thing I would try would be to set the opaque paint event flag on your widget: