How to install OBS Studio on Raspberry Pi OS

With the new Raspberry Pi models available, video recording and playback have become possible. The Raspberry Pi 4 can handle this quite well.

One of the most used software for video recording on a PC is OBS Studio and can install it on a Raspberry Pi. Let's find out through the following article!

Install OBS Studio

Hardware

OBS Studio is not optimized for Raspberry Pi, there is no release for Pi and there is no specific development for the ARM architecture.

The compilation process can be very long depending on the Raspberry Pi model.

You should use a Raspberry Pi 4 4GB or 8GB on Vilros to follow this guide.

If you want to try it on the Raspberry Pi 3B +, it might work if you create a swap file.

Here's how to create a swap file (in Terminal or via SSH):

sudo dd if=/dev/zero of=/var/swap2 bs=1024 count=1000000 sudo chmod 600 /var/swap2 sudo mkswap /var/swap2 sudo swapon /var/swap2 sudo swapon

Even with the Raspberry Pi 4, the compilation process will use 100% CPU and most memory. So please be patient if you try on another device.

How to install OBS Studio on Raspberry Pi OS Picture 1

Prerequisites

When the system is ready, you need to install a large list of packages before starting the compilation process.

Copy and paste the following command in Terminal:

sudo apt install build-essential checkinstall cmake git libmbedtls-dev libasound2-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libcurl4-openssl-dev libfontconfig1-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 libx11-xcb1 libx11-xcb-dev libxcb-xinput0 libxcb-xinput-dev libxcb-randr0 libxcb-randr0-dev libxcb-xfixes0 libxcb-xfixes0-dev libx264-dev libxcb-shm0-dev libxcb-xinerama0-dev libxcomposite-dev libxinerama-dev pkg-config python3-dev qtbase5-dev libqt5svg5-dev swig

FFmpeg AAC

Another prerequisite is the FDK AAC package, but no full version is available on Raspbian.

Therefore, the article will be downloaded from the Debian archive and installed manually

FDK AAC is an FFmpeg encoder for the AAC format, inherited from MP3, commonly used in MP4 streams and required for OBS Studio.

Here's how to install it:

- Download these 2 files:

wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_armhf.deb wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_armhf.deb

- Install them with:

sudo dpkg -i libfdk-aac2_2.0.1-1_armhf.deb sudo dpkg -i libfdk-aac-dev_2.0.1-1_armhf.deb

You are now ready to download and compile the source code

Building the source code

The article will download the source code from the GitHub project.

Follow these steps to download and install everything:

- Download source code with git:

sudo git clone --recursive https://github.com/obsproject/obs-studio.git

You can move to a specific directory if you want (like / opt ). The article has done this in the Downloads folder .

- Move to a new folder:

cd obs-studio

- Create a folder and move to this folder:

sudo mkdir build cd build

- Run cmake:

sudo cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr .

- And finally, start the compilation process:

sudo make -j4

Compile time depends on your hardware, from minutes to an hour.

And here is the final step to install OBS Studio:

sudo make install

OBS is now ready for use

First run

Once installed, you can launch it from the main menu: Sound & Video> OBS Studio.

On first run, the automatic configuration wizard is available to set default settings.

Answer a few questions (you can keep the default values) and OBS will run an experiment to configure everything. Click Apply settings to confirm .

Debugging on Raspberry Pi 4

On Raspberry Pi 4, you cannot run OBS directly.

The author of the article encountered this error:

Failed to initialize video. Your GPU may not be supported, or your graphic drivers may need to be updated.

(Cannot initialize video. The GPU may not be supported or the graphics driver needs updating.)

The only thing that works with the example is setting this variable before starting OBS:

- Open a Terminal.

- Run this command:

MESA_GL_VERSION_OVERRIDE=3.3 obs

Everything will work as expected. You can now run the automatic configuration wizard as explained in the previous step.

4.1 ★ | 25 Vote

May be interested

  • Learn about Microsoft Operations Studio from MicrosoftLearn about Microsoft Operations Studio from Microsoft
    sql operations studio is a free tool that runs on windows, macos and linux, to manage sql server, sql azure database and sql azure data warehouse or wherever they run.
  • How to install NordVPN on Raspberry PiHow to install NordVPN on Raspberry Pi
    you've always wanted to get the most out of your raspberry pi and in today's article, we will share tips on how to easily configure openvpn encryption on your device.
  • How to install LibreELEC on Raspberry Pi 4How to install LibreELEC on Raspberry Pi 4
    the raspberry pi 4 is the most powerful piece of hardware to come from the pi platform. it has usb 3.0, more ram and faster cpu. for this reason, the pi 4 is perfect for a linux-based media player operating system like libreelec.
  • How to install Mathematica on Raspberry PiHow to install Mathematica on Raspberry Pi
    mathematica is an extremely powerful computational tool for processing data and math related things. in this tutorial, tipsmake.com will show you the easy steps to install mathematica onto your raspberry pi.
  • 10 great projects combining Raspberry Pi and Windows 10 IoT Core10 great projects combining Raspberry Pi and Windows 10 IoT Core
    windows 10 iot core does not receive much recognition, especially when used with raspberry pi. that doesn't mean there aren't many interesting projects between raspberry pi and windows 10 iot core.
  • How to install Asterisk on Raspberry PiHow to install Asterisk on Raspberry Pi
    asterisk is a free, open source pbx that automatically manages your calls (perfect for a small business). in this tutorial, tipsmake.com will show you how to install asterisk on a raspberry pi.
  • Instructions on 2 ways to install MongoDB on Raspberry PiInstructions on 2 ways to install MongoDB on Raspberry Pi
    in this tutorial, tipsmake will guide you through the process of installing and setting up the mongodb server software on your raspberry pi.
  • How to install FydeOS on a Raspberry PiHow to install FydeOS on a Raspberry Pi
    fydeos is a cloud-based operating system aimed at the chinese market. in today's article, readers will learn how to install fydeos on a raspberry pi and have a quick experience of this operating system.
  • How to install Windows 10 IoT Core on Raspberry Pi 4How to install Windows 10 IoT Core on Raspberry Pi 4
    with the recent release of the raspberry pi 4, people are once again flocking to single computers. the raspberry pi 4 is as small as ever, but potentially more powerful than before.
  • How to install NOOBS on Raspberry PiHow to install NOOBS on Raspberry Pi
    noobs is perfect for pi beginners. it allows you to choose your preferred operating system and install it instantly. but how to download noobs? here's a complete guide on how to install noobs on a raspberry pi.