bytedeco/javacv

How to specify the screen for screen capturing in JavaCV

開放

#2,324 建立於 2025年3月14日

 (0 則留言) (0 個反應) (0 位負責人)Java (1,583 個分叉)batch import
help wantedquestion

倉庫指標

星標
 (6,985 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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();

貢獻者指南