Question / Help OBS Raspberry Pi Build Instructions

lblabr

New Member
i just upgraded to bullseye.... compile works, start fails

pi@raspberrypi:~/Downloads/obs-studio/build/UI $ MESA_GL_VERSION_OVERRIDE=3.1 ./obs
Attempted path: share/obs/obs-studio/locale/en-US.ini
Attempted path: /usr/share/obs/obs-studio/locale/en-US.ini
Attempted path: share/obs/obs-studio/themes/Dark.qss
Attempted path: /usr/share/obs/obs-studio/themes/Dark.qss
info: Physical Cores: 4, Logical Cores: 4
info: Physical Memory: 7898MB Total, 4177MB Free
info: Kernel Version: Linux 5.10.63-v7l+
info: Distribution: "Raspbian GNU/Linux" "11"
info: Session Type: x11
info: Window System: X11.0, Vendor: The X.Org Foundation, Version: 1.20.11
info: Qt Version: 5.15.2 (runtime), 5.15.2 (compiled)
info: Portable mode: false
Attempted path: share/obs/obs-studio/themes/Dark/no_sources.svg
Attempted path: /usr/share/obs/obs-studio/themes/Dark/no_sources.svg
QMetaObject::connectSlotsByName: No matching signal for on_tbar_position_valueChanged(int)
QMetaObject::connectSlotsByName: No matching signal for on_actionShowTransitionProperties_triggered()
QMetaObject::connectSlotsByName: No matching signal for on_actionHideTransitionProperties_triggered()
info: OBS 27.2.0-rc1-14-gac8dbf67b (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 48000
speakers: 2
error: Could not load function 'device_enable_framebuffer_srgb' from module 'libobs-opengl.so.0'
error: Could not load function 'device_framebuffer_srgb_enabled' from module 'libobs-opengl.so.0'
error: Could not load function 'device_blend_op' from module 'libobs-opengl.so.0'
error: Could not load function 'device_texture_create_from_dmabuf' from module 'libobs-opengl.so.0'
error: Could not load function 'device_query_dmabuf_capabilities' from module 'libobs-opengl.so.0'
error: Could not load function 'device_query_dmabuf_modifiers_for_format' from module 'libobs-opengl.so.0'
error: Failed to initialize video. Your GPU may not be supported, or your graphics drivers may need to be updated.
qt.qpa.xcb: QXcbConnection: XCB error: 5 (BadAtom), sequence: 916, resource id: 0, major code: 20 (GetProperty), minor code: 0
info: Freeing OBS context data
info: == Profiler Results =============================
info: run_program_init: 5506,56 ms
info: ┣OBSApp::AppInit: 9,504 ms
info: ┃ ┗OBSApp::InitLocale: 4,045 ms
info: ┗OBSApp::OBSInit: 1518,86 ms
info: ┣obs_startup: 74,673 ms
info: ┗OBSBasic::OBSInit: 55,406 ms
info: ┣OBSBasic::InitBasicConfig: 0,456 ms
info: ┣OBSBasic::ResetAudio: 0,549 ms
info: ┗OBSBasic::ResetVideo: 53,898 ms
info: obs_hotkey_thread(25 ms): min=0,298 ms, median=0,399 ms, max=131,676 ms, 99th percentile=109,7 ms, 95,0617% below 25 ms
info: audio_thread(Audio): min=0,085 ms, median=0,112 ms, max=0,713 ms, 99th percentile=0,351 ms
info: =================================================
info: == Profiler Time Between Calls ==================
info: obs_hotkey_thread(25 ms): min=25,423 ms, median=25,546 ms, max=156,842 ms, 26,087% within ±2% of 25 ms (0% lower, 73,913% higher)
info: =================================================
info: Number of memory leaks: 254
pi@raspberrypi:~/Downloads/obs-studio/build/UI $


any idea
tried MESA_GL_VERSION_OVERRIDE=3.1 | MESA_GL_VERSION_OVERRIDE=3.3
 

1030

New Member
Does anybody have a pre-compiled image for a Pi3/4? The mega link posted a few pages back no longer works. I don't intend to stream from the Pi, rather send the video preview monitor output through composite cable (720x576) and control what scenes it's showing through websocket.
 

darenhoff

New Member
I installed PiOS minimal 64 bit
Then update & upgrade
followed steps
but getting error at the command sudo make -j4
it says No target specified and no makefile found, Stop

pi@raspberrypi:~ $ sudo dd if=/dev/zero of=/var/swap2 bs=2048 count=1000000
sudo chmod 600 /var/swap2
sudo mkswap /var/swap2
sudo swapon
1000000+0 records in
1000000+0 records out
2048000000 bytes (2.0 GB, 1.9 GiB) copied, 77.4138 s, 26.5 MB/s
pi@raspberrypi:~ $ sudo chmod 600 /var/swap2
pi@raspberrypi:~ $ sudo mkswap /var/swap2
Setting up swapspace version 1, size = 1.9 GiB (2047995904 bytes)
no label, UUID=f8496c68-5cf4-400d-baba-0ca129d8f126
pi@raspberrypi:~ $ sudo swapon
NAME TYPE SIZE USED PRIO
/var/swap file 2G 0B -2
pi@raspberrypi:~ $ sudo apt-get --allow-releaseinfo-change update
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
Reading package lists... Done
pi@raspberrypi:~ $ sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libfdk-aac-dev : Breaks: libfdk-aac-dev:armhf (!= 2.0.1-1) but 0.1.4-2+b1 is installed
libfdk-aac-dev:armhf : Breaks: libfdk-aac-dev (!= 0.1.4-2+b1) but 2.0.1-1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
pi@raspberrypi:~ $ 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
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9).
checkinstall is already the newest version (1.6.2+git20170426.d24a630-2).
libcurl4-openssl-dev is already the newest version (7.74.0-1.3+deb11u3).
libfontconfig1-dev is already the newest version (2.13.1-4.2).
libfreetype6-dev is already the newest version (2.10.4+dfsg-1+deb11u1).
git is already the newest version (1:2.30.2-1).
libjack-jackd2-dev is already the newest version (1.9.17~dfsg-1).
libjansson-dev is already the newest version (2.13.1-1.1).
libx11-dev is already the newest version (2:1.7.2-1).
libx11-xcb-dev is already the newest version (2:1.7.2-1).
libx11-xcb1 is already the newest version (2:1.7.2-1).
libxcb-randr0 is already the newest version (1.14-3).
libxcb-randr0-dev is already the newest version (1.14-3).
libxcb-shm0-dev is already the newest version (1.14-3).
libxcb-xfixes0 is already the newest version (1.14-3).
libxcb-xfixes0-dev is already the newest version (1.14-3).
libxcb-xinerama0-dev is already the newest version (1.14-3).
libxcb-xinput-dev is already the newest version (1.14-3).
libxcb-xinput0 is already the newest version (1.14-3).
libxcomposite-dev is already the newest version (1:0.4.5-1).
libxinerama-dev is already the newest version (2:1.1.4-2).
libluajit-5.1-dev is already the newest version (2.1.0~beta3+dfsg-5.3).
libmbedtls-dev is already the newest version (2.16.9-0.1).
pkg-config is already the newest version (0.29.2-1).
python3-dev is already the newest version (3.9.2-3).
qtbase5-dev is already the newest version (5.15.2+dfsg-9).
libqt5svg5-dev is already the newest version (5.15.2-3).
libqt5x11extras5-dev is already the newest version (5.15.2-2).
libspeexdsp-dev is already the newest version (1.2~rc1.2-1.1).
swig is already the newest version (4.0.2-1).
libudev-dev is already the newest version (247.3-7+deb11u1).
libv4l-dev is already the newest version (1.20.0-2).
libx264-dev is already the newest version (2:0.160.3011+gitcde9a93-2.1).
cmake is already the newest version (3.18.4-2+rpt1+rpi1+deb11u1).
libasound2-dev is already the newest version (1.2.4-1.1+rpt2).
libavcodec-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libavdevice-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libavfilter-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libavformat-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libavutil-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libgl1-mesa-dev is already the newest version (20.3.5-1+rpt4+rpi1).
libpulse-dev is already the newest version (14.2-2+rpt1).
libswresample-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libswscale-dev is already the newest version (7:4.3.4-0+deb11u1+rpt3).
libvlc-dev is already the newest version (3.0.17.4-0+deb11u1+rpi1+rpt3).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libfdk-aac-dev : Breaks: libfdk-aac-dev:armhf (!= 2.0.1-1) but 0.1.4-2+b1 is to be installed
libfdk-aac-dev:armhf : Breaks: libfdk-aac-dev (!= 0.1.4-2+b1) but 2.0.1-1 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
pi@raspberrypi:~ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libfdk-aac-dev:armhf
The following packages will be upgraded:
libfdk-aac-dev:armhf
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 643 kB of archives.
After this operation, 1,403 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bullseye/non-free armhf libfdk-aac-dev armhf 2.0.1-1 [643 kB]
Fetched 643 kB in 1s (1,166 kB/s)
Reading changelogs... Done
(Reading database ... 51855 files and directories currently installed.)
Preparing to unpack .../libfdk-aac-dev_2.0.1-1_armhf.deb ...
Unpacking libfdk-aac-dev:armhf (2.0.1-1) over (0.1.4-2+b1) ...
dpkg: error processing archive /var/cache/apt/archives/libfdk-aac-dev_2.0.1-1_armhf.deb (--unpack):
trying to overwrite shared '/usr/include/fdk-aac/FDK_audio.h', which is different from other instances of package libfdk-aac-dev:armhf
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/libfdk-aac-dev_2.0.1-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1) <----------------------------------------ERROR -----------------------------
pi@raspberrypi:~ $ sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
--2022-10-11 20:49:11-- http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
Resolving ftp.uk.debian.org (ftp.uk.debian.org)... 78.129.164.123, 2001:1b40:5600:ff80:f8ee::1
Connecting to ftp.uk.debian.org (ftp.uk.debian.org)|78.129.164.123|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 292586 (286K) [application/octet-stream]
Saving to: ‘libfdk-aac1_0.1.4-2+b1_armhf.deb.1’

