You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Window capture recording screen region instead of window content (0.4.84) #1754
When selecting a specific window to record, Cap is capturing the screen region that the window occupies rather than the window content itself. This means that switching tabs, moving other windows over the top, or any other activity in that screen area gets captured in the recording, which is not the expected behavior.
Expected behavior: recording a window should bind to that window's content only, unaffected by anything else on screen.
Actual behavior: Cap records the screen region the window occupies, so anything that appears in that area (other windows, tab switches, etc.) is included in the recording.
Environment:
Cap version: 0.4.84
macOS: Tahoe 26.4.1
This was working correctly in a previous version of Cap before updating to 0.4.84
Happy to provide any additional info or test builds if helpful.
Contrast with Screenshots:
Screenshots use sc::ContentFilter::with_desktop_independent_window() in crates/recording/src/screenshot.rs:859, which captures the window content itself regardless of what's overlaid on screen.
Fix Direction:
To get true window-only recording (not affected by overlapping content), the recording pipeline would need to use with_desktop_independent_window for window targets, similar to how screenshots work. This would require changes in ScreenCaptureConfig::to_sources() to create a window-specific content filter rather than a display filter with crop bounds.
The user notes this was working in a previous version before 0.4.84 - this would be worth investigating whether the behavior changed intentionally (perhaps for performance/stability reasons) or if there was a regression.
This issue still reproduces with the newly bundled Cap CLI.
When cap record start --window <window-id> targets a specific window, Cap records the display rectangle currently occupied by that window rather than the window surface itself. If the target is in the background or another window overlaps it, the foreground content inside that rectangle appears in the recording.
I reproduced this in both instant and studio modes. In Studio mode, the Cap recording controls are also captured if that panel overlaps the target rectangle. Closing the controls and continuously raising the target window keeps the recording clean, which further indicates that the current path is a display capture plus crop.
Expected behavior: --window <window-id> should capture the selected window independently of its z-order and occlusion.
Actual behavior: background or occluding windows are captured wherever they overlap the selected window bounds. This makes unattended CLI window recording unreliable unless external automation continuously forces the target to the foreground.
Reproduction
List targets and note a window ID:
cap targets --json
Start a detached window recording:
cap record start --window <window-id> --mode instant --path window-test.cap --fps 30 --detach --json
Leave the selected window in the background, or place another application window over it.
Stop the recording using the returned ID:
cap record stop --id <recording-id> --json
Inspect window-test.cap/content/output.mp4. The overlapping foreground application is visible inside the target window rectangle.
Repeat with --mode studio; the same behavior occurs, including Cap controls when they overlap the target bounds.
cap project validate reports the resulting projects as valid; this is a capture-source issue rather than a finalization/export failure.
This is consistent with the display-capture-plus-crop implementation described above. The CLI now makes the limitation especially visible because --window is expected to support unattended, window-specific capture.
Also experiencing the same thing and didn't realize this had changed/regressed until after smashing stop on a nearly hour long cap. I moved the target window ~120px left at the beginning of the workshop and... well, that entire session was trashed and had to be completely re-recorded. so that's a bummer.
❯ cap --version
cap 0.1.0
❯ type -as cap
cap is /Users/kyle/.local/bin/cap -> /Applications/Cap.app/Contents/MacOS/cap-cli
❯ plutil -extract 'CFBundleVersion' raw /Applications/Cap.app/Contents/Info.plist
0.5.9
❯ system_profiler -json SPSoftwareDataType | jq --raw-output '..|.os_version? // empty'
macOS 15.7.9 (24G830)
Activity
linear commentedon Apr 22, 2026
CAP-689
tembo commentedon Apr 22, 2026
Thanks for the detailed report. Looking at the codebase, I can see the architectural reason for this behavior:
Current Implementation:
For recording, Cap uses display-based capture with crop bounds (
as_content_filter_excluding_windows) incrates/recording/src/sources/screen_capture/macos.rs:222-228. The window bounds are calculated relative to the display incrates/recording/src/capture_pipeline.rs:368-389and used to crop the display capture.Contrast with Screenshots:
Screenshots use
sc::ContentFilter::with_desktop_independent_window()incrates/recording/src/screenshot.rs:859, which captures the window content itself regardless of what's overlaid on screen.Fix Direction:
To get true window-only recording (not affected by overlapping content), the recording pipeline would need to use
with_desktop_independent_windowfor window targets, similar to how screenshots work. This would require changes inScreenCaptureConfig::to_sources()to create a window-specific content filter rather than a display filter with crop bounds.Related Context:
The user notes this was working in a previous version before 0.4.84 - this would be worth investigating whether the behavior changed intentionally (perhaps for performance/stability reasons) or if there was a regression.
nexmoe commentedon Aug 23, 2026
Description
This issue still reproduces with the newly bundled Cap CLI.
When
cap record start --window <window-id>targets a specific window, Cap records the display rectangle currently occupied by that window rather than the window surface itself. If the target is in the background or another window overlaps it, the foreground content inside that rectangle appears in the recording.I reproduced this in both
instantandstudiomodes. In Studio mode, the Cap recording controls are also captured if that panel overlaps the target rectangle. Closing the controls and continuously raising the target window keeps the recording clean, which further indicates that the current path is a display capture plus crop.Expected behavior:
--window <window-id>should capture the selected window independently of its z-order and occlusion.Actual behavior: background or occluding windows are captured wherever they overlap the selected window bounds. This makes unattended CLI window recording unreliable unless external automation continuously forces the target to the foreground.
Reproduction
List targets and note a window ID:
Start a detached window recording:
Leave the selected window in the background, or place another application window over it.
Stop the recording using the returned ID:
Inspect
window-test.cap/content/output.mp4. The overlapping foreground application is visible inside the target window rectangle.Repeat with
--mode studio; the same behavior occurs, including Cap controls when they overlap the target bounds.Additional Context
arm64)cap project validatereports the resulting projects as valid; this is a capture-source issue rather than a finalization/export failure.This is consistent with the display-capture-plus-crop implementation described above. The CLI now makes the limitation especially visible because
--windowis expected to support unattended, window-specific capture.knksmith57 commentedon Sep 3, 2026
Also experiencing the same thing and didn't realize this had changed/regressed until after smashing stop on a nearly hour long cap. I moved the target window ~120px left at the beginning of the workshop and... well, that entire session was trashed and had to be completely re-recorded. so that's a bummer.
fix(recording): capture the selected window itself on macOS