-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Screen Capture on Windows
Nackloose edited this page Mar 26, 2018
·
1 revision
For windows GdiGrab should be preferred as the ffmpeg documentation clearly states it is for windows.
https://ffmpeg.org/ffmpeg-devices.html#gdigrab
This should be a pretty reliable way to do so:
FrameGrabber grabber = new FFmpegFrameGrabber("desktop");
grabber.setFormat("gdigrab");
grabber.setFrameRate(30);
grabber.start();`
ffmpeg supports screen capture however there seem to be some inconsistencies in the compatibility of dshow. In the case one of your devices registers as screen recorder, (see bottom) you can use dshow. Dshow can be used for any device provided the device specified in the call is registered.
You can obtain a list of ffmpeg devices by running ffmpeg -list_devices true -f dshow -i dummy
using a CLI. From which, if you see any device listed as screen recorder you can infact use dshow.