Custom FreeBSD builds allow full customization of the desired build configuration but also require manual setup and preparation. Available CMake configuration variables can be found in the CMake build system documentation.
NOTE: FreeBSD is not officially supported by the OBS team and is provided as-is.
git clone --recursive https://github.com/obsproject/obs-studio.git
(If you do not know what submodules are, or you are not using Git from the command line, PLEASE make sure to fetch the submodules too.)
CI/freebsd/01_install_dependencies.sh
from the checkout directory (run it with the --help
switch to see all available options). NOTE: The directory where the script will download and setup the dependencies in cannot be changed.
Alternatively the required dependencies can be installed using apt
:
Build system dependencies
sudo pkg install cmake ninja pkgconf curl ccache
OBS dependencies (core):
sudo pkg install ffmpeg libx264 mbedtls mesa-libs jansson lua52 luajit python37 libX11 xorgproto libxcb libXcomposite libXext libXfixes libXinerama libXrandr swig dbus jansson libICE libSM libsysinfo
OBS dependencies (UI):
sudo pkg install qt5-buildtools qt5-qmake qt5-imageformats qt5-core qt5-gui qt5-svg qt5-widgets qt5-xml
Plugin dependencies:
sudo pkg install v4l_compat fdk-aac fontconfig freetype2 speexdsp libudev-devd libv4l vlc audio/jack pulseaudio sndio
cmake -S . -B -G Ninja \
-DLINUX_PORTABLE=ON \
-DENABLE_PIPEWIRE=OFF
Optional Settings:
Debug
, Release
, RelWithDebInfo
, or MinSizeRel
as -DCMAKE_BUILD_TYPE
NOTE: When building OBS with LINUX_PORTABLE
disabled, OBS expects GNU-based install paths (e.g. /usr/local/[bin,lib,share]
) and is built for a single architecture only. To create separate builds for 32-bit and 64-bit architectures, always enable portable builds.
cmake --build
to build the entire OBS projectcmake --build -t libobs
to build only libobs or any other valid targetcmake --build -t clean
to clean your current build directory
Installation will use the directory specified via -DCMAKE_INSTALL_PREFIX
or can be customised with the --prefix
switch:
cmake --install
to install OBS to the prefix the project was configured withcmake --install --prefix
to install OBS to a custom location
cmake --package
- CMake will handle all operations necessary to create a installer package (compressed archive as well as shell script with embedded binary)