-
Notifications
You must be signed in to change notification settings - Fork 9
Installation and Building
If you want to develop for OBS, please visit our Discord and get to know the devs or have questions answered!
Also, if there is something in this guide you want to change/improve on, it is recommended that you talk about it with the devs in Discord or IRC first.
Please note that any install directions/packages for Linux/FreeBSD distributions listed as Unofficial means that they are community provided, and any support for those packages should be directed at the appropriate distro/package maintainers.
Dependency | Available Pre-Built (macOS and Windows) |
---|---|
FFmpeg | YES |
x264 | YES |
cURL |
YES (required on Windows only) |
mbedTLS | YES |
Chromium Embedded Framework | YES |
Qt | YES |
We suggest having a current version of Git and CMake installed on the build system. macOS and Linux systems also require the Ninja build system to be installed, CCache can be installed to speed up consecutive builds as well and is supported by the build system.
The repository has build scripts for Windows, macOS and Linux available (written for Powershell and Bash respectively) that can set up build tools and dependencies for the developer as well as building and packaging OBS. Check out the OS-dependent chapters below for more detail on available functionality.
Pre-built Windows versions can be found on the official releases page at https://github.com/obsproject/obs-studio/releases/.
The full .exe
installer and .zip
package contain OBS Studio (32bit and 64bit), Browser Source, and Intel® RealSense™ plugin. You will be prompted during install for the Browser Source and RealSense plugin to be installed if using the .exe
installer, otherwise the components are included in the .zip
.
The small .exe
installer contains the base OBS Studio (32bit and 64bit), Intel® RealSense™ plugin, but does not contain the Browser Source plugin.
NOTE: If using the .zip
package for either the full or small installation and extracting to a non-standard program location (i.e. outside Program Files), you will need to add the security group ALL APPLICATION PACKAGES
to have full control over the main OBS Studio directory and sub-directories. Certain features may not function properly without these security rights (primarily, the ability to use game capture with UWP apps).
Automatic Windows builds allow building OBS with minimal input and setup - necessary dependencies are installed automatically, build flags use a sane default and the generated OBS build uses the application's full feature set.
-
Necessary Preconditions for Automatic Windows Builds:
- Windows Powershell (v5+ and more recent)
- Visual Studio 2019 (at least Community Edition)
- Windows 10 SDK (minimum 10.0.19041.0)
- Git for Windows
Do note that the automatic build scripts can use Chocolatey to automatically install additional build dependencies (CMake and 7-Zip), by passing the -Choco
switch.
-
Clone the repository including submodules:
git clone --recursive https://github.com/obsproject/obs-studio.git
-
To do a fully automated build, open a Powershell window, switch to the checkout directory then run one of the following commands:
# Download and set up dependencies, then build OBS for local host
# architecture with common feature set
CI/build-windows.ps1
# Check for dependencies installable via Chocolatey
CI/build-windows.ps1 -Choco
# Skip download and setup of dendencies
CI/build-windows.ps1 -SkipDependencyChecks
# Build 32-bit only
CI/build-windows.ps1 -BuildArch '32-bit'
# Build both architectures
CI/build-windows.ps1 -CombinedArchs
# Create a zip archive with OBS and all required libraries
CI/build-windows.ps1 -Package
# Create a debug build
CI/build-windows.ps1 -BuildConfiguration Debug
# Use `my_build_dir` prefix as build directory
CI/build-windows.ps1 -BuildDirectory my_build_dir
# Build and package a combined 64-bit and 32-bit of OBS with Release configuration,
# using more verbose output and skipping dependency checks
CI/build-windows.ps1 -SkipDependencyChecks -CombinedArchs -BuildConfiguration Release -Verbose
# Show all available options
CI/build-windows.ps1 -Help
Custom Windows 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.
-
Necessary Preconditions for Custom Windows Builds:
-
Visual Studio 2019 (recommended)
- Windows 10 SDK (minimum 10.0.19041.0). Latest SDK
- Development packages of
FFmpeg
,x264
,cURL
, andmbedTLS
- Pre-built Windows dependencies for Visual Studio 2019 can be found here: dependencies2019
-
Qt5 (Grab the MSVC package for your version of Visual Studio)
- OBS officially supports building with Qt 5.15.2
- CEF Wrapper 3770 (x64, x86)
- Windows version of CMake (3.20 or higher, latest preferred)
- Windows version of Git (Git binaries must exist in path)
-
Visual Studio 2019 (recommended)
- Clone the repository including submodules:
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).
- Download and set up most preconditions mentioned above, you can also run the script
CI/windows/01_install_dependencies.ps1
(run it with the-Help
switch to see all available options).
NOTE: You cannot change the directory where the script will download and setup the dependencies in.
-
Run cmake-gui, and set the following fields:
- In "where is the source code", enter in the repository directory (example:
D:/obs
). - In "where to build the binaries", enter the repository directory path with the 'build' subdirectory (example:
D:/obs/build
- if this directory does not exist, it will be created by CMake).
- In "where is the source code", enter in the repository directory (example:
-
Set required CMake variables either as Windows environment variables (allows usage across multiple projects) or directly as cache variables - check the CMake build system documentation for a full list and description of these variables:
-
CMAKE_PREFIX_PATH
- REQUIRED -
DepsPath
(DepsPath32
andDepsPath64
as architecture-specific variants) - LEGACY -
QTDIR
(QTDIR32
andQTDIR64
as architecture-specific variants) - LEGACY -
CEF_ROOT_DIR
(when building with browser support) -
VIRTUALCAM_GUID
(when building with Virtual Camera support)
-
-
In cmake-gui, press
Configure
and select the generator that corresponds with the desired installed Visual Studio version:- Visual Studio 16 2019, or their 64bit equivalents if you want to build the 64bit version of OBS
-
NOTE: If you need to change your dependencies from a build already configured, you will need to uncheck
COPIED_DEPENDENCIES
and runConfigure
again.
-
If you did not set up environment variables earlier you can now configure the variables named above in cmake-gui
-
In cmake-gui, press
Generate
to generate Visual Studio project files in thebuild
subdirectory.
-
Open
obs-studio.sln
from the subdirectory you specified under "where to build the binaries" (e.g.D:/obs/build
) in Visual Studio (or click theOpen Project
button from within cmake-gui). -
The project should now be ready to build and run. All required dependencies should be copied on compile and it should be a fully functional build environment. The build artifacts are installed into a subdirectory called
rundir/<CONFIG>
within your chose build directory (with<CONFIG>
beingDebug
,RelWithDebInfo
or any other build configuration that was successfully built).
If you want to use the Virtual Camera created by this build, you will have to run its install script and also remove the Virtual Camera from a standard OBS installation first:
-
To uninstall the OBS Virtual Camera
- Close any applications that were using the OBS Virtual Camera.
- In the OBS Studio installation directory, run
data\obs-plugins\win-dshow\virtualcam-uninstall.bat
as administrator.
-
To install an OBS Virtual Camera:
- In the OBS Studio artifact directory (for Visual Studio builds, this is
<BUILD DIRECTORY>/rundir/<CONFIG>
), rundata\obs-plugins\win-dshow\virtualcam-install.bat
as administrator.
- In the OBS Studio artifact directory (for Visual Studio builds, this is
Don't forget to uninstall your build's virtual camera before cleaning/deleting your build files.
Use of clang-format
is required for pull requests, and OBS uses a more recent version than is shipped with Visual Studio 2019:
- Download and install LLVM 8.0.0
- Run Visual Studio, select
Tools -> Options
from the menu- Go to
Text Editor -> C/C++ -> Code Style -> Formatting -> General
- Enable "Use custom clang-format.exe" and enter the file name, e.g.
C:\Program Files\LLVM\bin\clang-format.exe
- The default keyboard shortcut for formatting a document (Edit.FormatDocument) is Ctrl+K, Ctrl+D.
- Go to
Pre-built macOS versions can be found on the official releases page at https://github.com/obsproject/obs-studio/releases/.
Open the downloaded disk image file, then drag&drop the OBS icon on the Applications
folder icon.
Automatic macOS builds allow building OBS with minimal input and setup - necessary dependencies are installed automatically, build flags use a sane default and the generated OBS build uses the application's full feature set.
-
Necessary Preconditions for Automatic macOS Builds:
- macOS 10.13 or newer for x86_64-based builds
- macOS 11.0 or newer for arm64-based builds
- Command Line Tools (CLT) for Xcode (pick one):
- Install by running
xcode-select --install
in Terminal - Download from https://developer.apple.com/downloads
- Install Xcode
- Install by running
NOTE: Automatic build scripts use Homebrew to automatically install additional build dependencies. If Homebrew is already installed on the system, that Homebrew environment will be used.
-
Clone the repository including submodules:
git clone --recursive https://github.com/obsproject/obs-studio.git
-
To do a fully automated build, open Terminal, switch to the checkout directory then run one of the following commands:
# Download and set up dependencies, then build OBS for local host
# architecture with common feature set
CI/build-macos.sh
# Skip download and setup of dendencies
CI/build-macos.sh --skip-dependency-checks
# Create a relocatable OBS.app application bundle
CI/build-macos.sh --bundle
# Create a distributable disk image
CI/build-macos.sh --package
# Ask for and use available developer ID for codesigning
CI/build-macos.sh --codesign
# Notarize application bundle or distributable disk image
CI/build-macos.sh --notarize
# Compile and package a codesigned and notarized build of OBS
CI/build-macos.sh --package --notarize
# Create a relocatable and codesigned OBS.app application bundle without
# checking for dependencies
CI/build-macos.sh --skip-dependency-checks --codesign --bundle
# Show all available options
CI/build-macos.sh --help
Custom macOS 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.
-
Necessary Preconditions for Custom macOS Builds:
- macOS 10.15 or newer
- Command Line Tools (CLT) for Xcode (pick one):
- Install by running
xcode-select --install
in Terminal - Download from https://developer.apple.com/downloads
- Install Xcode
- Install by running
- CMake
- Ninja
- Optional: CCache to improve compilation speeds on consecutive builds
- Pre-Built OBS dependencies (includes
FFmpeg
,x264
,mbedTLS
,Qt
and more)- Download the latest version for your desired architecture from https://github.com/obsproject/obs-deps/releases
- Unpack the contents of the archive into
~/development/obs-build-dependencies/obs-deps
- For browser source and browser panel support, the pre-built CEF framework is needed:
- Chromium Embedded Framework (CEF) Intel x86_64
- Chromium Embedded Framework (CEF) Apple M1
- Preparation of CEF for use in OBS requires some fixups and compilation of the static wrapper library (see below)
- Alternatively download and setup the following dependencies manually:
- FFmpeg
- x264
- freetype
- mbedtls
- swig
- Qt5 (requires additional patches, check the obs-deps repository for more details)
- Open a Terminal window, create and switch to a directory you want to have OBS checked out
- Clone the repository including submodules:
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.)
- To download and set up most preconditions mentioned above, you can also run the script
CI/macos/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.
-
Switch to the directory where the pre-compiled Chromium Embedded Framework was downloaded and extracted
-
Fix the CMake build scripts:
/usr/bin/sed -i '.orig' '/add_subdirectory(tests\/ceftests)/d' ./CMakeLists.txt
/usr/bin/sed -E -i '' 's/"10.(9|10)"/"'10.13'"/' ./cmake/cef_variables.cmake
-
Run CMake to generate the build scripts for the static wrapper library:
cmake -S . -B build -G Ninja \ -DPROJECT_ARCH=x86_64 \ -DCEF_COMPILER_FLAGS="-Wno-deprecated-copy" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-std=c++11 -stdlib=libc++ -Wno-deprecated-declarations -Wno-unknown-warning-option" \ -DCMAKE_EXE_LINKER_FLAGS="-std=c++11 -stdlib=libc++" \ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13
-
Build the static wrapper library by running
cmake --build build
NOTE: This build requirement can be disabled by setting -DENABLE_BROWSER_SOURCE
to OFF
in the next step.
- Run CMake to generate a build environment
cmake -S . -B build -G Xcode
-DCEF_ROOT_DIR="~/development/obs-build-dependencies/cef_binary_4638_macos_x86_64" \
-DCMAKE_PREFIX_PATH="~/development/obs-build-dependencies/obs-deps" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
-DCMAKE_OSX_ARCHITECTURES="x86_64" \
Optional Settings:
- Specify a codesigning identity using
-DOBS_BUNDLE_CODESIGN_IDENTITY="[YOUR_IDENTITY]"
- Specify the output directory for creating application bundles using
-DCMAKE_INSTALL_PREFIX=[YOUR INSTALL DESTINATION]
- To build OBS without Xcode, change
Xcode
toNinja
as the-G
option - Specify the build configuration e.g. using
-DCMAKE_BUILD_TYPE=RelWithDebInfo
(Ninja or GNU Makefiles only)
- Open
obs-studio.xcodeproj
from the build directory (or any other directory specified via the-B
switch above) - Build OBS using
OBS
schema, recognisable by the OBS app icon.
Installation will use the directory specified via -DCMAKE_INSTALL_PREFIX
or can be customised with the --prefix
switch for Ninja-based builds.
-
If using Xcode:
- Open the generated Xcode project
- Install OBS using the
install
schema
-
If using the command line (Xcode, Ninja, or GNU Makefiles):
- Build OBS by running
cmake --build build
- Install OBS by running
cmake --install build
- Build OBS by running
Any installation directions marked Unofficial are not maintained by the OBS Studio team and may not provide all the features and/or be up to date or stable.
NOTE: OpenGL 3.3 or later is required to use OBS Studio on Linux. You can check what version of OpenGL is supported by your system by typing glxinfo | grep "OpenGL"
in a Terminal.
Please note that OBS Studio is not fully working on Chrome OS and features like Screen and Window Capture do not work.
-
xserver-xorg version 1.18.4 or newer is recommended to avoid potential performance issues with certain features in OBS, such as the fullscreen projector.
-
FFmpeg is required. If you do not have the FFmpeg installed (if you're not sure, then you probably don't have it), you can get it with the following commands:
sudo apt install ffmpeg
-
If you want virtual camera support you need v4l2loopback-dkms installed. You can install it with the following command :
sudo apt install v4l2loopback-dkms
-
Make sure you enabled the multiverse repo in Ubuntu's software center (NOTE: On newer versions of Ubuntu, adding a repository automatically apt updates.) Then you can install OBS with the following commands:
sudo add-apt-repository ppa:obsproject/obs-studio sudo apt update sudo apt install obs-studio
- "Release" version is available on the community repository:
sudo pacman -S obs-studio
- Some AUR packages are also available.
- Graphical: search "obs-studio" on Pamac Manager or Octopi
- Command-line: install it via pacman with the following command:
sudo pacman -S obs-studio
- Some AUR packages are also available.
-
OBS Studio is included in RPM Fusion. If you do not have it configured (if you're not sure, then you probably don't have it), you can do so with the following command:
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
-
Then you can install OBS with the following command (this pulls all dependencies, including NVENC-enabled FFmpeg):
sudo dnf install obs-studio
-
For NVIDIA Hardware accelerated encoding, make sure you have CUDA installed:
sudo dnf install xorg-x11-drv-nvidia-cuda
-
If you have an older card, use this command instead:
sudo dnf install xorg-x11-drv-nvidia-340xx-cuda
- OBS Studio is included in OpenMandriva Lx3 non-free repository and in restricted repository for upcoming Lx4 release - available now as Cooker.
-
Graphical: search and install "obs-studio" on "OpenMandriva Install and Remove Software" (Rpmdrake)
-
Command-line: install it as root (su or sudo) via terminal/konsole with the following command:
urpmi obs-studio
-
Graphical: search and install "obs-studio" on "OpenMandriva Software Management" (dnfdragora)
-
Command-line: install it as root (su or sudo) via terminal/konsole with the following command:
dnf install obs-studio
- Graphical: search
obs-studio
in Software Center - Command-line: install it as root (su or sudo) via terminal/konsole with the following command:
eopkg install obs-studio
-
The Packman repository contains the obs-studio package since it requires the fuller version of FFmpeg which is in Packman for legal reasons. If you do not already have the Packman repository add it as shown below.
- For openSUSE Tumbleweed:
sudo zypper ar -cfp 90 http://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman
- For openSUSE Leap 15.2 (If you're using a derivative of Leap, replace $releasever by your leap release number) :
sudo zypper ar -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_$releasever/' packman
-
The Packman version of FFmpeg should be used for full codec support. To ensure any existing codec packages are switched to Packman versions execute the following before installing obs-studio.
sudo zypper dup --from packman --allow-vendor-change
-
Install the obs-studio package.
sudo zypper in obs-studio
Links:
- 1 click install, direct rpm links, and download counts: http://packman.links2linux.org/package/obs-studio
- Build information: https://pmbs.links2linux.de/package/show/Multimedia/obs-studio
Command-line: can be installed using portage by the following command:
sudo emerge media-video/obs-studio
See https://packages.gentoo.org/packages/media-video/obs-studio for available versions and more information.
Command-line: can be installed by the following command:
nix-env -i obs-studio
See https://nixos.org/wiki/OBS for further instructions
UOS/Deepin 20 or newer is required.
-
First, make sure you have everything up-to-date.
sudo apt-get update
-
FFmpeg is required. If you do not have the FFmpeg installed (if you're not sure, then you probably don't have it), you can get it with the following command (or compile it yourself):
sudo apt-get install ffmpeg
-
Finally, install OBS Studio.
sudo apt-get install obs-studio
-
or with Spark Store:
sudo apt install com.obsproject.studio
Debian 9.0 or newer is required.
Please note that OBS Studio is not fully working on Chrome OS and features like Screen and Window Capture do not work.
Also note that as of 2021-06-13, this package is the outdated 0.0.1 version. It should still work, but won't have all new improvements. Build from source to get the newest version.
-
First, make sure you have everything up-to-date.
sudo apt update
-
FFmpeg is required. If you do not have the FFmpeg installed (if you're not sure, then you probably don't have it), you can get it with the following command (or compile it yourself):
sudo apt install ffmpeg
-
Finally, install OBS Studio.
sudo apt install obs-studio
-
First make sure your repositories are up-to-date. OBS is available on the
multilib
repos if you need the 32-bit build.sudo xbps-install -S
-
Then install OBS Studio. Any missing dependencies will be installed automatically.
- If it refuses to install, try running
sudo xbps-install -Su
to update everything first.
sudo xbps-install obs
- If it refuses to install, try running
-
If you haven't already, install snapd (ignore the Support Overview which is outdated).
-
Install OBS Studio.
sudo snap install obs-studio
Debian-based Linux distributions and FreeBSD can use automatic build scripts supplied by the project, which can handle dependency installation, building and packaging. Additional build directions are available for other distributions below.
Note: as of May 1, 2019, Facebook live now mandates the use of RTMPS. That functionality requires your distro's mbed TLS package, which obs-studio/cmake/Modules/FindMbedTLS.cmake script searches for at compile time.
Note: Do not use the GitHub source .tar as it does not include all the required source files. Always use the appropriate Git tag with the associated submodules.
Automatic Debian builds allow building OBS with minimal input and setup - necessary dependencies are installed automatically, build flags use a sane default and the generated OBS build uses the application's full feature set.
-
Necessary Preconditions for Automatic Debian Builds:
- Debian Bullseye
- Git
-
Clone the repository including submodules:
git clone --recursive https://github.com/obsproject/obs-studio.git
-
To do a fully automated build, open Terminal, switch to the checkout directory then run one of the following commands:
# Download and set up dependencies, then build OBS for local host
# architecture with common feature set
CI/build-linux.sh
# Skip download and setup of dendencies
CI/build-linux.sh --skip-dependency-checks
# Show all available options
CI/build-linux.sh --help
# Use `my_build_dir` prefix as build directory
CI/build-linux.sh --build-dir my_build_dir
Custom Debian 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.
-
Necessary Preconditions for Custom Debian Builds:
- Debian Bullseye
- CMake 3.16 or newer
- Git
- Ninja
- Optional: CCache to improve compilation speeds on consecutive builds
- For browser source and browser panel support, the pre-built CEF framework is needed:
- Chromium Embedded Framework (CEF) x86_64
- Several additional dependencies (see step 2 below)
- Open a Terminal window, create and switch to a directory you want to have OBS checked out
- Clone the repository including submodules:
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.)
- To download and set up most preconditions mentioned above, you can also run the script
CI/linux/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 apt install cmake ninja-build pkg-config clang clang-format build-essential curl ccache
- OBS dependencies (core):
sudo apt install libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev libcurl4-openssl-dev libmbedtls-dev libgl1-mesa-dev libjansson-dev libluajit-5.1-dev python3-dev libx11-dev libxcb-randr0-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev libxcb1-dev libx11-xcb-dev libxcb-xfixes0-dev swig libcmocka-dev libxss-dev libglvnd-dev libgles2-mesa libgles2-mesa-dev libwayland-dev
- OBS dependencies (UI):
sudo apt install qtbase5-dev qtbase5-private-dev libqt5svg5-dev qtwayland5
- Plugin dependencies:
sudo apt install libasound2-dev libfdk-aac-dev libfontconfig-dev libfreetype6-dev libjack-jackd2-dev libpulse-dev libsndio-dev libspeexdsp-dev libudev-dev libv4l-dev libva-dev libvlc-dev libdrm-dev
- Run CMake to generate a build environment
cmake -S . -B <YOUR_BUILD_DIRECTORY> -G Ninja \
-DCEF_ROOT_DIR="~/development/obs-build-dependencies/cef_binary_4638_linux_x86_64" \
-DLINUX_PORTABLE=ON \
-DENABLE_PIPEWIRE=OFF
Optional Settings:
- To enable PipeWire support change
-DENABLE_PIPEWIRE
toON
- To disable browser source support (e.g. for 32-bit builds) set
-DENABLE_BROWSER_SOURCE
toOFF
- To change the build type, pass either
Debug
,Release
,RelWithDebInfo
, orMinSizeRel
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.
- Run
cmake --build <YOUR_BUILD_DIRECTORY>
to build the entire OBS project - Run
cmake --build <YOUR_BUILD_DIRECTORY> -t libobs
to build only libobs or any other valid target - Run
cmake --build <YOUR_BUILD_DIRECTORY> -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:
- Run
cmake --install <YOUR_BUILD_DIRECTORY>
to install OBS to the prefix the project was configured with - Run
cmake --install <YOUR_BUILD_DIRECTORY> --prefix <YOUR_INSTALL_LOCATION>
to install OBS to a custom location
- Run
cmake --package <YOUR_BUILD_DIRECTORY>
- CMake will handle all operations necessary to create a.deb
package archive, including necessary dependencies.
-
Get RPM Fusion at http://rpmfusion.org/Configuration/ (Nux Desktop is an alternative that may include better packages for RHEL/CentOS 7)
-
Get the required packages:
sudo yum install \ cmake \ ffmpeg-devel \ fontconfig-devel \ freetype-devel \ gcc \ gcc-c++ \ gcc-objc \ git \ glib2-devel \ libcurl-devel \ libglvnd-devel \ libv4l-devel \ libX11-devel \ libXcomposite-devel \ libXinerama-devel \ luajit-devel \ make \ mbedtls-devel \ pipewire-devel \ pulseaudio-libs-devel \ python3-devel \ qt5-qtbase-devel \ qt5-qtsvg-devel \ qt5-qtwayland-devel \ qt5-qtx11extras-devel \ speexdsp-devel \ swig \ systemd-devel \ wayland-devel \ x264-devel
- If
speexdsp-devel
is not available, it can be built from source (https://gitlab.xiph.org/xiph/speexdsp)
- If
-
Building and installing OBS:
-
If building with browser source:
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_4280_linux64.tar.bz2 tar -xjf ./cef_binary_4280_linux64.tar.bz2 git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" .. make -j4 sudo make install
-
If building without browser source:
git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=OFF .. make -j4 sudo make install
-
-
By default OBS installs libraries in /usr/local/lib. To make sure that the loader can find them there, create a file /etc/ld.so.conf.d/local.conf with the single line
and then run
sudo ldconfig
sudo dnf install \
cmake \
ffmpeg-devel \
fontconfig-devel \
freetype-devel \
gcc \
gcc-c++ \
gcc-objc \
git \
glib2-devel \
libcurl-devel \
libglvnd-devel \
libv4l-devel \
libX11-devel \
libXcomposite-devel \
libXdamage \
libXinerama-devel \
luajit-devel \
make \
mbedtls-devel \
pipewire-devel \
pulseaudio-libs-devel \
python3-devel \
qt5-qtbase-devel \
qt5-qtbase-private-devel \
qt5-qtsvg-devel \
qt5-qtwayland-devel \
qt5-qtx11extras-devel \
speexdsp-devel \
swig \
systemd-devel \
wayland-devel \
x264-devel
-
Building and installing OBS:
-
If building with browser source:
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_4280_linux64.tar.bz2 tar -xjf ./cef_binary_4280_linux64.tar.bz2 git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" .. make -j$(nproc) sudo make install sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf sudo ldconfig
-
If building without browser source:
git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DBUILD_BROWSER=OFF .. make -j$(nproc) sudo make install sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf sudo ldconfig
-
-
See openSUSE installation instructions (above) for details on adding Packman repository.
-
Install build dependencies:
sudo zypper in cmake \ fontconfig-devel \ freetype2-devel \ gcc \ gcc-c++ \ libcurl-devel \ ffmpeg2-devel \ libjansson-devel \ libpulse-devel \ libspeexdsp-devel \ libqt5-qtbase-devel \ libqt5-qtx11extras-devel \ libudev-devel \ libv4l-devel \ libXcomposite-devel \ libXinerama-devel \ libXrandr-devel \ luajit-devel \ mbedtls \ swig \ python3-devel \ libxss-dev
-
Building and installing OBS:
-
If building with browser source:
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_4280_linux64.tar.bz2 tar -xjf ./cef_binary_4280_linux64.tar.bz2 git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" .. make -j4 sudo make install
-
If building without browser source:
git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_BROWSER=OFF .. make -j4 sudo make install
-
-
Please note that you need to install the build dependencies for your distribution before following this steps. See above.
-
You can build in portable mode on Linux, which installs all the files to an isolated directory.
-
If building with browser source:
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_4280_linux64.tar.bz2 tar -xjf ./cef_binary_4280_linux64.tar.bz2 git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" .. make -j4 && make install
-
If building without browser source:
git clone --recursive https://github.com/obsproject/obs-studio.git cd obs-studio mkdir build && cd build cmake -DUNIX_STRUCTURE=0 -DCMAKE_INSTALL_PREFIX="${HOME}/obs-studio-portable" -DBUILD_BROWSER=OFF .. make -j4 && make install
-
-
After that, you should have a portable install in
~/obs-studio-portable
. Change tobin/64bit
orbin/32bit
and then simply run:./obs
-
Install OBS Studio:
pkg install obs-studio
Automatic FreeBSD builds allow building OBS with minimal input and setup - necessary dependencies are installed automatically, build flags use a sane default and the generated OBS build uses the application's full feature set.
-
Necessary Preconditions for Automatic FreeBSD Builds:
- FreeBSD 13
- Git
- Pkg
-
Clone the repository including submodules:
git clone --recursive https://github.com/obsproject/obs-studio.git
-
To do a fully automated build, open Terminal, switch to the checkout directory then run one of the following commands:
# Download and set up dependencies, then build OBS for local host
# architecture with common feature set
CI/build-freebsd.sh
# Skip download and setup of dendencies
CI/build-freebsd.sh --skip-dependency-checks
# Show all available options
CI/build-freebsd.sh --help
# Use `my_build_dir` prefix as build directory
CI/build-freebsd.sh --build-dir my_build_dir
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.
-
Necessary Preconditions for Custom FreeBSD Builds:
- FreeBSD 13 or newer
- CMake 3.16 or newer
- Git
- Ninja
- Optional: CCache to improve compilation speeds on consecutive builds
- Several additional dependencies (see step 2 below)
- Open a Terminal window, create and switch to a directory you want to have OBS checked out
- Clone the repository including submodules:
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.)
- To download and set up most preconditions mentioned above, you can also run the script
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
- Run CMake to generate a build environment
cmake -S . -B <YOUR_BUILD_DIRECTORY> -G Ninja \
-DLINUX_PORTABLE=ON \
-DENABLE_PIPEWIRE=OFF
Optional Settings:
- To change the build type, pass either
Debug
,Release
,RelWithDebInfo
, orMinSizeRel
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.
- Run
cmake --build <YOUR_BUILD_DIRECTORY>
to build the entire OBS project - Run
cmake --build <YOUR_BUILD_DIRECTORY> -t libobs
to build only libobs or any other valid target - Run
cmake --build <YOUR_BUILD_DIRECTORY> -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:
- Run
cmake --install <YOUR_BUILD_DIRECTORY>
to install OBS to the prefix the project was configured with - Run
cmake --install <YOUR_BUILD_DIRECTORY> --prefix <YOUR_INSTALL_LOCATION>
to install OBS to a custom location
- Run
cmake --package <YOUR_BUILD_DIRECTORY>
- CMake will handle all operations necessary to create a installer package (compressed archive as well as shell script with embedded binary)
-
Install OBS Studio:
pkg install obs-studio