-
Notifications
You must be signed in to change notification settings - Fork 78
Add provisional Mac and Linux support #16
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
Conversation
related #1 |
I'm on MacOS Ventura 13.4.1 and it doesn't seem to be working. Pressing the hotkey does nothing. https://drive.google.com/file/d/19DZp9zg13X_mMrIN4D6qrtDebgBD6oFW/view?usp=sharing and there is no error in the script log |
@mcnaveen Thanks for taking a look. I would have thought it would zoom in, just it wouldn't follow the mouse because I didn't change how the hotkeys worked (maybe they work differently on mac - I'll have to investigate somehow). Did the Could you try the latest script from main instead and see if it at least toggles the zoom? You'll probably need to enable Thanks! |
Update: It works amazingly well in Ubuntu 22.04 i3wm. I have tried so many Python scripts. This is the only one that works. But the quality isn't good. Anyway this can be fixed? |
With the Do any other OBS hotkeys work on your Mac? I had real trouble getting them to work correctly even without my script (they only work when I have OBS in focus) I haven't updated the hotkey code, so it's odd that it works on Ubuntu and Windows but not Mac.
So it does work for you on Ubuntu? Can you tell me what quality issue you are seeing? Mostly the script just animates a Crop/Pad filter with a timer. |
FYI - I just figured out that to get any hotkeys working in OBS for Mac (even without the script), I needed to enable permissions for OBS in |
I have enabled both options. Still, it doesn't work. |
I modified the code slightly to pick the correct default on OBS for Mac Ventura, and got it tested out on a more modern mac. Here you can see the script working on 3 different OS's. Ignore the fps of the gifs, in real life it is a lot smoother: Note: For Ubuntu I installed the loopback package to enable XSHM capture because that one works most like other platform captures. The script also works with a Pipewire capture source but it can't auto calculate the size so you have to enable |
fixes #1 |
LGTM 🫡 Tested with OBS p.s: It's not working with a lower version of OBS <v29.x.x |
I think it was working, just you had to enable "Allow any zoom source". I updated the mac version check to use |
This PR adds the FFI defines for Linux and Mac so that the script can now get the mouse position on those platforms.
Inspired by work shown in PR #14 by v0l
Note: I only tested this on Ubuntu 22.04.2 and Mac OS Catalina (I know that's really old but it's the only apple device I have access to). This means it's possible (likely?) that the support won't work on other flavors of Linux or newer versions of Mac.
If anyone is interested in testing it out on other versions and modifying the code, you'll want to look at the
FFI
defines for each platform near the top of the file and theget_mouse_pos()
function. For OSX specifically theget_dc_info()
may need updating because the display-capture source for Mac changed between OBS 29.0 and 29.1 and catalina can only install 29.0 :(