Question / Help OBS Raspberry Pi Build Instructions

fitipe

New Member
( I've already tried sudo apt-get install build-essential and purging it and installing it again. the same error persists )
 

warnall

New Member
Hi

I am new to the raspberry pi and installing things on it. I have followed the instructions & also the youtube video on this & i am getting an error message and the installation fails. i was wondering if anything was obvious that i am doing wrong
make: *** [Makefile:152: all] Error 2
[ 1%] Built target glad
[ 2%] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o
In file included from /home/pi/obs-studio/libobs/graphics/../util/simde/mmx.h:30,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse.h:33,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse2.h:35,
from /home/pi/obs-studio/libobs/graphics/../util/sse-intrin.h:22,
from /home/pi/obs-studio/libobs/graphics/vec4.h:22,
from /home/pi/obs-studio/libobs/graphics/vec3.h:21,
from /home/pi/obs-studio/libobs/obs.h:26,
from /home/pi/obs-studio/deps/media-playback/media-playback/media.h:19,
from /home/pi/obs-studio/deps/media-playback/media-playback/decode.c:18:
/home/pi/obs-studio/libobs/graphics/../util/simde/simde-common.h:643:10: fatal error: simde-math.h: No such file or directory
#include "simde-math.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [deps/media-playback/CMakeFiles/media-playback.dir/build.make:63: deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:215: deps/media-playback/CMakeFiles/media-playback.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
./obs.sh: line 18: obs: command not found

I hope someone can help
 

warnall

New Member
My script states this

Scanning dependencies of target media-playback
Scanning dependencies of target obspython_swig_compilation
Scanning dependencies of target glad
Scanning dependencies of target libobs
[ 0%] Swig compile obspython.i for python
[ 0%] Building C object deps/glad/CMakeFiles/glad.dir/src/glad.c.o
[ 1%] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o
In file included from /home/pi/obs-studio/libobs/graphics/../util/simde/mmx.h:30,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse.h:33,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse2.h:35,
from /home/pi/obs-studio/libobs/graphics/../util/sse-intrin.h:22,
from /home/pi/obs-studio/libobs/graphics/vec4.h:22,
from /home/pi/obs-studio/libobs/graphics/vec3.h:21,
from /home/pi/obs-studio/libobs/obs.h:26,
from /home/pi/obs-studio/deps/media-playback/media-playback/media.h:19,
from /home/pi/obs-studio/deps/media-playback/media-playback/decode.c:18:
/home/pi/obs-studio/libobs/graphics/../util/simde/simde-common.h:643:10: fatal error: simde-math.h: No such file or directory
#include "simde-math.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [deps/media-playback/CMakeFiles/media-playback.dir/build.make:63: deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:215: deps/media-playback/CMakeFiles/media-playback.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 1%] Building C object libobs/CMakeFiles/libobs.dir/callback/calldata.c.o
[ 1%] Building C object deps/glad/CMakeFiles/glad.dir/src/glad_glx.c.o
[ 1%] Building C object libobs/CMakeFiles/libobs.dir/callback/decl.c.o
[ 2%] Building C object libobs/CMakeFiles/libobs.dir/callback/signal.c.o
[ 2%] Building C object libobs/CMakeFiles/libobs.dir/callback/proc.c.o
[ 2%] Building C object libobs/CMakeFiles/libobs.dir/graphics/graphics-ffmpeg.c.o
/home/pi/obs-studio/libobs/graphics/graphics-ffmpeg.c: In function ‘ffmpeg_image_open_decoder_context’:
/home/pi/obs-studio/libobs/graphics/graphics-ffmpeg.c:34:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
info->decoder_ctx = info->stream->codec;
^~~~
In file included from /home/pi/obs-studio/libobs/graphics/graphics-ffmpeg.c:4:
/usr/include/arm-linux-gnueabihf/libavformat/avformat.h:878:21: note: declared here
AVCodecContext *codec;
^~~~~
[ 2%] Building C object libobs/CMakeFiles/libobs.dir/graphics/quat.c.o
In file included from /home/pi/obs-studio/libobs/graphics/../util/simde/mmx.h:30,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse.h:33,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse2.h:35,
from /home/pi/obs-studio/libobs/graphics/../util/sse-intrin.h:22,
from /home/pi/obs-studio/libobs/graphics/vec4.h:22,
from /home/pi/obs-studio/libobs/graphics/vec3.h:21,
from /home/pi/obs-studio/libobs/graphics/quat.h:22,
from /home/pi/obs-studio/libobs/graphics/quat.c:18:
/home/pi/obs-studio/libobs/graphics/../util/simde/simde-common.h:643:10: fatal error: simde-math.h: No such file or directory
#include "simde-math.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [libobs/CMakeFiles/libobs.dir/build.make:128: libobs/CMakeFiles/libobs.dir/graphics/quat.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 3%] Building C object libobs/CMakeFiles/libobs.dir/graphics/effect-parser.c.o
[ 4%] Linking C shared library libobsglad.so
[ 4%] Built target glad
make[1]: *** [CMakeFiles/Makefile2:624: libobs/CMakeFiles/libobs.dir/all] Error 2
[ 4%] Built target obspython_swig_compilation
make: *** [Makefile:152: all] Error 2
[ 1%] Built target glad
[ 2%] Building C object deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o
In file included from /home/pi/obs-studio/libobs/graphics/../util/simde/mmx.h:30,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse.h:33,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse2.h:35,
from /home/pi/obs-studio/libobs/graphics/../util/sse-intrin.h:22,
from /home/pi/obs-studio/libobs/graphics/vec4.h:22,
from /home/pi/obs-studio/libobs/graphics/vec3.h:21,
from /home/pi/obs-studio/libobs/obs.h:26,
from /home/pi/obs-studio/deps/media-playback/media-playback/media.h:19,
from /home/pi/obs-studio/deps/media-playback/media-playback/decode.c:18:
/home/pi/obs-studio/libobs/graphics/../util/simde/simde-common.h:643:10: fatal error: simde-math.h: No such file or directory
#include "simde-math.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [deps/media-playback/CMakeFiles/media-playback.dir/build.make:63: deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:215: deps/media-playback/CMakeFiles/media-playback.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
./obs.sh: line 18: obs: command not found
 

strykercain

New Member
Ive tried a dozen times and continue to get this set of errors (one posted but many pop up)
Brand new(ish) Pi4 running Raspian. Nothing special added or modified.

In file included from /home/pi/obs-studio/libobs/graphics/../util/simde/mmx.h:30,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse.h:33,
from /home/pi/obs-studio/libobs/graphics/../util/simde/sse2.h:35,
from /home/pi/obs-studio/libobs/graphics/../util/sse-intrin.h:22,
from /home/pi/obs-studio/libobs/graphics/vec4.h:22,
from /home/pi/obs-studio/libobs/graphics/vec3.h:21,
from /home/pi/obs-studio/libobs/obs.h:26,
from /home/pi/obs-studio/deps/media-playback/media-playback/media.h:19,
from /home/pi/obs-studio/deps/media-playback/media-playback/decode.c:18:
/home/pi/obs-studio/libobs/graphics/../util/simde/simde-common.h:643:10: fatal error: simde-math.h: No such file or directory
#include "simde-math.h"
^~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [deps/media-playback/CMakeFiles/media-playback.dir/build.make:63: deps/media-playback/CMakeFiles/media-playback.dir/media-playback/decode.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:215: deps/media-playback/CMakeFiles/media-playback.dir/all] Error 2
 

strykercain

New Member
Hi

I am new to the raspberry pi and installing things on it. I have followed the instructions & also the youtube video on this & i am getting an error message and the installation fails. i was wondering if anything was obvious that i am doing wrong


I hope someone can help
I have similar issue. Any thoughts on a fix?
 

strykercain

New Member
I was able to install OBS by cloning simde from GitHub and then copying simde-math.h from /pi/simde and pasting it into /pi/obs-studio/libobs/util/simde. You can do this right before running sudo make -j4. Now if I could only get OBS to recognize my Auvidea B101 on CS-2 with the Toshiba drivers...
Or add that step to the online instructions or at least a note to this effect.
 

strykercain

New Member
Thx keeshux & jameyj !

So working script will be:

#!/bin/bash
#File: installobs.sh (sudo chmod +x installobs.sh)
#!!! Please run from /home/pi/Downloads (cd /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 l
ibfreetype6-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 p
kg-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
# Fix simde-math.h: No such file or directory
sudo git clone https://github.com/simd-everywhere/simde.git
sudo cp /home/pi/Downloads/simde/simde/simde-math.h /home/pi/Downloads/obs-studio/libobs/util/simde
#
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
With just a little slight modification I was able to get past the error by cloning the git and then while the script was running, as the directory has to be created before the copy. sudo cp ~/simde/simde/simde-math.h ~/obs-studio/libobs/util/simde
 

eltariel

New Member
Thanks for the script, it's saved me from a lot of digging around :D

I'd just like to point out that running literally every command in your script as root (with sudo) is excessive and dangerous. The only things that need to be run with sudo are the things that modify your system - the apt and dpkg commands, and the make install right near the end. Using it for everything else means that you need to be root to modify anything downloaded here, but also opens you up to security bugs etc in the commands, since they all operate on data received from the internet.

I've attached a modified version of the script including the simde-math.h fix with the unneccessary sudo commands removed and with a few small changes to make it work a little more generically (this will use an obs-build directory in the current user's home rather than hardcoding /home/pi/Downloads). The libfdk-aac deps are still a little unsafe though because we're not verifying them before installation like apt would do.

