Screen Capture (f8.screencap)¶
No description.
- Service class:
f8.screencap - Version:
0.0.1 - Source directory:
f8/screencap - Tags:
video,capture,shm
When to Use¶
- Use
f8.screencapwhen the graph needs live desktop, monitor, or region capture as a video source. - It is a standard choice for UI vision, screen analysis, game capture, and desktop automation scenarios.
- Reach for it when the graph needs to interpret what is currently on the screen.
Common Wiring Patterns¶
- A common chain is
f8.screencap -> CV / DL / Viz. - While tuning capture area and scale, keep a
f8.viz.videobranch connected for visual confirmation. - If later modules only care about a small region, crop early rather than feeding a full screen at full rate.
Pitfalls / Gotchas¶
- Screen recording permissions, OS security policies, and GPU compatibility are common blockers.
- Full-screen high-resolution capture is expensive; reduce area or scale whenever possible.
- If only one button, panel, or HUD matters, capture only that region instead of the entire desktop.
Service Reference¶
How to Run¶
win/f8screencap_service.exe
- Workdir:
./ - Environment overrides: none
Typical Inputs / Outputs¶
- Data inputs: none
- Data outputs:
monitor - Commands:
listDisplays,pickDisplay,pickWindow,pickRegion
Service State Fields¶
| Name | Access | Required | On Node | Schema | Description |
|---|---|---|---|---|---|
videoShmName |
ro |
true |
true |
string |
Shared memory region name |
videoShmEvent |
ro |
true |
false |
string |
Shared memory event name |
mode |
rw |
true |
false |
string / enum[display, window, region] |
display|window|region |
fps |
rw |
true |
true |
number |
Capture rate |
displayId |
ro |
true |
false |
integer |
0..N-1 (see listDisplays) |
windowId |
ro |
true |
false |
string |
backend-specific (e.g. win32:hwnd:0x... or x11:win:0x...) |
window |
ro |
true |
false |
object{backend, id, pid, rect, ...} |
Resolved window metadata (best-effort) |
region |
ro |
true |
false |
object{h, w, x, y} |
Virtual desktop coordinates |
scale |
ro |
true |
false |
object{h, w} |
Optional output size (0 disables) |
captureRunning |
ro |
true |
false |
boolean |
Is capture currently running |
lastError |
ro |
true |
false |
string |
Last error message |
videoWidth |
ro |
true |
true |
integer |
Width of the video frame in pixels |
videoHeight |
ro |
true |
true |
integer |
Height of the video frame in pixels |
videoPitch |
ro |
true |
false |
integer |
Number of bytes per row of the video frame |
active |
rw |
true |
false |
boolean / default=True |
Service lifecycle state (activate/deactivate). |
svcId |
ro |
true |
false |
string |
Readonly: current service instance id (svcId). |
Key Fields That Matter¶
videoShmName(Video SHM,ro): Shared memory region name Schema:string.videoShmEvent(Video Event,ro): Shared memory event name Schema:string.mode(Mode,rw): display|window|region Schema:string / enum[display, window, region].fps(FPS,rw): Capture rate Schema:number.displayId(Display ID,ro): 0..N-1 (see listDisplays) Schema:integer.windowId(Window ID,ro): backend-specific (e.g. win32:hwnd:0x... or x11:win:0x...) Schema:string.window(Window,ro): Resolved window metadata (best-effort) Schema:object{backend, id, pid, rect, ...}.region(Region,ro): Virtual desktop coordinates Schema:object{h, w, x, y}.
Service Commands¶
listDisplays¶
List displays/monitors (backend-specific)
- Show on node:
false - Params: none
pickDisplay¶
Interactive pick a display (hover highlight + click)
- Show on node:
true - Params: none
pickWindow¶
Interactive pick a window (hover highlight + click)
- Show on node:
true - Params: none
pickRegion¶
Interactive pick a region (click-drag to draw)
- Show on node:
true - Params: none
Service Data Input Ports¶
None
Service Data Output Ports¶
| Name | Required | On Node | Schema | Description |
|---|---|---|---|---|
monitor |
true |
false |
object{active, alive, cpu, error, ...} |
Unified runtime monitor snapshots (health/resource/perf/error). |
Operators¶
None
Related Scenarios¶
- No bundled scenario references this node yet.