Crowsinc / LiveVisionKit

LiveVisionKit brings the powers of computer vision and image processing to OBS Studio; implementing state of the art filters such as image enhancement and real-time video stabilization.
GNU General Public License v3.0
153 stars 14 forks source link

OBS : macos plug-in #5

Closed mrmazure closed 2 years ago

mrmazure commented 2 years ago

Hello Crowsinc,

Thank you for your absolutely amazing plug-in! Is a macos version (M1 chip compatible) planned for the stabilization plug-in?

Thank you for your work

Crowsinc commented 2 years ago

Hi, unfortunately I'm unable to provide an M1 mac compatible version as I don't access to the hardware for testing & optimization. But I am happy to do so if the circumstances change.

You could attempt to run it through a Windows 11 or Linux VM, but I think you will find that the performance will be lacking.

I'll post any future updates regarding this feature this thread.

mrmazure commented 2 years ago

Thank you for your answer.

I actually tried to use it through Windows 11 virtualization with Parallels Desktop. Problem, it is an ARM version of Windows (only this version works on M1 chips) and the OBS plug-ins are not compatible.

Is there a way to make them run the plug-in on Windows ARM?

Crowsinc commented 2 years ago

Potentially, but I'm still unable to test a Windows 11 ARM copy because I don't have access to ARM hardware. It would be better to provide the plugin directly for MacOS in this case.

mrmazure commented 2 years ago

It would be necessary to be able to test on a Mac running with the M1 chip, I imagine that the M1 plug-ins are also different from the plug-ins of Macs running with Intel chips...

Complicated.

Thanks for your availability.

ArashMotamedi commented 2 years ago

Hi Crowsinc, I have an M1 Mac, and am also interested in getting your plug-in to work. Would you be able to provide some guidance on build/compile steps? If you can set me on the right path, I can try to build from source code and see if I can get it to work on an M1 Mac. Otherwise, we should look to see if we can get you access to an M1 machine, so that more people can benefit from your great work.

Crowsinc commented 2 years ago

Hi, there is no build system shipped with LVK yet but you are welcome to try and compile LiveVisionKit 1.1.1, which is stable.

The project depends on OBS-Studio 27.2.4 and OpenCV 4.5. OpenCV has to be compiled with the WITH_OPENCL flag turned on, then you must add the include path and link the compiled opencv_core, opencv_calib3d, opencv_features2d, opencv_flann, opencv_imgproc, and opencv_video libraries. OBS-Studio 27.2.4 needs to be compiled, and you need to add the libobs include path, and link the generated obs library. I should mention that the OBS-Studio master branch isn't backwards compatible with the latest 27.2.4 release, and they have stated that native M1 Mac support will be officially coming out after 27.2. They have also recently updated their build systems which may make building an older version a bit more complicated (or easier?).

For the LVK compilation, you need to use C++17 and you need to add the project root (where LiveVisionKit.hpp is) as an additional include directory. I believe that is all but let me know if you run into any troubles.

tullo-x86 commented 2 years ago

What about Intel macs? My work laptop is a 2019 MBP and wouldn't be able to use the M1 version anyway.

Crowsinc commented 2 years ago

Hi, by this point there is clear demand for macOS versions, whether M1 Mac or Intel Mac, so you can expect that they will be released if it becomes feasible.

However, the reality is that LiveVisionKit relies on OpenCL for cross-platform GPU compute and Apple have killed support of OpenCL in favor of their own proprietary compute API. Before I can commit to supplying a macOS version, I need to confirm that the plugin can even run on modern macOS hardware, and that its powerful enough to meet the recommended GPU spec of RTX 2060 or better. There is also the question of whether support for macOS can continue to be maintained in the future as LiveVisionKit expands its OpenCL usage, and Apple strays further away from OpenCL support.

While I personally want there to be macOS support for LiveVisionKit, support is unlikely at this moment but may become possible as the project matures.