To use it, download the script, rename it to mkobs.sh, then run:
Code:
chmod +x mkobs.sh
./mkobs.sh
 

Attachments

  • mkobs.sh.txt
    2.3 KB · Views: 509

fitipe

New Member
Hi there!

After installing a lot of missing libraries with synaptic, I was able to install it! Thanks a lot for all the contributors :)

Now I'm running into other kind of problem:

My project is to run videos using mpv player and stream them live. It works, but with extreme framerate loss. yes .. I'm trying to stream on 720p and 30fps, so maybe a 4gb rpi4 just can't do the job (?)

I've not made it posible to use hardware acceleration on mpv or hardware encoding on obs. My guessing is that, been able to activate those, the stream would work better.

Do someone knows if it's possible?

Or could give some hints for a softer streaming?

Thanks again!
 

venepe

New Member
I made some changes to the obs source code so that it can be cloned and installed for arm/raspberry pi. Also edited the ndi and websocket plugins so you can install those as well.

Repos:
Script to install obs with the plugins:

Script is inspired from @eltariel
To use it, download the script, rename it to installobs.sh, then run:
Code:
chmod +x installobs.sh
./installobs.sh
 

Attachments

  • installobs.sh.txt
    3.5 KB · Views: 5,907

Gammelstulle

New Member
Hi,