libfdk-aac1_0.1.4-2 100%[===================>] 285.73K 256KB/s in 1.1s

2022-10-11 20:49:13 (256 KB/s) - ‘libfdk-aac1_0.1.4-2+b1_armhf.deb.1’ saved [292586/292586]

pi@raspberrypi:~ $ sudo wget http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
--2022-10-11 20:49:24-- http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_0.1.4-2+b1_armhf.deb
Resolving ftp.uk.debian.org (ftp.uk.debian.org)... 78.129.164.123, 2001:1b40:5600:ff80:f8ee::1
Connecting to ftp.uk.debian.org (ftp.uk.debian.org)|78.129.164.123|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40348 (39K) [application/octet-stream]
Saving to: ‘libfdk-aac-dev_0.1.4-2+b1_armhf.deb.1’

libfdk-aac-dev_0.1. 100%[===================>] 39.40K --.-KB/s in 0.01s

2022-10-11 20:49:26 (3.68 MB/s) - ‘libfdk-aac-dev_0.1.4-2+b1_armhf.deb.1’ saved [40348/40348]

pi@raspberrypi:~ $ sudo dpkg -i libfdk-aac1_0.1.4-2+b1_armhf.deb
(Reading database ... 51855 files and directories currently installed.)
Preparing to unpack libfdk-aac1_0.1.4-2+b1_armhf.deb ...
Unpacking libfdk-aac1:armhf (0.1.4-2+b1) over (0.1.4-2+b1) ...
Setting up libfdk-aac1:armhf (0.1.4-2+b1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u4) ...
pi@raspberrypi:~ $ sudo dpkg -i libfdk-aac-dev_0.1.4-2+b1_armhf.deb
(Reading database ... 51855 files and directories currently installed.)
Preparing to unpack libfdk-aac-dev_0.1.4-2+b1_armhf.deb ...
Unpacking libfdk-aac-dev:armhf (0.1.4-2+b1) over (0.1.4-2+b1) ...
dpkg: error processing package libfdk-aac-dev:armhf (--install):
package libfdk-aac-dev:armhf 0.1.4-2+b1 cannot be configured because libfdk-aac-dev:arm64 is at a different version (2.0.1-1)
Errors were encountered while processing:
libfdk-aac-dev:armhf
pi@raspberrypi:~ $ sudo git clone --recursive https://github.com/obsproject/obs-studio.git
fatal: destination path 'obs-studio' already exists and is not an empty directory.
pi@raspberrypi:~ $ cd obs-studio
pi@raspberrypi:~/obs-studio $ sudo mkdir build && cd build
mkdir: cannot create directory ‘build’: File exists
pi@raspberrypi:~/obs-studio $ cd build
pi@raspberrypi:~/obs-studio/build $ sudo cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
-- OBS: Application Version: 28.0.1-111-g9b317edb2 - Build Number: 5
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavcodec.so (found version "58.91.100") found components: avcodec avdevice avutil avformat
-- OBS: ENABLED obslua
-- OBS: obs-scripting -> Luajit found.
-- OBS: ENABLED obspython
-- OBS: obs-scripting -> Python 3.9.2 found.
-- OBS: Using system Jansson library.
-- XCB[XCB]: Found component XCB
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so found components: EGL
-- Found Wayland: /usr/lib/aarch64-linux-gnu/libwayland-client.so;/usr/lib/aarch64-linux-gnu/libwayland-server.so;/usr/lib/aarch64-linux-gnu/libwayland-egl.so;/usr/lib/aarch64-linux-gnu/libwayland-cursor.so
-- Found FFmpeg: /usr/lib/aarch64-linux-gnu/libavformat.so (found version "58.45.100") found components: avformat avutil swscale swresample avcodec
-- OBS: -> PulseAudio found - audio monitoring enabled
-- Found Wayland: /usr/lib/aarch64-linux-gnu/libwayland-client.so;/usr/lib/aarch64-linux-gnu/libwayland-server.so;/usr/lib/aarch64-linux-gnu/libwayland-egl.so;/usr/lib/aarch64-linux-gnu/libwayland-cursor.so found components: Client
-- XCB[XCB]: Found component XCB
-- XCB[XFIXES]: Found component XFIXES
-- XCB[RANDR]: Found component RANDR
-- XCB[SHM]: Found component SHM
-- XCB[XINERAMA]: Found component XINERAMA
-- Could NOT find XCB (missing: COMPOSITE)
CMake Error at cmake/Modules/ObsHelpers.cmake:446 (message):
OBS: xcb composite library not found
Call Stack (most recent call first):
plugins/linux-capture/CMakeLists.txt:6 (obs_status)


