Coder Social home page Coder Social logo

Comments (15)

royshil avatar royshil commented on August 21, 2024 1

i don't think these warnings are the reason for the crash.

it's possible we will have to debug this to understand the problem.
you can add log printouts to see where it actually crashes.

another method is to comment out all the code in the plugin, e.g. the

static void *filter_create(obs_data_t *settings, obs_source_t *source)

function - just comment out everything inside there.
compile and run.
if it runs - we have a lead.
then start uncommenting blocks of lines, and when it crashes again.

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024 1

glad to hear you were successful ! i'm closing this issue

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024

did you copy the model file as well to the data folder?

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

Thanks for the response. Yes, I ran the following commands from the build directory:

$ cp obs-backgroundremoval.so /Applications/OBS.app/Contents/PlugIns
$ cp ../data/SINet_Softmax.onnx /Applications/OBS.app/Contents/Resources/data/obs-plugins/obs-backgroundremoval/

No errors and I can see the files are there.

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024

"no errors" do you mean it's now working?

can you see any other error? e.g. if you run OBS from the command line like $ /Applications/OBS.app/Contents/MacOS/obs - what do you see in the logs?

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

Sorry, "no errors" in this case referred to the copy operation.

Running $ /Applications/OBS.app/Contents/MacOS/obs gave the following output:

info: Using preferred locale 'en-GB'
info: CPU Name: Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
info: CPU Speed: 2000MHz
info: Physical Cores: 4, Logical Cores: 8
info: Physical Memory: 32768MB Total
info: OS Name: Mac OS X (NSMACHOperatingSystem)
info: OS Version: Version 11.2.3 (Build 20D91)
info: Kernel Version: 20.3.0
error: hotkeys-cocoa: Getting keyboard keys failed
error: hotkeys-cocoa: Getting keyboard keys failed
info: hotkeys-cocoa: Using layout 'com.apple.keylayout.US'
info: Current Date/Time: 2021-04-26, 11:56:32
info: Browser Hardware Acceleration: true
info: Portable mode: false
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_clicked()
QMetaObject::connectSlotsByName: No matching signal for on_advAudioProps_destroyed()
QMetaObject::connectSlotsByName: No matching signal for on_actionGridMode_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_program_customContextMenuRequested(QPoint)
QMetaObject::connectSlotsByName: No matching signal for on_transitionRemove_clicked()
info: OBS 26.1.2 (mac)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
	samples per sec: 48000
	speakers:        2
info: ---------------------------------
info: Initializing OpenGL...
info: Loading up OpenGL on adapter Intel Inc. Intel(R) Iris(TM) Plus Graphics OpenGL Engine
info: OpenGL loaded successfully, version 4.1 INTEL-16.1.12, shading language 4.10
info: ---------------------------------
info: video settings reset:
	base resolution:   1920x1080
	output resolution: 1920x1080
	downscale filter:  Bicubic
	fps:               30/1
	format:            NV12
	YUV mode:          709/Partial
info: NV12 texture support not available
info: Audio monitoring device:
	name: Default
	id: default
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-ouput-ui.so'
2021-04-26 11:56:32.465 obs[3482:164207] mac-virtualcam(DAL): PlugInMain version=1.3.0
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_QueryInterface 
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_Release sRefCount now = 0
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_InitializeWithObjectID self=0x2bb5a478
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData OBSDALDevice(33) kCMIOObjectPropertyListenerAdded self=0x2bb5a478 data(int)=1684629094
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData OBSDALDevice(33) kCMIOObjectPropertyListenerAdded self=0x2bb5a478 data(int)=1869180523
2021-04-26 11:56:32.466 obs[3482:164207] mac-virtualcam(DAL): HardwarePlugIn_ObjectSetPropertyData OBSDALDevice(33) kCMIOObjectPropertyListenerAdded self=0x2bb5a478 data(int)=1885762592
warning: A DeckLink iterator could not be created.  The DeckLink drivers may not be installed
info: No blackmagic support
info: [mac-virtualcam] version=1.3.0
info: [VideoToolbox encoder]: Adding VideoToolbox H264 encoders
warning: Failed to load 'en-US' text for module: 'obs-backgroundremoval.so'
[1]    3482 illegal hardware instruction  /Applications/OBS.app/Contents/MacOS/obs

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024

hmm it's not even loading the module. when the SInet ONNX model file is not in place it crashes... maybe that's the problem?

also - what version of Mac OSX are you running?
this should be supported from 10.13+, but i need to check more thoroughly

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

image

And MacOS version is the latest AFAIK

info: OS Version: Version 11.2.3 (Build 20D91)

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024

can you try the latest release i've put up yesterday ?

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

I have done just that, but unfortunately ran into the same error when running OBS.

I did notice some warnings when making a fresh build.

[ 33%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/background-filter.cpp.o
[ 66%] Building CXX object CMakeFiles/obs-backgroundremoval.dir/src/plugin-main.cpp.o
[100%] Linking CXX shared module obs-backgroundremoval.so
ld: warning: dylib (/usr/local/lib/libopencv_imgproc.4.5.2.dylib) was built for newer macOS version (11.0) than being linked (10.13)
ld: warning: dylib (/usr/local/lib/libopencv_core.4.5.2.dylib) was built for newer macOS version (11.0) than being linked (10.13)
[100%] Built target obs-backgroundremoval

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

I tried commenting out the contents of filter_create, but that didn't help. I then went on to comment out all the functions referenced in background_removal_filter_info, and still no luck.

Only thing that got OBS to run was commenting out obs_register_source(&background_removal_filter_info); from plugin-mail.cpp, which I suppose is expected, because it prevents the entire module from loading.

I now suspect there's an issue with one of the included libraries on my machine. Will keep investigating.

from obs-backgroundremoval.

royshil avatar royshil commented on August 21, 2024

@benmurden i've added a script to build opencv with static linking - see the README,

<project>/build/ $ ../scripts/makeOpenCV_osx.sh

then build the plugin as usual.

i hope this will reduce the library surface area and reduce potential problems.

also - make sure to link build and link vs. the right version of libOBS
e.g. if you're running OBS 26.1.1 (run OBS and check the version) - build and link vs v26.1.1
if you're building on your own - check out the right tag from the git repo.

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

After checking out the tag 26.1.2 of the obs-studio repo I was able to compile and run the plugin successfully. 🎉

I sincerely apologise for not having realized this sooner. Thanks for your help getting it going!

from obs-backgroundremoval.

GladstoneFilho avatar GladstoneFilho commented on August 21, 2024

After checking out the tag 26.1.2 of the obs-studio repo I was able to compile and run the plugin successfully. 🎉

I sincerely apologise for not having realized this sooner. Thanks for your help getting it going!

Hi benmurden. I still having my OBS crashing on OSx. Could you help me?
I didn't understand what did you do to have successfully

I'm using OBS 27.0.0 and OSX 10.15.7

from obs-backgroundremoval.

benmurden avatar benmurden commented on August 21, 2024

I didn't try with 27.0.0, but if you checkout that tag and compile against that i.e. not master then you should be good to go.

$ git fetch --all --tags
$ git checkout tags/27.0.0

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.