tryptech / obs-zoom-and-follow

Dynamic zoom and mouse tracking script for OBS Studio
Apache License 2.0
375 stars 62 forks source link

Multi-Monitor and PyWInCtl, PyMonCtl and PyWinBox issues #137

Open Kalmat opened 1 year ago

Kalmat commented 1 year ago

Hi @tryptech!

Some users are opening issues about multi-monitor and PyWinCtl related to OBS-Zoom-and-Follow. I just wanted to check with you if we can work together in order to fine-tune everything in this sense.

Regarding PyWinCtl (and all its dependencies), some quick tips:

tryptech commented 1 year ago

@Kalmat I appreciate the check in.

Proceeding the , the install process in it's entirety is as follows:

  1. Install the most recent version of OBS
  2. Install the most recent version of Python supported by OBS
  3. Download the script git repository
  4. Install the requirements from the git onto the OBS-supported Python
  5. Configure the OBS-supported Python in OBS
  6. Add the obs-zoom-and-follow script to OBS
  7. Configure the script in OBS as per the "How to Use" section

Following this installation procedure, I commonly see the following issues:

    • Some users do not update their OBS regularly. I understand the hesitation as any major changes could break support with other plugins, or fundamentally change layouts. But I do not want to maintain for multiple versions of OBS when some of the data from their Python API is inconsistent between operating systems already.
    • OBS in the past has not always used the most recent version of Python. Previous versions of OBS were stuck to using Python 3.6.8 on Windows for a while.
    • Some users are using portable versions of Python in which they aren't fully aware of what they're installing or using, making it somewhat ambiguous as to what version of Python they might actually be using.
    • As you said, some Linux users have a built-in version of Python, which causes confusion as to what version of Python they're installing to altogether.
    • Some users do not get the most recent version of the script, either from having an old version on hand, or by using one distributed from another source.
    • Some users do not install the requirements at all, either because they do not install from the GitHub project directly, or they do not read the README.
    • Some users are not aware of this configuration option in the scripts section of OBS.
    • Some users configure the wrong Python version.
    • Some users install old versions of the script which I can't guarantee the function of with their combination of OS/Python/OBS
    • Old versions of the script had trouble here when loading sources. That has been factored out in recent versions of the script.
    • OBS changes have sometimes broken the script config behind the scenes.

I'm open to suggestions on how the install process can be improved or streamlined, but I do not believe the onus is on you to support at all since your libraries work as intended, and I do not believe that the onus is on me to address basic installation issues of OBS or Python.

Kalmat commented 1 year ago

Ok, I understand and fully agree with you. Sorry for my complete ignorance about OBS.

You are totally right that it is really complex and totally out of our reach. Thank you so much for your complete and very clear explanation. Just guessing, maybe it can be helpful to pin this answer (or a similar text) somewhere in Issues and/or Discussions (it's a pitty that github has no "troubleshooting" section). Maybe that way all users can easily find it and even help each other. Taking into account the "audience" your script is addressed to, perhaps a video showing the whole installation process and common mistakes may help (I know, I know... though definitely useful, maybe recording a video it's too much. It would also be extremely hard in my case... HAHAHAHA!)

Regarding Linux, I can run the tests. I have 2 monitors, actual installs of Ubuntu/GNOME, Ubuntu/Wayland and Manjaro/KDE; and VM installs of Mint/Cinnamon, KUbuntu and Raspbian. I can install some others if required. Just let me know how to. About maintaining it in Linux, most likely I will not be able because of, again, my total ignorance about OBS... But perhaps we can work together on it, or you can show me how to, or... well, who knows.

Kalmat commented 1 year ago

Hey! Just installed OBS Studio (v.29.1.3 64bit) in Ubuntu/GNOME from the Ubuntu Software Center. Once open, everything looks like black magic to me, to be honest... Well, let's get to the point:

  1. There is no "Python Path" option or similar (not inside "Tools -> Scripts", nor anywhere else that I could find)
  2. After loading OBS-Zoom-and-Follow script, I get the same message as many users: "ModuleNotFoundError: No module named 'pywinctl'"
  3. I then uninstalled OBS and installed it by following the Linux official installation page... Voilá! The ModuleNotFoundError is gone!!!

The conclusion is clear: if you install OBS from the Ubuntu Software Center, it fails; but it's OK if you install it from their repository.

If you or anyone else can provide me with some basic instructions on how to test the script, I can perform some basic tests to check if everything properly works in Linux. Furthermore, if you need to specifically test/debug something, just let me know.

Danie10 commented 1 year ago

A lot of issues come down to dependencies that differ. One solution "could be" getting the OBS Zoom and Follow script included into the OBS Flatpak package - that way any Linux distro can install OBS and use it, and it may negate the mix-match of modules and dependences. The issue with the Flatpak is we can't install scripts ourselves, so the Flatpak maintainer needs to include the script. The Zoom and Follow script is very popular so I can't see why they would not include it.

I see this request was already logged at https://github.com/obsproject/obs-studio/pull/8708, but closed and suggested it should be an installable plugin for the Flatpak version. It is explained at https://github.com/flathub/com.obsproject.Studio/wiki/Plugins how plugins can be distributed for the Flatpak version.

OBS Studio plugins can be distributed on Flathub as Flatpak extensions. This is the preferred method of distributing plugins. By using Flatpak for distribution, plugins can request additional permissions and alter some aspects of the sandbox.

Seems then there will be a standard OBS Studio base to support as the Flatpak is officially supported by OBS.