Raspberry Pi 4 - OBS Studio

Raspberry Pi 4: Chronicling the Desktop Experience – OBS Studio – Week 20

Last Updated on August 20, 2020

Installation

The process involves quite a few steps.

There’s a lot of dependencies that need to be satisfied. Fortunately, most of the dependencies are present in the Raspbian repositories; some (or all) may already be present on your system. I also need to download and install packages for libfdk-aac1 and libfdk-aac which are Fraunhofer FDK AAC Codec Libraries.

Next, clone the project’s GitHub repository, compile the source code, and install the program. Here’s the specific commands:

$ sudo apt-get --allow-releaseinfo-change update
$ sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
$ sudo apt-get -y 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
$ sudo wget https://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
$ sudo wget https://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
$ sudo dpkg -i libfdk-aac1_0.1.4-2+b1_armhf.deb
$ sudo dpkg -i libfdk-aac-dev_0.1.4-2+b1_armhf.deb
$ sudo git clone --recursive https://github.com/obsproject/obs-studio.git
$ cd obs-studio
$ sudo mkdir build && cd build
$ sudo cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
$ sudo make -j4
$ sudo make install

I don’t take the credit for these steps. The process was detailed by TheMindVirus published on the obsproject forum.

Compiling the source code took 8 minutes 50 seconds (using all 4 cores of the RPI4). Make sure you use the argument -j4 with make, else the compile time will take a lot longer.

If you start obs from the newly-created menu entry or from the command-line, you get the following error.

Raspberry Pi 4 - OBS - Error

Instead, launch the program with the command:

$ MESA_GL_VERSION_OVERRIDE=3.3 obs

OBS Studio has a very useful auto-configuration wizard which starts when you load the program for the first time. This wizard automatically tests the system and seeks to find settings that your machine can handle. This includes streaming or recording, resolution, bitrate, encoder, streaming provider and more.

Here’s what the wizard determines for the RPI4.

Raspberry Pi 4 - OBS Studio - Auto Configuration

As you can see, the wizard doesn’t recommend recording at 1080p. Instead, it recommends an output resolution of 853×480.

Next page: Page 3 – In Operation

Pages in this article:
Page 1 – Introduction
Page 2 – Installation
Page 3 – In Operation
Page 4 – Summary


Read all my blog posts about the RPI4.

Raspberry Pi 4 Blog
Week 36Manage your personal collections on the RPI4
Week 35Survey of terminal emulators
Week 34Search the desktop with the latest version of Recoll
Week 33Personal Information Managers on the RPI4
Week 32Keep a diary with the RPI4
Week 31Process complex mathematical functions, plot 2D and 3D graphs with calculators
Week 30Internet radio on this tiny computer. A detailed survey of open source software
Week 29Professionally manage your photo collection with digiKam
Week 28Typeset beautifully with LyX
Week 27Software that teaches young people how to learn basic computing skills and beyond
Week 26Firefox revisited - Raspbian now offers a real alternative to Chromium
Week 25Turn the Raspberry Pi 4 into a low power writing machine
Week 24Keep the kids learning and having fun
Week 23Lots of choices to view images
Week 22Listening to podcasts on the RPI4
Week 21File management on the RPI4
Week 20Open Broadcaster Software (OBS Studio) on the RPI4
Week 19Keep up-to-date with these news aggregators
Week 18Web Browsers Again: Firefox
Week 17Retro gaming on the RPI4
Week 16Screen capturing with the RPI4
Week 15Emulate the Amiga, ZX Spectrum, and the Atari ST on the RPI4
Week 14Choose the right model of the RPI4 for your desktop needs
Week 13Using the RPI4 as a screencaster
Week 12Have fun reading comics on the RPI4 with YACReader, MComix, and more
Week 11Turn the RPI4 into a complete home theater
Week 10Watching locally stored video with VLC, OMXPlayer, and others
Week 9PDF viewing on the RPI4
Week 8Access the RPI4 remotely running GUI apps
Week 7e-book tools are put under the microscope
Week 6The office suite is the archetypal business software. LibreOffice is tested
Week 5Managing your email box with the RPI4
Week 4Web surfing on the RPI4 looking at Chromium, Vivaldi, Firefox, and Midori
Week 3Video streaming with Chromium & omxplayerGUI as well as streamlink
Week 2A survey of open source music players on the RPI4 including Tauon Music Box
Week 1An introduction to the world of the RPI4 looking at musikcube and PiPackages

This blog is written on the RPI4.

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

6 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Terry Boulder
Terry Boulder
4 years ago

I’m really enjoying this series. It seems that OBS Studio is out of RPI4’s capabilities. At least until the GPU is used.

I’d like to see coverage of productivity apps on the RPI4 – things like Evernote clients covered. Any plans?

atelierelealbe
atelierelealbe
4 years ago

Looks like obs is using software encoder although rpi4 can do fullhd HARDWARE encoding. Too bad.

Trent Calder
Trent Calder
4 years ago
Reply to  atelierelealbe

You’re just repeating what Luke says in his Summary — “The RPI4 has a VideoCore VI GPU, but this isn’t being used by OBS Studio. Direct encoder support would offer much better performance.”

John Sawyer
John Sawyer
4 years ago
Reply to  Trent Calder

Some things are worth repeating

Robnoordt
Robnoordt
2 years ago

Problems installing OBS-studio on pi4
CMake Error at /usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Wayland (missing: WAYLAND_LIBRARIES WAYLAND_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindWayland.cmake:76 (find_package_handle_standard_args)
libobs-opengl/CMakeLists.txt:55 (find_package)

— Configuring incomplete, errors occurred!
See also “/home/pi/Downloads/obs-studio/build/CMakeFiles/CMakeOutput.log”.
root@raspberrypi:/home/pi/Downloads/obs-studio/build# make -j4
make: *** No targets specified and no makefile found. Stop.
root@raspberrypi:/home/pi/Downloads/obs-studio/build#
root@raspberrypi:/home/pi/Downloads/obs-studio/build#