Has someone get this to run on the 64bit version of raspi os? The scrips failed if i tryed. I realy want to use the 64bit version otherwise, the 8 gb ram are bot supported. Also tryed it on Ubuntu, i got obs to run but not Browser Source (realy need it for a webcam)
 

RpiUser

New Member
Thanks for the script, it's saved me from a lot of digging around :D

I'd just like to point out that running literally every command in your script as root (with sudo) is excessive and dangerous. The only things that need to be run with sudo are the things that modify your system - the apt and dpkg commands, and the make install right near the end. Using it for everything else means that you need to be root to modify anything downloaded here, but also opens you up to security bugs etc in the commands, since they all operate on data received from the internet.

I've attached a modified version of the script including the simde-math.h fix with the unneccessary sudo commands removed and with a few small changes to make it work a little more generically (this will use an obs-build directory in the current user's home rather than hardcoding /home/pi/Downloads). The libfdk-aac deps are still a little unsafe though because we're not verifying them before installation like apt would do.

To use it, download the script, rename it to mkobs.sh, then run:
Code:
chmod +x mkobs.sh
./mkobs.sh
Installs and works well in Ubuntu 20.04 mate. Thankyou. Any possibility to force a virtul webcam per instructions "Creating a killer OBS installation on Ubuntu Linux for teaching & streaming into a video conference" by

Kenga Solutions
See youtube presentation https://www.youtube.com/watch?v=kSSrSRO644c
It compiles fine but does not create the required v4l2sink link in tools.
 

