Question / Help OBS Raspberry Pi Build Instructions

Duff8402

New Member
Really appreciate the time and effort you're putting in to this project. I'm a hobbyist back yard blacksmith with some pretty basic tech background. I've been using an old MacBook to do some YouTube live streams for friends and family during this covid crap, and the GPU on the MacBook finally took a complete dump. I've got about 10 Pi3's laying around so thought I'd dig in to this option a bit. Loaded on a Pi3 for proof of concept and was super impressed with the ease of installation. Ordered a Pi4 and seems I'm still not going to be using any USB webcams... so with the biography out of the way, now a question... How is the performance with a PiCam? How bout multiple PiCams?
 

TheMindVirus

New Member
People have got it to work as an IP Camera across USB Ethernet: https://www.tomshardware.com/uk/how-to/use-raspberry-pi-as-pc-webcam
It uses a piece of software called mjpg_streamer to work. A Pi itself could be a Webcam Server and an OBS Studio Server at the same time. However, it would be better if you had a separate Pi as each IP Camera (maybe situated somewhere else) and have them send the video over Wi-Fi to the Pi running OBS Studio. The quality of the stream would depend largely on the quality of the Wi-Fi (or whichever connection you decide to use).
 

Filip S

Member
One reason to recompile ffmpeg on the raspberry is the missing SRT protocol but then again its simular on other linux
 

jag88

New Member
I could use some help getting this running on my pi4 B with the latest version of raspbian. It's fails on initializing opengl, says, failed to initialize video. Your GPU may not be supported or your graphics drivers may need to be updated (I updated all there is to update at this point).
 

Attachments

nmaas87

New Member
I could use some help getting this running on my pi4 B with the latest version of raspbian. It's fails on initializing opengl, says, failed to initialize video. Your GPU may not be supported or your graphics drivers may need to be updated (I updated all there is to update at this point).
You could try to start it with

MESA_GL_VERSION_OVERRIDE=3.3 obs

from the commandline, as @TheMindVirus did comment on :)

or, if you're trying it already with that parameter and it does not work, leave it out.
 

jag88

New Member
You could try to start it with

MESA_GL_VERSION_OVERRIDE=3.3 obs

from the commandline, as @TheMindVirus did comment on :)

or, if you're trying it already with that parameter and it does not work, leave it out.
Ok that worked!! Is there any way I can add that as a startup parameter for an alias/shortcut so I dont have to launch from terminal every time?
 

nmaas87

New Member
Ok that worked!! Is there any way I can add that as a startup parameter for an alias/shortcut so I dont have to launch from terminal every time?
Well, how about just putting it in a shell script onto your desktop and making it executable? Then you could just launch it via doubleclick?

Bash:
echo "#!/bin/bash
MESA_GL_VERSION_OVERRIDE=3.3 obs" > obs_start.sh
chmod +x obs_start.sh
 

Promod90

New Member
hello,

same GPU problem here:

IMG_20200525_172734.jpg



than I take this:

MESA_GL_VERSION_OVERRIDE=3.3 obs

and get this:

IMG_20200525_173206.jpg


its in german and means something like "command not found"



Sorry, its my first day with Rasberry Pi. Please tell me for extreme idiot, what I did wrong or I can do to start OBS
 

nmaas87

New 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.
 

Promod90

New Member
yes, thank you. It works now.

But now a new problem.

I open a link "rtsp://192.168.178.38/ch0_0.h264" from a camrea and try to stream it online.

in 1080p.

The Problem is, the rasberry pi is at CPU usage 98% or more and i have only 2-6 FPS.

So its not a good stream. I know that the rasberry is not a Streaming PC. But 2-6- FPS?

Why? Wrong settings?

My problem is to understand, why we have OBS for rasberry pi when the rasberry cant run it?
 

Tuna

Member
Because you need OpenGL 3.3. If you use the above hack it runs, but it cannot use the GPU hardware. Therefore it runs in software emulation - which is really really slow.
 

kilokahn

New Member
Maybe someone can create an image of OBS on a Pi 4 with 4GB of RAM working. This way all we would have to do is take the image, install on SD card, expand the file system and then plug in whatever camera(s) we want.

My goal is to make a YouTube channel that is an old throwback TV bulletin board complete with music and slides. Nothing fancy. I may grab the slides off a website once a day to update them but the music would be locally playing and OBS would stream it.
 

nmaas87

New Member
Hey @kilokahn - that probably won't be needed. Actually I saw OBS 25.0.3 in the Raspbian Repos, but it seems not to be working. I personally hope that one day we will have normal OBS in the Raspbian / Raspberry OS repo (+H.264 encoder support of the GPU). But this will probably need some time.
 

jlm70

New Member
That would be great: low cost but dedicated machine for OBS... (possibly with green screen working ok)
And now they’ve just released the 8GB RAM Raspberry, that I think might help even more!
 

nmaas87

New Member
But the biggest problem is that it does not support OpenGL 3.3, so it will probably never be really able to do much - I do use it to great success with a PAL capture card [however, its lags at 30ms+] and some LUA code and I did also try it with a Full HD Grabber Card which kinda worked - but I guess it won't do any advanced stuff... (to admit, I tried it with a 500 Euro Magewell Grabber which offloads a lot of the work in its FPGA, but a solution of a 500 Euro card + a RPi ain't gonna be the normal setup, most ppl will tend to use some cheaper Elgato or so).

I really hope they get the H.264 Hardware Encoding working, that would really help to getting the stream out a decent framerates :).
 
Top