flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 19 forks source link

Pipewire source clips windows exceeding screen resolution #123

Open ingobecker opened 3 years ago

ingobecker commented 3 years ago

I'm using the the version 34f7754640f475d0b8c44eb376e02c968b3aa4b2db5f287cad24aa4cb43d77b6 from the beta repo. Pipewire based window capturing works but it seems as if the windows can't exceed the physical resolution of the screen they are shown on. I'm using two screens which both have a physical resolution of 1600x1200. I resized the window that i'm trying to capture to a resolution of 1920x1080. The captured window shown inside of OBS is clipped at 1600px. I'm not sure if this is a problem of the pipewire implementation or if i somehow missed to configure OBS properly. I also recognized a black border around the windows captured by pipewire.

I'm aware that i'm not using a stable release but maybe the feedback might be of some interest.

GeorgesStavracas commented 3 years ago

This is a known Mutter limitation, and I think a Plasma limitation too. The "problem" so to speak is that the screencast implementation is generic, meaning it can be used both for recording into a video file, or sharing with an application. Evidently, you can't have video files with variable sizes, so stream resizing was never implemented on Mutter.

It's definitely a fixable issue, since there's nothing fundamentally preventing it from being implemented. But it will require some coordination between different parts of the stack, and different DEs. Apps using the Screenshare portal (like OBS Studio in this case) will have to explicitly say "hey I support variable sized streams".

ingobecker commented 3 years ago

Ok, I understand, that because of its generic nature, the current implementation isn't able to capture something that changes it's size while being captured. But if i resize the window before i start to capture it, without changing it's size while it's being captured, should this work then? In my case this isn't working.

GeorgesStavracas commented 3 years ago

Sorry I forgot to explain that part. So, because it can't use the window size (which can change if the window is resized), Mutter picks the size of the monitor where the window is when the stream starts. It also gives OBS Studio a clip region, so OBS can just show the window and not the full monitor. And that causes the "limited by monitor size" issue you're describing.

Would you be able to file a bug against Mutter too (https://gitlab.gnome.org/GNOME/mutter/-/issues)? This is not specifically an OBS bug, though OBS will need a gently push after it's fixed in Mutter

ingobecker commented 3 years ago

Thanks for the explanation. I will file an issue against mutter. Regarding the black borders that i described in my first post, i found this issue over at the Mutter bug tracker.

ingobecker commented 3 years ago

I created a related Mutter Issue .

GeorgesStavracas commented 3 years ago

Thanks. I also left a comment at https://gitlab.gnome.org/GNOME/mutter/-/issues/1648 - this one is entirely a missing feature in mutter.

GeorgesStavracas commented 2 years ago

Since this code now lives in OBS Studio, there's no point keeping this issue open here - mind moving it there?