-- Configuring incomplete, errors occurred! <----------------------------------------NOTE-----------------------------
See also "/home/pi/obs-studio/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/obs-studio/build/CMakeFiles/CMakeError.log".
pi@raspberrypi:~/obs-studio/build $ sudo make -j4
make: *** No targets specified and no makefile found. Stop.
pi@raspberrypi:~/obs-studio/build $ ^C
pi@raspberrypi:~/obs-studio/build $


Please help
 

Nicesoft

New Member
It is possible to build OBS Studio for Linux from source on the Raspberry Pi 3 upwards!

Disclaimer: Please make sure you understand what this code does first,
then you may run it at your own risk. As versions change, problems may arise.
The scripts take a long time, especially on underpowered hardware and slow internet.


The pi has very limited memory, so it is essential to make a swapfile first:
Code:
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

Here is an automated script that downloads, builds and installs OBS on the pi:
Code:
#!/bin/bash
#File: installobs.sh (sudo chmod +x installobs.sh)
#!!! Please run from /home/pi/Downloads (cd /home/pi/Downloads)

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 http://ftp.uk.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac1_0.1.4-2+b1_armhf.deb
sudo wget http://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
obs #only need to run this command from now on

exit 0

Hope you find this useful!
В результате работы кода получил:
....
-- Could NOT find XCB (missing: COMPOSITE)
CMake Error at cmake/Modules/ObsHelpers.cmake:446 (message):
OBS: xcb composite library not found
 

clockwisep

New Member
hello, i know this is an old post, unfortunately the instructions don't work anymore, probably because of the further development of both (obs and PI) unfortunately.
would someone be able to upload a working image of OBS with NDI fpr pi somewhere? that would be great.
thank you.
c.
 
Top