Gammelstulle

New Member
Hi,

Has someone get this to run on the 64bit version of raspi os? The scrips failed if i tryed. I realy want to use the 64bit version otherwise, the 8 gb ram are bot supported. Also tryed it on Ubuntu, i got obs to run but not Browser Source (realy need it for a webcam)

Sry for no more details on what point the scrips I tryed failed on raspi-od 64bit. I coming from a long try, compile and error run, ( at least on ubuntu 64bit) I just want to know if I was too stupid and that it worked for someone. On raspi-os 64 I allready getting trouble with the make istall command, teh scrip stoped - because he can't get started with the "install routine". I have already researched the network for this. Apparently cmake was missing. I have installed it, same problem. After this i got obs to run on Ubuntu Mate 64x out of the box but with missing all the goodis ( browser plugin etc... ) If I try the script from @venepe in ubuntu, obs won't start ( some error US_EN Text)

I'll do a more detailed analysis later.
 
Last edited:

regstuff

Member
I made some changes to the obs source code so that it can be cloned and installed for arm/raspberry pi. Also edited the ndi and websocket plugins so you can install those as well.

Repos:
Script to install obs with the plugins:

Script is inspired from @eltariel
To use it, download the script, rename it to installobs.sh, then run:
Code:
chmod +x installobs.sh
./installobs.sh
Thanks. Looking forward to trying this out.
 

Liuzak

New Member
I'm a beginner in raspberry and linux, but I would like to test obs. however I am facing this error.

CMake Warning at CMakeLists.txt:233 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.


-- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY OPENGL_INCLUDE_DIR)
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find FFmpeg (missing: FFMPEG_AVCODEC_LIBRARIES
FFMPEG_AVCODEC_INCLUDE_DIRS avcodec avdevice avutil avformat)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindFFmpeg.cmake:151 (find_package_handle_standard_args)
deps/media-playback/CMakeLists.txt:3 (find_package)


CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
/home/pi/obs-studio/deps/glad/OPENGL_INCLUDE_DIR
used as include directory in directory /home/pi/obs-studio/deps/glad
/home/pi/obs-studio/deps/glad/X11_X11_INCLUDE_PATH
used as include directory in directory /home/pi/obs-studio/deps/glad
OPENGL_gl_LIBRARY (ADVANCED)
linked by target "glad" in directory /home/pi/obs-studio/deps/glad
X11_X11_LIB (ADVANCED)
linked by target "glad" in directory /home/pi/obs-studio/deps/glad

-- Configuring incomplete, errors occurred!
See also "/home/pi/obs-studio/build/CMakeFiles/CMakeOutput.log".
make: *** Nenhum alvo indicado e nenhum arquivo make encontrado. Stop.
make: *** No rule to make target 'install'. Stop.

Can anybody help me?
 

unko

New Member
It's just me or is missing the obs links option. I mean if I remember the adding browser source for your alerts
 

forgottnlink

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!
When running the last command of
obs
It still shows the "Failed to initialize video. Your GPU may not be supported or you graphics driver may need to be updated." prompt. I'm using RPi4.
 

pzamora

New Member
When running the last command of
obs
It still shows the "Failed to initialize video. Your GPU may not be supported or you graphics driver may need to be updated." prompt. I'm using RPi4.
On the Pi 4 you have to use the command

MESA_GL_VERSION_OVERRIDE=3.3 obs
 

pzamora

New Member
So it looks like you need to install cmake. You can do that by using:
Code:
sudo apt-get install cmake
I had to do this as well and I also needed to install the checkinstall command but that required I edit the sources:
Code:
sudo nano  /etc/apt/sources.list
sudo apt-get update
sudo apt-get install checkinstall
Once you do all that you will need to remove all previously created folders by the script, and run them from the beginning once again.
[/QUOTE]
Forgot to add the sources list:
deb http://deb.debian.org/debian stretch main
deb-src http://deb.debian.org/debian stretch main
 

unko

New Member
the people who use raspberry pi how many fps can you make it work for example for me my camera goes kinda slow and i would like it to be better i think i get around 30 fps low quallity
 
Top