jebba
Member
Hello humans,
Below is a mini HOWTO build OBS Studio using Debian stable (version 12/Bookworm) using some latest/greatest versions by adding the Deb Multimedia repo. This includes a newer FFMPEG and other libraries.
First the Deb Multimedia repo needs to be installed (Note: this may include some non-free software, but I don't think so).
Install Deb Multimedia Keyring:
Add a new source for APT:
Add these lines for the new repo:
Then update your system with newer packages from the Deb Multimedia repo:
Perhaps also:
Install the OBS Studio build dependencies, now that the Deb Multimedia repo is available.
If you want to use the browser plugin module, you need to get embedded Chrome. It is built from an ancient binary. Good luck rebuilding it from source. The binary that OBS Studio uses (afaik) is available at the link below. Later in the build you'll need to point at where you untarred the cef binary. For example, as user debian, in their home directory.
Now onto actually getting OBS Studio....
Find the particular branch or tag that you want:
Checkout the branch or tag, such as one of:
A bit heavy, but clean out, and update:
Clear our build directory, if there is one:
The repo is now setup, so configure the build. Change to suit to taste. Also update the update the cef binary path.
If you want to go thru the build options more easily with a menu, ccmake (note extra "c") can do it, just use it instead of cmake, such as:
Then in ccmake, hit "c" twice to get options. Hit "t" for more pages of options. Hit "g" to generate.
Compile it thusly. Nice to have ccache setup as it takes a pretty "long" time to build.
After the compile is done, make Debian packages:
Then install the Debian package, adjusting to the version number built:
Mark the package to be held, so it doesn't get upgraded over by the system package:
Make sure all is happy with APT:
Then just run OBS Studio like normal (the binary gets put in /usr/bin):
Starting with version 30.0.0 (beta3 tested), you will need also do the following before building OBS Studio:
Happy hacking,
-Jeff
Below is a mini HOWTO build OBS Studio using Debian stable (version 12/Bookworm) using some latest/greatest versions by adding the Deb Multimedia repo. This includes a newer FFMPEG and other libraries.
First the Deb Multimedia repo needs to be installed (Note: this may include some non-free software, but I don't think so).
Install Deb Multimedia Keyring:
Bash:
wget https://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
sudo dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
Add a new source for APT:
Bash:
sudo $(EDITOR) /etc/apt/sources.list.d/deb-multimedia.list
Add these lines for the new repo:
Bash:
deb http://www.deb-multimedia.org bookworm main
#deb http://www.deb-multimedia.org bookworm main non-free
deb http://www.deb-multimedia.org bookworm-backports main
Then update your system with newer packages from the Deb Multimedia repo:
Bash:
sudo apt update
sudo apt upgrade
Perhaps also:
Bash:
sudo apt upgrade -t bookworm-backports
Install the OBS Studio build dependencies, now that the Deb Multimedia repo is available.
Bash:
sudo apt install build-essential ccache clang clang-format cmake cmake-curses-gui curl fdkaac fonts-noto \
fonts-roboto git glslang-dev glslang-tools glslc libasio-dev libasound2-dev libavcodec-dev libavdevice-dev \
libavfilter-dev libavformat-dev libavutil-dev libcmocka-dev libcurl4-openssl-dev libdrm-dev libfdk-aac-dev \
libfontconfig-dev libfreetype6-dev libgl1-mesa-dev libgles2-mesa libgles2-mesa-dev libglu1-mesa-dev \
libglvnd-dev libjack-jackd2-dev libjansson-dev libluajit-5.1-dev libmbedtls-dev libpci-dev libpulse-dev \
libqrcodegencpp-dev libqt6svg6-dev librist-dev libshaderc-dev libsndio-dev libspeexdsp-dev \
libsrt-openssl-dev libswresample-dev libswscale-dev libudev-dev libv4l-dev libva-dev libvlc-dev libvpl-dev \
libwayland-dev libwebsocketpp-dev libx11-dev libx11-xcb-dev libx264-dev libxaw7-dev libxcb1-dev \
libxcb-composite0-dev libxcb-icccm4-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shm0-dev \
libxcb-util-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-xinput-dev libxcb-xkb-dev libxcb-xtest0-dev \
libxcomposite-dev libxinerama-dev libxkbcommon-x11-dev libxkbfile-dev libxres-dev libxss-dev libxtst-dev \
libxv-dev ninja-build nlohmann-json3-dev pkg-config python3-dev qt6-base-dev qt6-base-private-dev \
qt6-image-formats-plugins qt6-wayland swig zsh
If you want to use the browser plugin module, you need to get embedded Chrome. It is built from an ancient binary. Good luck rebuilding it from source. The binary that OBS Studio uses (afaik) is available at the link below. Later in the build you'll need to point at where you untarred the cef binary. For example, as user debian, in their home directory.
Bash:
cd
wget https://cdn-fastly.obsproject.com/downloads/cef_binary_5060_linux64.tar.bz2
tar xf cef_binary_5060_linux64.tar.bz2
Now onto actually getting OBS Studio....
Bash:
git clone --recursive https://github.com/obsproject/obs-studio
cd obs-studio
Find the particular branch or tag that you want:
Bash:
git branch -a
git tag -l | sort -V
Checkout the branch or tag, such as one of:
Bash:
git checkout master
git checkout 30.0.0-beta3
git checkout 29.1.3
git checkout 28.1.2
A bit heavy, but clean out, and update:
Bash:
git reset --hard HEAD
git clean -f -f
git pull
git submodule init
git submodule update
Clear our build directory, if there is one:
Bash:
rm -rf build
The repo is now setup, so configure the build. Change to suit to taste. Also update the update the cef binary path.
Bash:
cmake -S . -B build -G Ninja -DENABLE_PIPEWIRE=0 -DENABLE_BROWSER=1 -DLINUX_PORTABLE=0 -DENABLE_DECKLINK=0 \
-DENABLE_JACK=1 -DENABLE_SERVICE_UPDATES=0 -DCEF_ROOT_DIR="/home/debian/cef_binary_5060_linux64" \
-DBUILD_FOR_DISTRIBUTION=1 -DENABLE_ALSA=1 -DENABLE_LIBFDK=1 -DENABLE_PULSEAUDIO=0 \
-DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SNDIO=0 -DENABLE_WEBRTC=1 -DOAUTH_BASE_URL="http://127.0.0.1" \
-DCALM_DEPRECATION=ON -DX11_Xaw_INCLUDE_PATH="/usr/include/X11/Xaw" -DENABLE_AJA=1
If you want to go thru the build options more easily with a menu, ccmake (note extra "c") can do it, just use it instead of cmake, such as:
Bash:
ccmake -S . -B build -G Ninja -DENABLE_PIPEWIRE=0 -DENABLE_BROWSER=1 -DLINUX_PORTABLE=0 -DENABLE_DECKLINK=0 \
-DENABLE_JACK=1 -DENABLE_SERVICE_UPDATES=0 -DCEF_ROOT_DIR="/home/debian/cef_binary_5060_linux64" \
-DBUILD_FOR_DISTRIBUTION=1 -DENABLE_ALSA=1 -DENABLE_LIBFDK=1 -DENABLE_PULSEAUDIO=0 \
-DCMAKE_INSTALL_PREFIX=/usr -DENABLE_SNDIO=0 -DENABLE_WEBRTC=1 -DOAUTH_BASE_URL="http://127.0.0.1" \
-DCALM_DEPRECATION=ON -DX11_Xaw_INCLUDE_PATH="/usr/include/X11/Xaw" -DENABLE_AJA=1
Then in ccmake, hit "c" twice to get options. Hit "t" for more pages of options. Hit "g" to generate.
Compile it thusly. Nice to have ccache setup as it takes a pretty "long" time to build.
Bash:
cmake --build build -j$(nproc)
After the compile is done, make Debian packages:
Bash:
cmake --build build --target package -j$(nproc)
Then install the Debian package, adjusting to the version number built:
Bash:
ls -lh build/*.deb
sudo dpkg -i build/obs-studio-29.1.3-50-Linux.deb
Mark the package to be held, so it doesn't get upgraded over by the system package:
Bash:
sudo apt-mark hold obs-studio
Make sure all is happy with APT:
Bash:
sudo apt -f install
Then just run OBS Studio like normal (the binary gets put in /usr/bin):
Bash:
obs
Starting with version 30.0.0 (beta3 tested), you will need also do the following before building OBS Studio:
Bash:
sudo apt install libssl-dev
git clone --recursive https://github.com/paullouisageneau/libdatachannel
cd libdatachannel/
rm -rf build
cmake -B build -DUSE_GNUTLS=0 -DUSE_NICE=0 -DCMAKE_BUILD_TYPE=Release
cd build/
make -j$(nproc)
sudo make install
Happy hacking,
-Jeff
Last edited: