Coder Social home page Coder Social logo

Comments (8)

mctrafik avatar mctrafik commented on July 20, 2024

+1 to the above.

For ease of discovery, this is the libobs error:

  By not providing "FindLibObs.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "LibObs", but
  CMake did not find one.

  Could not find a package configuration file provided by "LibObs" with any
  of the following names:

    LibObsConfig.cmake
    libobs-config.cmake

  Add the installation prefix of "LibObs" to CMAKE_PREFIX_PATH or set
  "LibObs_DIR" to a directory containing one of the above files.  If "LibObs"
  provides a separate development package or SDK, be sure it has been
  installed.

I tried downloading and installing the source for obs-studio, but it doesn't like the libobs that's in there. :/ I'm a programmer but not a C programmer, and this is a stopping point for me, too. Too bad. Really wanted to try this out.

from obs-backgroundremoval.

royshil avatar royshil commented on July 20, 2024

yea finding libobs was a huge pain.

If you install OBS app you already have the binaries for libobs (e.g. /Applications/OBS.app/Contents/Frameworks/libobs.0.dylib)
but you don't have the headers. so you need to clone the main obs repo e.g. git clone [email protected]:obsproject/obs-studio.git

then you'd need to point FindLibObs.cmake to find the lib and headers:

find_path(LIBOBS_INCLUDE_DIR
	NAMES obs.h
	HINTS
		ENV obsPath${_lib_suffix}
		ENV obsPath
		${obsPath}
	PATHS
		/Users/roy_shilkrot/Downloads/obs-studio/libobs/
		/usr/include /usr/local/include /opt/local/include /sw/include
	PATH_SUFFIXES
		libobs
	)

and

	find_library(${base_name_u}_LIB
		NAMES ${_${base_name_u}_LIBRARIES} ${lib_name} lib${lib_name} ${lib_name}.0
		HINTS
			ENV obsPath${_lib_suffix}
			ENV obsPath
			${obsPath}
			${_${base_name_u}_LIBRARY_DIRS}
		PATHS
			/Applications/OBS.app/Contents/Frameworks
			/usr/lib /usr/local/lib /opt/local/lib /sw/lib
# ...

I'm working to streamline this...

from obs-backgroundremoval.

royshil avatar royshil commented on July 20, 2024

I've created a release so you could download the pre-built binaries: https://github.com/royshil/obs-backgroundremoval/releases/tag/0.1-alpha

Follow the instructions on the release page.

Also added the above instructions to the README.md.

from obs-backgroundremoval.

mctrafik avatar mctrafik commented on July 20, 2024

Thank you for the reply, Roy.

I tired the pre-built binaries. Copied them into the plugin folders. Doesn't seem to work. I get:

error: os_dlopen(/Applications/OBS.app/Contents/PlugIns/obs-backgroundremoval.so->/Applications/OBS.app/Contents/PlugIns/obs-backgroundremoval.so): dlopen(/Applications/OBS.app/Contents/PlugIns/obs-backgroundremoval.so, 257): Library not loaded: /usr/local/opt/onnxruntime/lib/libonnxruntime.1.7.2.dylib
  Referenced from: /Applications/OBS.app/Contents/PlugIns/obs-backgroundremoval.so
  Reason: image not found

warning: Module '/Applications/OBS.app/Contents/PlugIns/obs-backgroundremoval.so' not loaded

My brew installs a different version:

% ls /usr/local/opt/onnxruntime/lib       
libonnxruntime.1.5.3.dylib	libonnxruntime.dylib

So I'm guessing the pre-built version doesn't work universally.

from obs-backgroundremoval.

royshil avatar royshil commented on July 20, 2024

OK. one solution is to bundle libonnxruntimeNNN.dylib with the plugin, and copy it to the same directory for it find it
another solution is to get the plugin to link against the symlinked version so it just finds any libonnxruntime.dylib and tries to use it (instead of forcing the exact one).

i'll take a look into option 2. but for now i'll just add the dylib to the release files

from obs-backgroundremoval.

troypesola avatar troypesola commented on July 20, 2024

I'm unable to build too.

I did build a local copy of OBS Studio. I set the header and libs to point to the git repo folders. 'cmake ..' works

But then 'cmake --build ..' fails with "Could not load cache".

I removed the CMakeCache.txt file, reran 'cmake ..' and I get the same error.

from obs-backgroundremoval.

troypesola avatar troypesola commented on July 20, 2024

Looks like simply changing the build command to use current folder instead worked.

  • 'cmake --build .'
  • And then add a step to create the obs-backgroundremoval folder

Looks like it is working!

from obs-backgroundremoval.

royshil avatar royshil commented on July 20, 2024

I'm going to close this issue since i re-did the build and install parts.
open another issue if you're running into problems.

thanks for the help!

from obs-backgroundremoval.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.