Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gromit-mpx not selectable as XCOMPOSITE source in OBS Studio #117

Open
Llammissar opened this issue Jan 22, 2021 · 9 comments
Open

gromit-mpx not selectable as XCOMPOSITE source in OBS Studio #117

Llammissar opened this issue Jan 22, 2021 · 9 comments

Comments

@Llammissar
Copy link

Is your feature request related to a problem? Please describe.
I want to try using gromit to do telestration for my streams, but OBS studio's Xcomposite capture plugin doesn't detect the annotation window. Since our Twitter discussion, I did some digging into the OBS source, and I'm still not sure whose bug it really ought to be (hence filing it as an FR), but here's what I have for now:

This appears to be the function OBS uses to find all the windows it can capture:
https://github.com/obsproject/obs-studio/blob/master/plugins/linux-capture/xcompcap-helper.cpp#L96

The important X11 details seem to be that it depends on Extended Window Manager Hints and that the window is in the _NET_CLIENT_LIST. I won't pretend to understand the GTK/GDK end of things, but given the scope of that list, my immediate question is if gromit doesn't get parented to the display's root window?

Describe the solution you'd like
At the least, I'd like for OBS to be able to detect and capture the gromit window so I can crop/align it onto my stream preview and composite them together.

Spitballing, a potentially-even-better solution (from my perspective, that is) would be if I could use "windowed gromit" so it only works in a particular window or region. Maybe even go the TransparentPaint route and put it in a WM-managed window that can be resized on the fly... that's probably way more work than is worth for a niche feature, admittedly

Describe alternatives you've considered
Currently, I get this functionality from dewdle, but it's an ugly hack involving nodejs, a browser, painstaking window alignment, and forcing my WM to render the window translucent so I can sort of see what I'm doing. The "nice" solution would put me out about $1000 USD for the NDI software, encoder, and windows machine to run it. Windows users can reach for TransparentPaint, but it's three years unmaintained and also WPF so I couldn't get it running in Wine. I am still considering attempting to write a native telestrator plugin for OBS.

@bk138
Copy link
Owner

bk138 commented Jan 22, 2021

Hi @Wyatts, thanks for reporting here. Can you provide me with a step-by-step description of a simple setup so I can repro?

Is it simply: installing OBS and trying to capture Gromit-MPX annotations? IIRC from twitter it's a bit more complicated...

Just tried OBS:

  • with whole-screen capture (XSHM): captures annotations.
  • with window-capture (XCOMPOSITE): does not capture annotations, which is expected as OBS just captures (the actually off-screen) contents of the selected window and Gromit-MPX's annotations are in another window.
  • I reckon you're selecting multiple OBS sources with one being the Gromit-MPX window?

@bk138
Copy link
Owner

bk138 commented Jan 22, 2021

#75 might be related...

@Llammissar
Copy link
Author

Yeah, that's almost my repro. The distinction is when I add an Xcomposite source, I don't even see gromit in the dropdown; it sounds like you do?

@bk138
Copy link
Owner

bk138 commented Jan 23, 2021

Yeah, that's almost my repro. The distinction is when I add an Xcomposite source, I don't even see gromit in the dropdown; it sounds like you do?

Me neither, and that's very likely due to https://github.com/bk138/gromit-mpx/blob/master/src/main.c#L1222

@bk138 bk138 changed the title gromit-mpx capture in OBS Studio gromit-mpx not selectable as XCOMPOSITE source in OBS Studio Jan 24, 2021
@yassir-a-p
Copy link

Hi, I just discovered Gromit MPX, it's really great. Though, I also searched for annotation tool because I want to use it in OBS to be used as separate source, not in whole-screen capture.
Hope this issue can be solved soon.

@flaviobarros
Copy link

Any news?

@veroarriola
Copy link

Hi. I just had the same issue.

@Pistos
Copy link

Pistos commented Oct 29, 2023

+1; please implement, if possible.

@nasafix-nasser
Copy link

Hi, I just have the same issue! Any news :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants