Building - vaismais/obs-StreamFX GitHub Wiki
The StreamFX project natively supports two modes of building, Standalone and Bundled with OBS Studio, each with their own strengths and weaknesses. For beginner developers, it is recommended to start with a Bundled build and eventually progress to Standalone later on. This guide also assumes that you already have the minimum CMake knowledge required to configure and generate a project.
The main method to build StreamFX is to first set up an OBS Studio copy and then integrate the StreamFX repository into it.
- Uninstall any currently installed versions of StreamFX to prevent conflicts.
- Follow the OBS Studio build guide for automated building on your platform of choice.
- MacOS: You will need to use the XCode generator to build StreamFX as the Ninja generator does not support the flags StreamFX requires.
- Integrate StreamFX into the OBS Studio build flow:
- Navigate to either of these directories:
-
With UI:
<obs studio source>/UI/frontend-plugins
-
Without UI:
<obs studio source>/plugins
-
With UI:
- Open a
git
enabled shell (git-bash on windows). - Run
git submodule add 'https://github.com/Xaymar/obs-StreamFX.git' streamfx
. - Run
git submodule update --init --recursive
. - Append the line
add_subdirectory(streamfx)
to theCMakeLists.txt
file in the same directory.
- Navigate to either of these directories:
- Run the same script(s) from step 2 again.
- Done. StreamFX is now part of the build.
This method is designed for continuous integration and releases, and requires significant knowledge of CMake, OBS, and various other tools. Additionally it is not guaranteed to work on every machine, as it is only designed for use in continuous integration and nowhere else. It may even stop being maintained entirely with no warning whatsoever. You are entirely on your own when you choose this method.
- CMake 3.20 (or newer)
- Git
- Visual Studio 2019 (or newer)
-
Optional: LLVM
Used by clang-format and clang-tidy integration with ENABLE_CLANG. -
Optional: InnoSetup
Used for packaging installers and not required for anything else. -
Compatible OBS Studio Dependencies
Used for FFmpeg, CURL and other libraries. The filethird-party/obs-studio/.github/workflows/main.yml
lists the correct version asDEPS_VERSION_WIN
. -
Compatible Qt 5 or 6
Used for User Interface elements. The filethird-party/obs-studio/.github/workflows/main.yml
lists the correct version asDEPS_VERSION_WIN
andQT_VERSION_WIN
.
- Essential Build Tools
-
Debian / Ubuntu:
sudo apt install build-essential pkg-config checkinstall make ninja-build
-
Debian / Ubuntu:
-
Either:
- GCC 10 (or newer)
-
Debian / Ubuntu:
sudo apt install gcc-10
-
Debian / Ubuntu:
- LLVM + Clang 14 (or newer)
-
Debian / Ubuntu:
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" all 14
-
Debian / Ubuntu:
- GCC 10 (or newer)
-
CMake 3.20 (or newer)
-
Debian / Ubuntu:
sudo apt install cmake
-
Debian / Ubuntu:
-
Git
-
Debian / Ubuntu:
sudo apt install git
-
Debian / Ubuntu:
-
Qt 5 or 6
- Qt5 (StreamFX <0.12, OBS Studio <28.0)
Debian / Ubuntu:sudo apt install qtbase5-dev qtbase5-private-dev libqt5svg5-dev
- Qt6 (StreamFX >=0.12, OBS Studio >=28.0)
Debian / Ubuntu:sudo apt install qt6-base-dev qt6-base-private-dev libqt6svg6-dev
- Qt5 (StreamFX <0.12, OBS Studio <28.0)
-
FFmpeg
-
Debian / Ubuntu:
sudo apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev
-
Debian / Ubuntu:
-
CURL
-
Debian / Ubuntu:
sudo apt install libcurl4-openssl-dev
-
Debian / Ubuntu:
- MacOS 10.15 (or newer) for x86_64, MacOS 11.0 (or newer) for arm64
- Xcode 11.x (or newer) for x86_64, Xcode 12.x (or newer) for arm64
- CMake 3.20 (or newer)
- Git
-
Compatible OBS Studio Dependencies
Used for FFmpeg, CURL and other libraries. The filethird-party/obs-studio/.github/workflows/main.yml
lists the correct version asDEPS_VERSION_MAC
. -
Compatible Qt 5 or 6
Used for User Interface elements. The filethird-party/obs-studio/.github/workflows/main.yml
lists the correct version asDEPS_VERSION_WIN
andQT_VERSION_MAC
.
Using your preferred tool of choice for git, clone the repository including all submodules into a directory. If you use git directly, then you can clone the entire project with git clone --recursive https://github.com/Xaymar/obs-StreamFX.git obs-streamfx
.
There are two ways to handle this step, with the GUI variant of CMake and with the command line version of CMake. This guide will focus on the GUI variant, but all the steps below can be done with the command line version as well.
- Launch CMake-GUI and wait for it to open.
- Click the button named
Browse Build
and point it at an empty folder. For example, create a folder in the project calledbuild
and select that folder. - Click the button named
Browse Source
and point it at the project itself. - Click the button named
Configure
, select your preferred Generator (the default is usually fine), and wait for it to complete. This will most likely result in an error which is expected. - Adjust the variables in the variable list as necessary. Take a look at the documentation for what each option does.
-
libobs_DIR
should point at a precompiled version of the OBS Libraries for the target platform. -
FFmpeg_DIR
,CURL_DIR
andAOM_DIR
should point at the location of the OBS Dependencies matching the target libOBS version. -
Qt_DIR
should point at the location of a compatible Qt version matching the target libOBS version.
-
- Click the button named
Generate
, which will also runConfigure
. Both together should succeed if you did everything correctly. - If available, you can now click the button named
Open Project
to immediately jump into your IDE of choice.
The StreamFX project is extremely configurable and allows you to create tailored versions just for your own experience. Note that many options will be prefixed by StreamFX_
if the build is detected to be of the Bundled variety in order to avoid collisions.
-
GIT
Path to thegit
binary on your system, for use with features that require git during configuration and generation. -
VERSION
Set or override the version of the project with a custom one. Allowed formats are: SemVer 2.0.0, CMake. -
ENABLE_CODESIGN
Enable code signing integration on supported platforms. -
ENABLE_CLANG
Enable integration ofclang-format
andclang-tidy
-
LibObs_DIR
Path to the obs-studio libraries. -
Qt5_DIR
,Qt6_DIR
orQt_DIR
(autodetect)
Path to Qt5 (OBS Studio 27.x and lower) or Qt6 (OBS Studio 28.x and higher). -
FFmpeg_DIR
Path to compatible FFmpeg libraries and headers. -
CURL_DIR
Path to compatible CURL libraries and headers. -
AOM_DIR
Path to compatible AOM libraries and headers.
-
ENABLE_FASTMATH
Enable fast math optimizations if the compiler supports them. This trades precision for performance, and is usually good enough anyway. -
ENABLE_LTO
Enable link time optimization for faster binaries in exchange for longer build times. -
ENABLE_PROFILING
Enable CPU and GPU profiling code, this option reduces performance drastically. -
TARGET_*
Specify which architecture target the generated binaries will use.
-
ENABLE_ENCODER_AOM_AV1
Enable the AOM-AV1 encoder feature. -
ENABLE_ENCODER_FFMPEG
Enable the FFmpeg encoder feature. -
ENABLE_ENCODER_FFMPEG_AMF
Enable the AMF provider for the FFmpeg encoder feature. -
ENABLE_ENCODER_FFMPEG_DNXHR
Enable the DNxHR provider for the FFmpeg encoder feature. -
ENABLE_ENCODER_FFMPEG_NVENC
Enable the NVENC provider for the FFmpeg encoder feature. -
ENABLE_ENCODER_FFMPEG_PRORES
Enable the ProRes provider for the FFmpeg encoder feature. -
ENABLE_FILTER_AUTOFRAMING
Enable the Auto-Framing filter feature. -
ENABLE_FILTER_AUTOFRAMING_NVIDIA
Enable the NVIDIA provider for the Auto-Framing filter feature. -
ENABLE_FILTER_BLUR
Enable the Blur filter feature. -
ENABLE_FILTER_COLOR_GRADE
Enable the Color Grading filter feature. -
ENABLE_FILTER_DENOISING
Enable the Denoising filter feature. -
ENABLE_FILTER_DENOISING_NVIDIA
Enable the NVIDIA provider for the Denoising filter feature. -
ENABLE_FILTER_DYNAMIC_MASK
Enable the Dynamic Mask filter feature. -
ENABLE_FILTER_SDF_EFFECTS
Enable the SDF Effects filter feature. -
ENABLE_FILTER_SHADER
Enable the Shader filter feature. -
ENABLE_FILTER_TRANSFORM
Enable the 3D Transform filter feature. -
ENABLE_FILTER_UPSCALING
Enable the Upscaling filter feature. -
ENABLE_FILTER_UPSCALING_NVIDIA
Enable the NVIDIA provider for the Upscaling filter feature. -
ENABLE_FILTER_VIRTUAL_GREENSCREEN
Enable the Virtual Greenscreen filter feature. -
ENABLE_FILTER_VIRTUAL_GREENSCREEN_NVIDIA
Enable the NVIDIA provider for the Virtual Greenscreen filter feature. -
ENABLE_SOURCE_MIRROR
Enable the Source Mirror source feature. -
ENABLE_SOURCE_SHADER
Enable the Shader source feature. -
ENABLE_TRANSITION_SHADER
Enable the Shader transition feature. -
ENABLE_FRONTEND
Enable the OBS Studio front-end integration. -
ENABLE_UPDATER
Enable the Auto-Updater integration, works much better if ENABLE_FRONTEND is also enabled.
These options are only available in Standalone mode.
-
CMAKE_INSTALL_PREFIX
The path in which installed content should be placed when building theinstall
target. -
STRUCTURE_PACKAGEMANAGER
If enabled will install files in a layout compatible with package managers. -
STRUCTURE_UNIFIED
Enable to install files in a layout compatible with an OBS Studio plugin manager.
These options are only available in Standalone mode.
-
PACKAGE_NAME
The name of the packaged archive, excluding the prefix, suffix and extension. -
PACKAGE_PREFIX
The path in which the packages should be placed. -
PACKAGE_SUFFIX
The suffix to attach to the name, before the file extension. If left blank will attach the current version string to the package. -
STRUCTURE_UNIFIED
Enable to replace the PACKAGE_ZIP target with a target that generates a single.obs
file instead.
- As it was starting to show its age and lack of flexibility, the "Auto-Dependency" system was replaced with proper scripts in v0.12 and beyond. These scripts can handle far more than the integrated system could, with less impact as well.