bytedeco/javacv

How to specify the screen for screen capturing in JavaCV

Open

#2324 aperta il 14 mar 2025

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Java (1583 fork)batch import
help wantedquestion

Metriche repository

Star
 (6985 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

On Windows, I am using the following code for screen capturing. I would like to ask how I can specify which screen to capture in a multi-screen setup.


FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("desktop");
grabber.setFormat("gdigrab");
grabber.setOption("draw_mouse", "0");
grabber.setOption("offset_x", "1920");
grabber.setOption("offset_y", "0");
grabber.setOption("framerate", "45");
grabber.setOption("hwaccel", "auto");
grabber.setOption("threads", "auto");
grabber.start();

Guida contributor