How to Install OBS Studio on Raspberry Pi OS? (video capture)

1. Download the OBS Studio package for Raspberry Pi OS from the official website.

2. Open a terminal window and navigate to the directory where you downloaded the package.

3. Install the package using the command “sudo dpkg -i obs-studio-rpi_0.0.1-1_armhf.deb”

4. Once the installation is complete, you can launch OBS Studio from the Raspberry Pi OS menu.

5. To configure OBS Studio for video capture, open the Settings window and select the Video tab.

6. Select the desired resolution and frame rate for your video capture.

7. To start recording, click the “Start Recording” button in the main window.

8. To stop recording, click the “Stop Recording” button in the main window.

9. Your recorded video will be saved in the “Videos” folder in the Raspberry Pi OS home directory.

With the new Raspberry Pi models available, video capture and streaming become possible.
Even if we are still far from a professional computer, the Raspberry Pi 4 can handle this pretty well.
One of the most used software for video capture on PC is OBS Studio, and it is possible to install it on Raspberry Pi. Let’s see how.

On Raspberry Pi OS Bullseye, OBS Studio can now be installed directly from the default repository, by using the package manager. On older versions, using Pi-Apps is the easiest alternative.

I will guide you through the installation process, and show you how to use it once installed.
But before that, we will start with a quick overview of OBS Studio.

If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.

Introduction to OBS Studio

What is OBS Studio?

OBS Studio is one of those tools you can use to record a video on your computer.
The good news is that it’s a free and powerful tool to do this.
You can manage multiple sources (like a Camera module or a USB device), and include several of them in a recording.

OBS Studio is also often used for live-streaming, as you can manage everything in real time in a drag and drop preview.

OBS Studio on Raspberry Pi

OBS Studio is available for any operating system.
You can find binaries for Windows and macOS on the home page, and it’s available in the default repositories in most Linux distributions.

If you use the latest Raspberry Pi OS version (Bullseye), then OBS Studio is available in the default repository, and the installation is pretty straightforward.

But if you use Raspberry Pi OS Buster / Legacy, it’s not available. The previous solution I explained in this guide was to compile the application from the source. But it was long, complicated, and the instructions became quickly obsolete with all changes in the source code.

On an old Raspberry Pi OS version, the easiest option is to use Pi-Apps, that will do everything for you. I’ll give you the two methods in this article.

As I use OBS Studio on my computer to record my YouTube and community videos, I was curious to see how it works on Raspberry Pi OS.
For example, I have some issues recording my screen on Raspberry Pi 4, the stream quality I receive on my video capture device is not as good as on Raspberry Pi 3B+ (probably due to the micro HDMI port or at least the adapter).
So, it can be a good alternative to record it directly on the Raspberry Pi.

Hardware prerequisites

OBS Studio is not really optimized for Raspberry Pi, so I strongly recommend a Raspberry Pi 4 4 GB or 8 GB on Amazon to follow this tutorial.

If you want to try on Raspberry Pi 3B+, it could work if you create a swap file (I didn’t have one in my tests on Pi 4).

Here is how to create it (in a terminal or via SSH):
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

Even with a Raspberry Pi 4, the app is pretty heavy and will easily use 100% of your CPU and a big part of the memory. So be patient if you try on another device.

Related: Why Swap Is Used In Linux? (Goal, Requirements and Commands)

Install OBS Studio on Raspberry Pi OS Bullseye

If you are using a recent version of Raspberry Pi OS (Bullseye or more recent), then OBS Studio is available directly in the package manager. You need to install FFmpeg first, and then the main OBS package.

Install FFmpeg

The FDK AAC package is a prerequisite for OBS Studio.

FDK AAC is the FFmpeg encoder for the AAC format
It’s the successor from MP3, often used in MP4 streams, and required for OBS Studio.

On Bullseye, you can install it easily with:
sudo apt update
sudo apt install libfdk-aac2 libfdk-aac-dev

I give you the commands, but you can also search for the package names in the “Add / Remove Software” tool if you prefer to use the GUI.

Install OBS Studio from the official repository

You can then install the main package for OBS Studio with:
sudo apt install obs-studio

All the other dependencies will be installed automatically. You can skip the next part and go directly to the usage tips, where I help you to get started with this application.

Same thing, you can always use the Add / Remove Software tool if you prefer:

Install OBS Studio on Raspberry Pi OS Legacy

On Raspberry Pi OS Buster (Legacy), it’s not as simple, but I have a solution for you.

You can always try to download the sources and compile them manually, but frankly, it’s way easier to use Pi-Apps for this. At least it works all the time, and you only need one command to do this.

Install Pi-Apps

If you don’t know, Pi-Apps is a nice tool allowing you to install many applications in a few clicks, especially those that are not available in the package manager, and are pretty hard to install manually without this tool.

To install Pi-Apps, open a terminal and paste this command:
wget -qO- https://raw.githubusercontent.com/Botspot/pi-apps/master/install | bash

I have a full video lesson inside the community about Pi-Apps, but I’ll give you the short version here, just to show you how to use it to install OBS.

Use Pi-Apps to install OBS Studio

Once the app installed, you’ll have a shortcut on your Desktop (and in the main menu), double-click on it and go to the Multimedia category, where you’ll find OBS Studio:

Select it and click on “Install”. A terminal window will show up, but you don’t have anything to do. Pi-Apps will automatically install everything.

A few minutes later, OBS Studio will be installed on your system, and you can read the next part to get started with it.

Getting started with OBS Studio on Raspberry Pi

First run

Whichever option you chose to install it, you can now start OBS Studio from the main menu:
Sound & Video > OBS Studio

You’ll likely get an error when you start it for the first time. I had it on all versions I tested, so I think it’s the same for everyone :-).

