Conversation
… a PNG [Asana: 1216010475168255] Mirrors OBS Studio's "Screenshot Output": one key press writes "Screenshot <Filename Formatting>.png" at canvas resolution into the recording folder and shows a notification that reveals the file. The capture itself is the new OBS_content_takeScreenshot in obs-studio-node (branch screenshot-output); this adds the ScreenshotService that gathers the recording folder, filename format and no-space flag the same way OutputSettingsService does, the SCREENSHOT_OUTPUT general hotkey, the strings, and the label in the hotkeys settings test. On a backend without the function the key shows a warning instead.
BundleMonFiles added (4)
Total files change +15.72MB Final result: ✅ View report in BundleMon website ➡️ |
OBS_content_takeScreenshot now returns a Promise instead of blocking the caller. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The context fallback can capture the wrong canvas, functional coverage is missing, and the backend dependency remains unshipped.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds an OBS-backed hotkey for saving the program output as a PNG in the recording folder.
Changes:
- Adds screenshot capture, notifications, and usage tracking.
- Registers the service and hotkey with localized strings.
- Updates hotkey settings coverage.
| File | Description |
|---|---|
app/services/screenshot.ts |
Implements screenshot capture and notifications. |
app/services/hotkeys.ts |
Adds the Screenshot Output hotkey. |
app/app-services.ts |
Registers the screenshot service. |
app/i18n/en-US/hotkeys.json |
Adds user-facing strings. |
test/regular/settings/hotkeys.ts |
Verifies the hotkey is listed. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @Inject() private jsonrpcService: JsonrpcService; | ||
| @Inject() private usageStatisticsService: UsageStatisticsService; | ||
|
|
||
| async takeScreenshot(display: TDisplayType = 'horizontal') { |
Contributor
There was a problem hiding this comment.
Agreed; deferred until the osn release with OBS_content_takeScreenshot is pinned. Before that, a test can only reach the needs-newer-backend path.
Falling back to the horizontal canvas paired it with vertical recording settings; a missing context now takes the existing warning path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
require changes coming with this OSN version #6250 |
…creenshot-output-hotkey
…rts it [Asana: 1216010475168255]
…: 1216010475168255]
summeroff
approved these changes
Oct 2, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Adds the hotkey OBS Studio has had for years: press a key, get a full-resolution PNG of what is being streamed or recorded, dropped into the recording folder. The motivating use is grabbing a thumbnail candidate during a session without leaving the app or scrubbing a recording afterwards. Behaviour is copied from OBS deliberately, so anyone coming from OBS finds the same file in the same place with the same name.
Depends on streamlabs/obs-studio-node#1786 (streamlabs/obs-studio-node#1786), which has shipped in obs-studio-node
0.27.19; staging (merged into this branch) already pins that version inscripts/repositories.json. The desktop app cannot read pixels off the canvas itself: the editor preview is a native child window drawn by the OBS backend, and obs-studio-node has never exposed a readback call. That PR adds one native function; this PR is the thin frontend on top of it. On an older backend without the function, pressing the key shows a "needs a newer backend" warning and does nothing else.Fixes
app/services/screenshot.ts(new,ScreenshotService).takeScreenshot(display = 'horizontal')gathers the same inputs OBS uses and hands them to the backend in one synchronous call,NodeObs.OBS_content_takeScreenshot(video, directory, filenameFormat, noSpace): the horizontal video context fromVideoSettingsService.contexts, the recording folder fromOutputSettingsService.getRecordingSettings(display).path(mode-aware, unlikeSettingsService.recPath, which only reads the Advanced key), the Advanced → Recording →FilenameFormattingpattern (defaulting to OBS's%CCYY-%MM-%DD %hh-%mm-%ss), and the mode-specific "file name without space" flag, read with the same lookupOutputSettingsServicealready uses. The backend renders the program mix at canvas resolution and writesScreenshot <formatted>.png, adding(2),(3)… if the name is taken. On success the service pushes a SUCCESS notification, "Screenshot saved as ", whose click action callsshowScreenshot(path), which reveals the file withshell.showItemInFolder, and recordsScreenshotOutputfeature usage. A missing recording folder, a missing video context, an older backend without the function, or a backend error each produce a WARNING notification instead of a crash.app/services/hotkeys.ts. New general actionSCREENSHOT_OUTPUT(label "Screenshot Output"), placed afterSPLIT_FILEso it sits next to the other output-related hotkeys in Settings → Hotkeys. The action name is permanent: saved bindings are keyed by it (see the warning abovegetMigrationMapping).app/app-services.ts. RegistersScreenshotService.app/i18n/en-US/hotkeys.json. The label and the four notification strings.test/regular/settings/hotkeys.ts. "Screenshot Output" added to the list of hotkeys the settings test expects to find.Files changed:
app/services/screenshot.ts,app/services/hotkeys.ts,app/app-services.ts,app/i18n/en-US/hotkeys.json,test/regular/settings/hotkeys.tsPerformance Implications
None on any existing path: nothing runs until the hotkey is pressed. A press is one synchronous backend call that renders one frame, reads it back from the GPU and encodes a PNG; on a 1080p canvas that is roughly 100–300 ms during which the worker window is blocked, comparable to other synchronous
NodeObscalls the app already makes. There is no polling, no new state, and the file write happens in the backend process.Verification
yarn typecheckandyarn eslinton the changed files: clean. Intest/regular/settings/hotkeys.ts, "Populates essential hotkeys" passes with the new label in the list. "Binds a hotkey" fails on this Mac at its post-restart assertion, and fails identically on the parent commit (52638c543) with the same bundle and harness, so it is pre-existing and unrelated.(2)de-duplication,_substitution with noSpace, missing directory throws, non-video argument throws).node_modules: a throwaway e2e probe added a Color Block source, calledScreenshotService.takeScreenshot()twice (the hotkey's exact code path), and confirmedScreenshot 2026-09-25 16-52-24.pngand…16-52-25.pngin the recording folder, each a valid 1280×720 PNG with the block visible (17% non-black pixels), the footer toast "Screenshot saved as …", and both entries listed as clickable rows in the Notifications window. The probe is not part of this PR.OBS_content_takeScreenshot), the same probe confirmed the key press produces only the "needs a newer backend" warning and the app keeps running.Notes
displayparameter so that is a one-line change once the product decision is made.Asana Link
https://app.asana.com/0/1207748235152481/1216010475168255