Question / Help OBS Raspberry Pi Build Instructions

Tuna

Member
There is a GStreamer plugin available you may want to look at if interested. It exposes some special encoders. It is completely untested on Pi. So chances that is works out of the box may be slim. It has been tested with Nvidia Jetson though. So it may only require small changes/tweaks/fix to make it run on Pi.
 
Last edited:

Ammocalypse

New Member
Hi,

New to Raspberry Pi here, I am getting stuck at the make -j4 command in the termnial. This never completes to 100%

[ 67%] Built target obspython_swig_compilation
[ 67%] Built target glad
[ 67%] Built target media-playback
[ 67%] Built target caption
[ 67%] Built target obslua_swig_compilation
[ 67%] Built target libobs
[ 67%] Built target file-updater
[ 67%] Built target obs-frontend-api
[ 67%] Built target libobs-opengl
[ 67%] Built target linux-capture
[ 67%] Built target linux-pulseaudio
[ 67%] Built target linux-jack
[ 67%] Built target linux-alsa
[ 67%] Built target linux-v4l2
[ 67%] Built target sndio
[ 67%] Built target vlc-video
[ 67%] Automatic MOC for target obs-vst
[ 67%] Built target linux-decklink
[ 67%] Built target obs-vst_autogen
[ 67%] Built target image-source
[ 67%] Built target obs-x264-util
[ 67%] Built target obs-libfdk
[ 67%] Linking C executable obs-ffmpeg-mux
[ 67%] Built target obs-ffmpeg
/usr/bin/ld: cannot open output file obs-ffmpeg-mux: Permission denied
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/obs-ffmpeg/ffmpeg-mux/CMakeFiles/obs-ffmpeg-mux.dir/build.make:88: plugins/obs-ffmpeg/ffmpeg-mux/obs-ffmpeg-mux] Error 1
make[1]: *** [CMakeFiles/Makefile2:1643: plugins/obs-ffmpeg/ffmpeg-mux/CMakeFiles/obs-ffmpeg-mux.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 67%] Built target obs-outputs
[ 67%] Built target obs-filters
[ 67%] Built target obs-transitions
make: *** [Makefile:152: all] Error 2
pi@raspberrypi:~/obs-studio/build $

I am not sure where to go from here any assistance would be greatly appreciated.
 

xbelanch

New Member
Hi,

New to Raspberry Pi here, I am getting stuck at the make -j4 command in the termnial. This never completes to 100%

[ 67%] Built target obspython_swig_compilation
[ 67%] Built target glad
[ 67%] Built target media-playback
[ 67%] Built target caption
[ 67%] Built target obslua_swig_compilation
[ 67%] Built target libobs
[ 67%] Built target file-updater
[ 67%] Built target obs-frontend-api
[ 67%] Built target libobs-opengl
[ 67%] Built target linux-capture
[ 67%] Built target linux-pulseaudio
[ 67%] Built target linux-jack
[ 67%] Built target linux-alsa
[ 67%] Built target linux-v4l2
[ 67%] Built target sndio
[ 67%] Built target vlc-video
[ 67%] Automatic MOC for target obs-vst
[ 67%] Built target linux-decklink
[ 67%] Built target obs-vst_autogen
[ 67%] Built target image-source
[ 67%] Built target obs-x264-util
[ 67%] Built target obs-libfdk
[ 67%] Linking C executable obs-ffmpeg-mux
[ 67%] Built target obs-ffmpeg
/usr/bin/ld: cannot open output file obs-ffmpeg-mux: Permission denied
collect2: error: ld returned 1 exit status
make[2]: *** [plugins/obs-ffmpeg/ffmpeg-mux/CMakeFiles/obs-ffmpeg-mux.dir/build.make:88: plugins/obs-ffmpeg/ffmpeg-mux/obs-ffmpeg-mux] Error 1
make[1]: *** [CMakeFiles/Makefile2:1643: plugins/obs-ffmpeg/ffmpeg-mux/CMakeFiles/obs-ffmpeg-mux.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 67%] Built target obs-outputs
[ 67%] Built target obs-filters
[ 67%] Built target obs-transitions
make: *** [Makefile:152: all] Error 2
pi@raspberrypi:~/obs-studio/build $

I am not sure where to go from here any assistance would be greatly appreciated.
Have you tried to build it with that script? https://github.com/xbelanch/OBS4Pi
 

