SceneSwitcher

OBS Studio 的自动场景切换器。「An automated scene switcher for OBS Studio」

  • 所有者: WarmUpTill/SceneSwitcher
  • 平台: Windows,Linux,Mac
  • 許可證: GNU General Public License v2.0
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

SceneSwitcher

An automated scene switcher for OBS Studio

More information can be found on https://obsproject.com/forum/resources/automatic-scene-switching.395/ and see https://github.com/WarmUpTill/SceneSwitcher/blob/master/CI/release/README.txt for installing releases.

Add the "SceneSwitcher" source directory to your obs-studio source directory under obs-studio/UI/frontend-plugins/:

cd obs-studio/UI/frontend-plugins/
git clone https://github.com/WarmUpTill/SceneSwitcher.git

Then modify the obs-studio/UI/frontend-plugins/CMakeLists.txt file and add an entry for the scene switcher:
add_subdirectory(SceneSwitcher)

Compiling out of tree

Prerequisites

You'll need CMake and a working development environment for OBS Studio installed
on your computer. Once you've done that, do the following:

git clone https://github.com/WarmUpTill/SceneSwitcher.git
cd SceneSwitcher
mkdir build && cd build

Windows

In cmake-gui, you'll have to set these CMake variables :

  • BUILD_OUT_OF_TREE (bool) : true
  • LIBOBS_INCLUDE_DIR (path) : location of the libobs subfolder in the source
    code of OBS Studio, located at [source_directory]/libobs/.
  • LIBOBS_LIB (filepath) : location of the obs.dll file (usually set to
    C:\Program Files\obs-studio\bin\64bit\obs.dll)

Assuming that you installed Qt via the regular Qt App way:

  • Qt5Core_DIR (path) : C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Core

  • Qt5Gui_DIR (path): C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Gui

  • Qt5Widgets_DIR (path) : C:/Qt/5.10.1/msvc2017_64/lib/cmake/Qt5Widgets

  • LIBOBS_FRONTEND_API_LIB (filepath) : location of the libobs-frontend-api.dll
    file, usually C:/Program Files/obs-studio/bin/64bit/obs-frontend-api.dll
    (usually in the same place as LIBOBS_LIB)

  • LIBOBS_FRONTEND_INCLUDE_DIR (path) : location of the obs-frontend-api
    subfolder in the source code of OBS Studio, located at [source_directory]/UI/obs-frontend-api.

Just keep hitting configure until all the vars are filled out. Then hit generate.

Linux

Most versions of Linux you can use cmake-gui or the command line.

For the command line:

cmake -DBUILD_OUT_OF_TREE=1 -DLIBOBS_INCLUDE_DIR="<path to the libobs/ sub-folder in obs-studio's source code>" \
-DLIBOBS_FRONTEND_INCLUDE_DIR="<path to the UI/obs-frontend-api/ sub-folder in obs-studio's source code>" \
-DLIBOBS_LIB="<path to the libobs.so file>" \
-DLIBOBS_FRONTEND_API_LIB="<path to the libobs-frontend-api.so file (usually in the same place as LIBOBS_LIB)>" \
-DCMAKE_INSTALL_PREFIX=/usr ..
make -j4
sudo make install

For cmake-gui you'll have to set the following variables:

  • BUILD_OUT_OF_TREE (bool) : true
  • LIBOBS_INCLUDE_DIR (path) : location of the libobs subfolder in the source
    code of OBS Studio, located at [source_directory]/libobs/.
  • LIBOBS_LIB (filepath) : location of the libobs.so file (usually CMake finds
    this, but if not it'll usually be in /usr/lib/libobs.so)

Assuming that you installed Qt via your system package manager, it should be
found automatically. If not, then usually you'll find it in something like:

  • Qt5Core_DIR (path) : /usr/lib64/cmake/Qt5Core

  • Qt5Gui_DIR (path): /usr/lib64/cmake/Qt5Gui

  • Qt5Widgets_DIR (path) : /usr/lib64/cmake/Qt5Widgets

  • LIBOBS_FRONTEND_API_LIB (filepath) : location of the libobs-frontend-api.so
    file (usually in the same place as LIBOBS_LIB)

  • LIBOBS_FRONTEND_INCLUDE_DIR (path) : location of the obs-frontend-api
    subfolder in the source code of OBS Studio, located at
    [source_directory]/UI/obs-frontend-api.

Just keep hitting configure until all the vars are filled out. Then hit generate.

Then open a terminal in the build folder and type:

make -j4
sudo make install

NOTE: The Linux version of this plugin is dependent on libXScrnSaver.

OS X

In cmake-gui, you'll have to set these CMake variables :

  • BUILD_OUT_OF_TREE (bool) : true
  • LIBOBS_INCLUDE_DIR (path) : location of the libobs subfolder in the source
    code of OBS Studio, located at [source_directory]/libobs/.
  • LIBOBS_LIB (filepath) : location of the libobs.0.dylib file (usually
    in /Applications/OBS.app/Contents/Resources/bin/libobs.0.dylib)

Assuming that you installed Qt via the regular Qt App way:

  • Qt5Core_DIR (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5Core

  • Qt5Widgets_DIR (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5Widgets

  • Qt5MacExtras_DIR (path) : Usually /Applications/Qt/5.10.1/clang_64/lib/cmake/Qt5MacExtras

  • LIBOBS_FRONTEND_API_LIB (filepath) : location of the libobs-frontend-api.0.dylib
    file (usually in usually in /Applications/OBS.app/Contents/Resources/bin/libobs-frontend-api.0.dylib)

  • LIBOBS_FRONTEND_INCLUDE_DIR (path) : location of the obs-frontend-api subfolder
    in the source code of OBS Studio, located at [source_directory]/UI/obs-frontend-api.

Just keep hitting configure until all the vars are filled out. Then hit generate.

Open xcode (or a terminal, depending on the build type you chose), build and copy
the advanced-scene-switcher.so file to /Applications/OBS.app/Contents/PlugIns

Note that you might have to adjust the library search paths using the install_name_tool if you want the plugin to run on machines other than your build machine:

install_name_tool -change @rpath/libobs-frontend-api.dylib @executable_path/../Frameworks/libobs-frontend-api.dylib UI/frontend-plugins/SceneSwitcher/advanced-scene-switcher.so
install_name_tool -change @rpath/libobs.0.dylib @executable_path/../Frameworks/libobs.0.dylib UI/frontend-plugins/SceneSwitcher/advanced-scene-switcher.so
install_name_tool -change /usr/local/opt/qt5/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets UI/frontend-plugins/SceneSwitcher/advanced-scene-switcher.so
install_name_tool -change /usr/local/opt/qt5/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui UI/frontend-plugins/SceneSwitcher/advanced-scene-switcher.so
install_name_tool -change /usr/local/opt/qt5/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore UI/frontend-plugins/SceneSwitcher/advanced-scene-switcher.so

概覽

名稱與所有者WarmUpTill/SceneSwitcher
主編程語言C++
編程語言C++ (語言數: 7)
平台
許可證GNU General Public License v2.0
發布數68
最新版本名稱1.26.1 (發布於 )
第一版名稱1.4 (發布於 )
創建於2016-05-19 13:56:36
推送於2024-05-18 21:31:07
最后一次提交2024-05-18 22:46:21
星數821
關注者數18
派生數63
提交數1.7k
已啟用問題?
問題數376
打開的問題數52
拉請求數616
打開的拉請求數11
關閉的拉請求數25
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部