Cross-platform capture backends (x11grab / avfoundation)
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 30/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- typescript
- 領域
- desktop
研究方向
Start with src/utils/targets.ts and trace how buildCaptureArgs, buildScreenshotArgs, and targetInputArgs construct capture arguments; then read src/utils/monitors.ts, src/utils/windows.ts, and src/utils/resolveTarget.ts for target resolution. Begin with the Linux x11grab video scope and use the pure argument builders with an injected platform to test full, monitor, and region targets. Done means those targets build the specified Linux arguments, while unsupported non-Windows window and system-audio requests return clear errors.
由索引模型根據 Issue 內容生成。
描述
Problem
Capture is Windows-only. start_recording and screenshot hardcode -f gdigrab (src/utils/targets.ts: buildCaptureArgs / buildScreenshotArgs / targetInputArgs), and target resolution uses Windows APIs (src/utils/monitors.ts via PowerShell, src/utils/windows.ts for window bounds, wired in src/utils/resolveTarget.ts).
The watch, edit, redact, and produce tools already run anywhere ffmpeg does. Only capture is pinned to Windows.
Proposed backends
Selected by process.platform:
win32-> gdigrab (current).linux-> x11grab:-f x11grab -framerate N -video_size WxH -i $DISPLAY+X,Y. Native offset/region, mirrors gdigrab closely (lowest-risk first target).darwin-> avfoundation:-f avfoundation -framerate N -i "<screen-index>". No native offset, so aregion:needs-vf crop=w:h:x:yover a full-screen grab; needs screen-recording permission (TCC); the screen device index comes fromffmpeg -f avfoundation -list_devices true -i "".
Architecture sketch
- Add a host-platform helper (overridable via env for tests).
- Refactor
targetInputArgsinto a backend-awarecaptureInputArgs(target, platform, monitors)and thread aplatformoption throughbuildCaptureArgs/buildScreenshotArgs, so the pure builders stay unit-testable for all three platforms on any host. - Per-platform monitor enumeration: keep Windows (
getMonitors), add Linux viaxrandrand macOS via the avfoundation device list. window:targets and systemaudiostay Windows-only initially (they needxdotool/ BlackHole / pulse), with a clear error on other platforms.
Suggested sequencing
- Linux (x11grab) first; scope to video
full/monitor/region. - macOS (avfoundation) as a follow-up.
Testing reality
The pure arg-builders are fully unit-testable by injecting platform. Actual x11grab / avfoundation runtime can only be verified on those OSes, not from the Windows dev box.
Scope decisions (from planning)
- Video
full/monitor/regioncross-platform;window:+ system audio stay Windows-only initially.
Recorded from a planning session; not yet scheduled for implementation.
- 主要語言
- TypeScript
- 星號
- 1
- 分支
- 4
- 平均合併
- 14 小時 8 分鐘
- 30 天內合併 PR
- 48
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TMHSDigital/screencast-mcp 的其他 Issue
-
effort: small good first issue priority: medium testing
難度 2/5 1-3 小時 新手友好度 84/100
TMHSDigital/screencast-mcp#351 ·
維護者通常 1 天內回覆
-
bug effort: small priority: medium
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/screencast-mcp#344 ·
維護者通常 1 天內回覆
-
bug effort: small good first issue priority: medium
難度 2/5 1-3 小時 新手友好度 82/100
TMHSDigital/screencast-mcp#343 ·
維護者通常 1 天內回覆
-
effort: medium help wanted priority: medium testing
難度 3/5 1-2 天 新手友好度 76/100
TMHSDigital/screencast-mcp#350 ·
維護者通常 1 天內回覆
-
effort: medium priority: medium testing
難度 4/5 1-2 天 新手友好度 70/100
TMHSDigital/screencast-mcp#349 ·
維護者通常 1 天內回覆
查看 TMHSDigital/screencast-mcp 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難度 2/5 1-3 小時 新手友好度 82/100
openclaw/openclaw#200365 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
area-templates triage:bot-seen triage:needs-human
難度 2/5 1-3 小時 新手友好度 75/100
microsoft/aspire#22356 · 1 則留言 ·
維護者通常 1 天內回覆
-
Archiving an agent that is not loaded keeps its old updatedAt可能已有人在做 @luoph 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
content triage
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