diff --git a/src/applications/obs.sh b/src/applications/obs.sh old mode 100644 new mode 100755 index 3bd7e50..a0f95ac --- a/src/applications/obs.sh +++ b/src/applications/obs.sh @@ -1,2 +1,42 @@ -sudo apt update -sudo apt install obs-studio -y \ No newline at end of file +#!/usr/bin/env bash +# Plugin for enabling virtual camera +sudo apt-get install v4l2loopback-dkms + +sudo apt install obs-studio -y + +sudo apt install -y libobs-dev libopencv-dev language-pack-en wget git build-essential cmake libsimde-dev +sudo -u $SUDO_USER wget https://github.com/microsoft/onnxruntime/releases/download/v1.7.0/onnxruntime-linux-x64-1.7.0.tgz +sudo tar xzvf onnxruntime-linux-x64-1.7.0.tgz --strip-components=1 -C /usr/local/ --wildcards "*/include/*" "*/lib*/" + +# Clone and donwload plugin +sudo -u $SUDO_USER mkdir -p Applications +cd Applications +sudo -u $SUDO_USER git clone https://github.com/royshil/obs-backgroundremoval.git +cd obs-backgroundremoval + +# There is still a build failure in the plugin for Ubuntu +# Edit cmake and filter files to fix the problem +sed -i 's/find_package(obs-frontend-api Required)/#find_package(obs-frontend-api Required)/g' CMakeLists.txt +sed -i 's/OBS::libobs OBS::obs-frontend-api/obs obs-frontend-api/g' CMakeLists.txt + +# add if statement for a function thats not needed on ubuntu +ex /src/background-filter.cpp <