Audric_San

New Member
Hey, I jusy instal Obs but i cant launch it :(
ihave this Error windows

I specify that I have a raspberry Pi 4 Model B
 

Attachments

  • AnyDesk_FOwmR8evXZ.png
    AnyDesk_FOwmR8evXZ.png
    479.1 KB · Views: 212

Tuna

Member
According to my knowledge the Pi does not support any OpenGL profile. It only supports OpenGL ES profiles (that is a fundamental difference). So there is no OBS version that does OpenGL ES.

So unless one of these things change:
1. OBS ported to run on OpenGL ES contexts
2. The Pi gets an OpenGL (on top of OpenGL ES) driver

The Pi is not a good OBS platform atm - despite its popularity.

I'm not deep into the Pi ecosystem, so there may be patches or development work around these things, but I cannot tell. But from my knowledge out of the box only software fallback will work, with great performance penalty.
 

twevel

New Member
Thanks for the script!
I was able to get it built on the RPI 4 with 8GB. I was also able to get it set up with NOALBS, but I couldn't get good performance out of the PI.
Downscaled to 480p 30fps, I got encoder overloaded errors and it streamed at 3-5fps :(.
Maybe in the future!
 

Jsimopoulos

New Member
Hey, I jusy instal Obs but i cant launch it :(
ihave this Error windows

I specify that I have a raspberry Pi 4 Model B
Hello Audric_San! To fix this error write in a terminal this code : MESA_GL_VERSION_OVERRIDE=3.3 obs
and make sure you DONT close the terminal until you don't need Open Broadcaster Software Studio. Thanks in Advance. John Simopoulos
 

Filip S

Member
I compiled FFMpeg on RPI4 with Rasbian and SRT and hardware OMX included - this can stream fullhd 1920x1080p 25 frames with srt to my OBS and elgato camlink

https://www.undergroundnews.dk/inde...mpeg-with-srt-on-raspbian-gnu-linux-10-buster so it should be possible to do with rpi I do have installed a desktop with vnc acces and webmin.

I have not tried with the new kernal - or with ubuntu for arm and ffmpeg is using -c:v h264_omx I am not sure if hevec h265 is possible but I maybe try with a new raspbian and obs on the rpi4 later.

Skærmbillede fra 2021-02-04 12-02-50.png
 

Filip S

Member
@Promod90 I guess you are using an old version of Raspbian (current download is 13.02.2020). Please upgrade your Raspbian to the latest version, reboot and try again.

Bash:
sudo apt update
sudo apt dist-upgrade -y

Afterwards reboot and try again.


Brandnew install and used pikiss script that also have OBS compilation with NDI etc. it compiles nice but I get the same problem obs is missing - and sure it does not show up the script to run the OBS.

Some small mistake... don't know where ;)
 

jhamilt0n

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


So, I've followed your instructions and my errors start here where you can see below. Any thoughts on how to fix this?

cmake -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX="$PREFIX" ..
-- OBS_VERSION: 26.1.2-200-g848395f32-modified
-- No Native SSE2 SIMD Support - Using SIMDE
-- Found FFmpeg: /usr/local/lib/../lib/libavcodec.a (found version "58.91.100") found components: avcodec avdevice avutil avformat
-- Scripting: Luajit supported
-- Scripting: Python 3 supported
-- Using system Jansson library
-- XCB[XCB]: Found component XCB
-- Found XCB: /usr/lib/arm-linux-gnueabihf/libxcb.so found components: XCB
-- Found Wayland: /usr/lib/arm-linux-gnueabihf/libwayland-client.so;/usr/lib/arm-linux-gnueabihf/libwayland-server.so;/usr/lib/arm-linux-gnueabihf/libwayland-egl.so;/usr/lib/arm-linux-gnueabihf/libwayland-cursor.so
-- Found FFmpeg: /usr/local/lib/../lib/libavformat.a (found version "58.45.100") found components: avformat avutil swscale swresample avcodec
-- XCB[XINPUT]: Found component XINPUT
-- Found XCB: /usr/lib/arm-linux-gnueabihf/libxcb-xinput.so found components: XINPUT
-- XCB[XCB]: Found component XCB
-- XCB[RANDR]: Found component RANDR
-- XCB[RENDER]: Found component RENDER
-- XCB[SHAPE]: Found component SHAPE
-- XCB[SHM]: Found component SHM
-- XCB[XFIXES]: Found component XFIXES
-- XCB[XINPUT]: Found component XINPUT
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB: /usr/lib/arm-linux-gnueabihf/libxcb-xinput.so;/usr/lib/arm-linux-gnueabihf/libxcb.so;/usr/lib/arm-linux-gnueabihf/libxcb-randr.so;/usr/lib/arm-linux-gnueabihf/libxcb-render.so;/usr/lib/arm-linux-gnueabihf/libxcb-shape.so;/usr/lib/arm-linux-gnueabihf/libxcb-shm.so;/usr/lib/arm-linux-gnueabihf/libxcb-xfixes.so;/usr/lib/arm-linux-gnueabihf/libxcb-xinput.so;/usr/lib/arm-linux-gnueabihf/libxcb-xinerama.so
-- Found PulseAudio - Audio Monitor enabled
-- Using libavcodec for image loading in libobs
-- Found Wayland: /usr/lib/arm-linux-gnueabihf/libwayland-client.so;/usr/lib/arm-linux-gnueabihf/libwayland-server.so;/usr/lib/arm-linux-gnueabihf/libwayland-egl.so;/usr/lib/arm-linux-gnueabihf/libwayland-cursor.so found components: Client
-- XCB[XCB]: Found component XCB
-- XCB[RANDR]: Found component RANDR
-- XCB[SHM]: Found component SHM
-- XCB[XFIXES]: Found component XFIXES
-- XCB[XINERAMA]: Found component XINERAMA
-- Found XCB: /usr/lib/arm-linux-gnueabihf/libxcb.so;/usr/lib/arm-linux-gnueabihf/libxcb-randr.so;/usr/lib/arm-linux-gnueabihf/libxcb-shm.so;/usr/lib/arm-linux-gnueabihf/libxcb-xfixes.so;/usr/lib/arm-linux-gnueabihf/libxcb-xinerama.so found components: XCB RANDR SHM XFIXES XINERAMA
-- Found jack: /usr/lib/arm-linux-gnueabihf/libjack.so
-- Using the bundled VST header.
-- Found FFmpeg: /usr/local/lib/../lib/libavcodec.a (found version "58.91.100") found components: avcodec avfilter avdevice avutil swscale avformat swresample
-- Found FFmpeg: /usr/local/lib/../lib/libavcodec.a (found version "58.91.100") found components: avcodec avutil avformat
-- Checking for module 'libftl'
-- No package 'libftl' found
-- Found ftl-sdk: ftl outputs enabled
-- Configuring done
CMake Error at UI/CMakeLists.txt:378 (add_executable):
Target "obs" links to target "Qt5::GuiPrivate" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?


CMake Error at UI/CMakeLists.txt:378 (add_executable):
Target "obs" links to target "Qt5::GuiPrivate" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?


-- Generating done
-- Build files have been written to: /home/pi/obs-build/obs-studio/build
 

Tuna

Member
Install "qtbase5-private-dev" and "libwayland-dev" if you want to build current development branch.
 

Gadus_Morhua

New Member
This thread is getting rather long. It seems to be quite possible to install OBS on RPI 4 but without hardware assist from the graphic module. With software fallback, this means great performance penalty, as Tuna has pointed out. I am working at using RPI to stream badminton matches to Youtube directly, but adding realtime overlay of the url of the current score, using livepoints.net. I am hoping to do this all on the RPI, instead to having to use dedicated laptop for each court with OBS to do the overlay and streaming to Youtube.
So my question is, like many of you is asking: Is it probable that in the near future it will be possible to achieve this at a decent fps from RPI 4? Is someone working on this possibly, that has the needful skills?
 

bholland

New Member
I agree with Gadus. To get hardware acceleration within ffmpeg should not actually be hard to do. I don't quite understand the details of why obs is not using hw acceleration when I specify a module that is specifically designed for hw acceleration but it isn't. That is one huge shortcoming.

In addition GLES support would be required within obs. I am not an expert on opengl but my guess is that would be a ton of work. I am actually sort of happy working on that with someone. I spent 15 years in python and getting back to c would be quite fun.

Lastly, this might be my pi4 but the h264_omx does not work with my capture card. The h264_v4l2m2m works flawlessly with the updated ffmpeg.
 
Top