wl-mirror icon indicating copy to clipboard operation
wl-mirror copied to clipboard

Support for individual window capture

Open Ferdi265 opened this issue 9 months ago • 1 comments

Add support for capturing indiviudal windows via ext-image-copy-capture-v1 for compositors that implement the toplevel image capture source.

  • [ ] Add a way to specify toplevels to be captured
  • [ ] Add toplevel capture to the extcopy backend.

Ferdi265 avatar Mar 10 '25 19:03 Ferdi265

See this comment for a potential design for specifying toplevels.

Ferdi265 avatar Mar 10 '25 19:03 Ferdi265

I'd like to voice my support for this. It would help me a lot with streaming on a 2 PC setup. I'd love to have a way to clone a game window to my capture card "display" while preserving the aspect ratio, and without loading up OBS just for its projector feature.

nerdictranslator avatar May 29 '25 07:05 nerdictranslator

I'd like to voice my support for this. It would help me a lot with streaming on a 2 PC setup. I'd love to have a way to clone a game window to my capture card "display" while preserving the aspect ratio, and without loading up OBS just for its projector feature.

Wlroots and Sway are now working on implementing the necessary protocols for wl-mirror to provide this feature:

I'll start working on the implementation in wl-mirror soon, likely before it is merged, to act as additional testing for the feature.

Ferdi265 avatar May 29 '25 08:05 Ferdi265

@Ferdi265 Well that is excellent to hear. Thanks for the update.

nerdictranslator avatar May 31 '25 00:05 nerdictranslator

I just tested the provided wlroots/sway branches with the patched grim and can confirm that toplevel capture works. I'll see that I find time to rework wl-mirror's target system to prepare for different kinds of capturing targets (outputs, toplevels, potentially workspaces in the future, ...).

This could take a bit, but once that is done things like this should be easier to implement

Ferdi265 avatar Jun 01 '25 12:06 Ferdi265

The wlroots and sway PRs have been merged.

I haven't found much time to work on this yet, especially since it requires some refactoring around how wl-mirror targets work (it currently contains hardcoded assumptions that the target is an output).

Ferdi265 avatar Jun 16 '25 09:06 Ferdi265