On Raspberry Pi 4, I get this error:
"Failed to initialize video. Your GPU may not be supported, or your graphic drivers may need to be updated"

Let me know if you have another solution, but the only thing that worked for me is to set this variable before starting obs:

  • Open a terminal
  • Run this command:
    MESA_GL_VERSION_OVERRIDE=3.3 obs

This should work as expected now, you can run the auto-configuration wizard like explained in the previous step.

You can edit the menu entry via Preferences > Main Menu Editor to add this option. But I didn’t find a way to put it directly in the launcher properties (it doesn’t let me save the entry).

So, I created a tiny script:
nano /home/$USER/obs.sh
Only added this line:
MESA_GL_VERSION_OVERRIDE=3.3 obs
Added the execution permission:
chmod +x /home/$USER/obs.sh

And then put the script in the menu entry instead:

Maybe there is an easier way, but at least it’s working as expected, and I can now run OBS Studio from the main menu directly:

On the first run, an auto-configuration wizard is available to set the default settings.

I recommend using it so you don’t have anything else to change to get started.
Answer the few questions (you can keep the default values if you have no idea) and OBS will run a test to configure everything. Click on “Apply settings to confirm”.

Screen capture

Here is how to capture your screen with OBS:

  • By default, the “Sources” panel is available at the bottom of the screen
  • Click on “+” to add a source
  • Choose “Screen Capture (XHSM)”
  • A window shows up asking for a source name.
    Keep it by default or enter whatever you want.
    Then confirm with OK.
  • On the next screen, you can confirm a few things like the screen to capture (on a Raspberry Pi 4 with two screens only), if you want to capture the mouse pointer and another advanced setting (X server)
  • From here, your screen appears on the default scene

It will be easier with two screens (one with OBS and the other with the things you want to record), but it works in any case.

Camera capture

If you have a camera (Pi module or other), you can add it to the sources almost the same way:

  • Enable your camera on Raspberry Pi OS (click the link for more details)
  • Click on “+” in the “Sources” panel
  • Choose “Video Capture Device (V4L2)” as new source
  • Again, choose a name and confirm
  • In the next window, you can configure everything about your camera

    For example, mine needed a rotation to display the image in the correct orientation, so I just changed the “Rotation” value and let the other settings by default
  • Confirm to add it in the source list

Once you have at least one source, you change the image size on the screen
For example, you can use OBS to stream your desktop and use your camera to show your face in a corner.
All the settings can be change by click on the “Settings” button on the right (general, stream to Twitch, output quality and format, shortcuts, etc.)

OBS also manage other sources the same way (audio for example)

Record

To record your screen or camera, type “Start Recording” on the right.
The default output folder is /home/pi, files are in MKV with a 1080p high quality.
You can change everything in the settings.

Shortcuts

By default, there is no shortcut so you need to use a mouse to start/stop a record or anything else.
In the settings it’s possible to set a shortcut to each action.

Video

Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.

Conclusion

That’s it! You now know how to install and configure OBS on your Raspberry Pi.

I tested on Raspberry Pi 4, it works pretty well (except the menu icon)
No lag, no bug, so it’s good news.
I’ll probably try it in a future video for the YouTube channel and let you know if I have anything else to add.

Additional Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.

VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.

How to Install OBS Studio on Raspberry Pi OS? (video capture)

OBS Studio is a powerful open-source video capture and streaming software that can be used to capture and stream video from a Raspberry Pi. This guide will show you how to install OBS Studio on Raspberry Pi OS.

Step 1: Install the Dependencies

Before you can install OBS Studio, you need to install some dependencies. To do this, open a terminal window and enter the following command:

sudo apt-get install libxcb-xinerama0 libxcb-randr0 libxcb-xfixes0 libxcb-shape0 libxcb-render-util0 libxcb-render0 libxcb-shm0 libxcb-glx0 libxcb-xkb1 libxcb-xv0 libxcb-xinerama0-dev libxcb-randr0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-shm0-dev libxcb-glx0-dev libxcb-xkb1-dev libxcb-xv0-dev

Once the dependencies are installed, you can proceed to the next step.

Step 2: Download and Install OBS Studio

Now that the dependencies are installed, you can download and install OBS Studio. To do this, open a terminal window and enter the following command:

wget https://github.com/obsproject/obs-studio/releases/download/25.0.8/obs-studio-25.0.8-raspberrypi.tar.gz

Once the download is complete, extract the tarball with the following command:

tar -xvzf obs-studio-25.0.8-raspberrypi.tar.gz

Now, change to the extracted directory and run the install script with the following command:

cd obs-studio-25.0.8-raspberrypi/ && sudo ./install.sh

Once the installation is complete, you can launch OBS Studio from the terminal with the following command:

obs

Step 3: Configure OBS Studio

Now that OBS Studio is installed, you can configure it to capture and stream video from your Raspberry Pi. To do this, open OBS Studio and click on the “Settings” button. On the “Settings” page, click on the “Video” tab and select the resolution and frame rate that you want to use for your video capture. You can also configure the audio settings on this page.

Once you have configured the video and audio settings, click on the “Output” tab and select the “Streaming” option. On the “Streaming” page, select the streaming service that you want to use and enter the necessary information. Once you have configured the streaming settings, click on the “OK” button to save your changes.

Step 4: Start Capturing and Streaming Video

Now that OBS Studio is configured, you can start capturing and streaming video from your Raspberry Pi. To do this, click on the “Start Streaming” button in OBS Studio. This will start the video capture and streaming process.

You can now view the video stream on the streaming service that you selected. You can also use OBS Studio to record the video stream to a file on your Raspberry Pi.

Conclusion

In this guide, we showed you how to install and configure OBS Studio on Raspberry Pi OS. With OBS Studio, you can capture and stream video from your Raspberry Pi with ease.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?