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

-- Resource --

Install

Here is the command to copy and paste in a terminal:

    sudo apt 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
        
Download these two files:

    wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac2_2.0.1-1_armhf.deb
    wget http://ftp.debian.org/debian/pool/non-free/f/fdk-aac/libfdk-aac-dev_2.0.1-1_armhf.deb
        
Install them with

    sudo dpkg -i libfdk-aac2_2.0.1-1_armhf.deb
    sudo dpkg -i libfdk-aac-dev_2.0.1-1_armhf.deb
        
Follow these steps to download and install everything

    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
        

First run
Once installed, you can start it from the main menu:
Sound & Video > OBS Studio

If you got an error like this :
"Failed to initialize video. Your GPU may not be supported, or your graphic drivers may need to be updated"
Run this command:


    MESA_GL_VERSION_OVERRIDE=3.3 obs
        

Error Resolve


    sudo apt install libwayland-dev
    sudo apt install pipewire
    sudo cmake -DENABLE_WAYLAND=OFF -DENABLE_PIPEWIRE=OFF -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
    sudo cmake -DBUILD_BROWSER=OFF -DUNIX_STRUCTURE=1 -DCMAKE_INSTALL_PREFIX=/usr ..
    sudo apt install qtbase5-private-dev