Build on Debian based Linux꞉ OBS In Tree - HoneyHazard/PixelMatchSwitcher GitHub Wiki

About

This will get you building the atomic effects fork of OBS with Pixel Match Switcher included in the source tree. This is the easiest way to build the plugin on Debian 10 or Debian-based OS, such as Ubuntu, Mint, MX, etc.

Get prerequisites (Debian-based)

Main prerequisites

sudo apt-get install \
   build-essential \
   cmake \
   git \
   libmbedtls-dev \
   libasound2-dev \
   libavcodec-dev \
   libavdevice-dev \
   libavfilter-dev \
   libavformat-dev \
   libavutil-dev \
   libcurl4-openssl-dev \
   libfontconfig-dev \
   libfreetype6-dev \
   libgl1-mesa-dev \
   libjack-jackd2-dev \
   libjansson-dev \
   libluajit-5.1-dev \
   libpulse-dev \
   libqt5x11extras5-dev \
   libspeexdsp-dev \
   libswresample-dev \
   libswscale-dev \
   libudev-dev \
   libv4l-dev \
   libvlc-dev \
   libx11-dev \
   libx264-dev \
   libxcb-shm0-dev \
   libxcb-xinerama0-dev \
   libxcomposite-dev \
   libxinerama-dev \
   pkg-config \
   python3-dev \
   qtbase5-dev \
   libqt5svg5-dev \
   swig \
   libxcb-randr0-dev \
   libxcb-xfixes0-dev \
   libx11-xcb-dev \
   libxcb1-dev

FDK AAC

If you want FDK AAC, add non-free sources using instructions in this article, and then do:

sudo apt update
sudo apt install apt install libfdk-aac-dev`

checkinstall

checkinstall will provide a method for building a .deb installation package.

To install checkinstall, follow this article to add the backports repo and then:

sudo apt update
sudo apt install checkinstall

Obtain source

First, get a clone of the obs-studio-pixel-match-switcher repository (which is forked from the atomic effects fork and includes the Pixel Match Switcher plugin as a git submodule).

cd ~
git clone [email protected]:PixelMatchSwitcher/obs-studio-pixel-match-switcher.git

Initialize git submodules:

cd obs-studio-pixel-match-switcher
git submodule update --init --recursive

Configure and build

Using command line

mkdir -p ~/builds/obs-studio-pixel-match-switcher
cd ~/builds/obs-studio-pixel-match-switcher
cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ~/obs-studio-pixel-match-switcher
make -j4

Using Qt creator

Make sure Qt creator is installed:

sudo apt install qtcreator

Open Qt Creator. Go to File > Open File or Project... and navigate to CMakeLists.txt inside obs-studio-pixel-match-switcher folder.

In the followup Configure Project screen, under Desktop select which configurations to build (Debug, or Release, or both) and select where each configuration will build. (I picked /home/admin/builds/build-obs-studio-pixel-match-switcher-debug)

Click Configure Project.

In Projects > Build > Build Settings change CMAKE_INSTALL_PREFIX to /usr

You are ready to build! Activate the build by right clicking the obs-studio solution to select Build or from the Qt Creator's Build menu.