2

I am trying to capture video from XPlane, a popular flight simulator. I'm running on Windows.

Normally, I can capture individual windows using gdigrab, but when I use it on an XPlane window like so...

ffmpeg -f gdigrab -framerate 30 -i "X-System" -b:v 300K capture.mp4

...I get a video file that's the right dimensions but is all black. I imagine this may have something to do with how XPlane talks directly to the GPU. I should add that if I capture the entire desktop like so...

ffmpeg -f gdigrab -framerate 30 -i desktop -b:v 300K capture.mp4

...I get everything including the simulator window, but naturally with unrelated windows in the capture, including windows sitting on top of the simulator window.

Is there a way for gdigrab to capture video this GPU-intensive window alone? Is there a different tool I can use?

iter
  • 4,171
  • 8
  • 35
  • 59
  • 1
    Does the dshow input device work? – Gyan Jun 09 '20 at 05:34
  • I understand that with `dshow` I can only record the entire screen. I can do that with `gdigrab` as well (`-i desktop`), but this records only the windows that are on top. Ideally, I'd be able to record the XPlane window even if another window obscures it. `gbigrab -i "Window Title"` does that for windows that use GDI. – iter Jun 09 '20 at 14:05
  • 1
    @iter , do you solve this? – Glebka Dec 21 '21 at 12:40
  • Sort of, but in a rather unhelpful manner. I bought an HDMI-to-UVC dongle. It looks weird--both ends plug into the same machine. The HDMI appears as an external display. I move the relevant windows to it, and then capture input from a "webcam" on the other end of the adapter. It's silly. – iter Dec 22 '21 at 16:08

1 Answers1

2

I think I have a solution. First, desactivate hardware acceleration from bios or from the troubleshooting tab of your system settings. Then deactivate hardware acceleration from Chrome. If you manage to do that you won't see a black screen again since hardware acceleration is the culprit behind your error.

Robson
  • 813
  • 5
  • 21
  • 40