# Maintainer: tytan652 # Contributor: Alice Gaudon # Contributor: Benjamin Klettbach # Contributor: Jonathan Steel # Contributor: ArcticVanguard # Contributor: ledti pkgname=obs-studio-browser pkgver=30.0.0 pkgrel=1 pkgdesc="Free and open source software for video recording and live streaming. With everything except service integration" arch=("x86_64" "aarch64") url="https://github.com/obsproject/obs-studio" license=("GPL3") # To manage dependency rebuild easily, this will prevent you to rebuild OBS on non-updated system _libdatachannelver=0.19.2 _mbedtlsver=3.4 _pythonver=3.11 depends=( "alsa-lib" # Deps of ALSA plugin and CEF "curl" # Deps of OBS Studio and rtmp-services plugin "ffmpeg-obs>=6" # Deps of OBS Studio and FFmpeg plugin "fontconfig" # Deps of Freetype2 plugin "freetype2" # Deps of Freetype2 plugin "ftl-sdk" # Deps of Outputs plugin "gcc-libs" # Deps of any C++ related binary "glib2" # Deps of libobs, PipeWire plugin and CEF "glibc" # Deps of any C related binary "jansson" # Deps of libobs and rtmp-services plugin "libgl" # Deps of libobs-opengl and OBS Studio "libpipewire" # Deps of the PipeWire plugin "libpulse" # Deps of PulseAudio monitoring (in libobs) and PulseAudio plugin "librist" # Deps of FFmpeg plugin "libva" # Deps of FFmpeg plugin and QSV plugin "libx11" # Deps of libobs, libobs-opengl, X11 Capture plugin, frontend tools plugin, obs-browser and CEF "libxcb" # Deps of libobs-opengl, X11 Capture plugin and CEF "libxcomposite" # Deps of the X11 capture plugin "libxkbcommon" # Deps of libobs, OBS Studio and CEF "mbedtls>=$_mbedtlsver" # Deps of OBS Studio and Outputs plugin "pciutils" # Deps of FFmpeg plugin "qrcodegencpp-cmake" # Deps of Websocket plugin "qt6-base" # Deps of OBS Studio and any frontend plugin "qt6-svg" # Deps of OBS Studio "qt6-wayland" # Needed to use Qt on Wayland platform "rnnoise" # Deps if the filter plugin "speexdsp" # Deps if the filter plugin "srt" # Deps of FFmpeg plugin "util-linux-libs" # Deps of libobs "vlc-luajit" # Deps of VLC Plugin ("vlc" issue crashes) "wayland" # Deps of libobs, libobs-opengl and CEF "x264" # Deps of the X264 plugin "zlib" # Deps of libobs # Deps of CEF "at-spi2-core" "dbus" "expat" "libcups" "libdrm" "libxdamage" "libxext" "libxfixes" "libxrandr" "mesa" "nspr" "nss" ) ## About vlc-luajit # The official VLC package will make OBS crash when a VLC source is used. # The issue is that VLC and OBS are compiled with different lua version. # So I also created vlc-luajit, a VLC package compiled with the same lua as OBS. # But to make people unable to install VLC official package with obs-studio-tytan652. # I decided to make vlc-luajit a dependency of OBS rather than an optional one. ## About ffmpeg-obs # Read ffmpeg-obs PKGBUILD for more info makedepends=( "asio" # Deps of Websocket plugin (headers-only lib) "cmake" "jack" # Deps of JACK plugin "git" "uthash" # Deps of libobs "libajantv2" # Deps of AJA plugin (static lib) "libdatachannel-nice>=$_libdatachannelver" # Deps of WebRTC plugin (NICE variant like the Flatpak) "libfdk-aac" # Deps of FDK AAC plugin "luajit" # Deps of Scripting plugin "nlohmann-json" # Deps of Websocket plugin (headers-only lib) "onevpl" # Deps of QSV plugin "python>=$_pythonver" # Deps of Scripting plugin "sndio" # Deps of sndio plugin "swig" # Deps of Scripting plugin "systemd-libs" # Deps of V4L2 plugin "v4l-utils" # Deps of V4L2 plugin "websocketpp" # Deps of Websocket plugin (headers-only lib) # Deps of obs-browser "cef-minimal-obs=103.0.0_5060_shared_textures_2594+g17f8588+chromium_103.0.5060.134_1" ) optdepends=( "jack: JACK support" "libfdk-aac: FDK AAC codec support" "onevpl: QSV encoder support" "intel-media-sdk: QSV encoder support(<= Rocket Lake & >= Broadwell)" "onevpl-intel-gpu: QSV encoder support (>= Alder Lake)" "intel-media-driver: VAAPI encoder support (>= Broadwell)" "libva-intel-driver: VAAPI encoder support (<= Haswell)" "libva-mesa-driver: VAAPI encoder support" "swig: Scripting" "luajit: Lua scripting" "python>=$_pythonver: Python scripting" "sndio: Sndio input client" "v4l-utils: V4L2 support" "systemd-libs: V4L2 support" "v4l2loopback-dkms: V4L2 virtual camera output" "libdatachannel>=$_libdatachannelver: WHIP Support" ) provides=("obs-studio=$pkgver" "obs-vst" "obs-websocket" "obs-browser") conflicts=( "obs-studio" "obs-vst" "obs-websocket" "obs-browser" "obs-linuxbrowser" # This plugin is obsolete "libva-vdpau-driver" # This driver is abandonned and make OBS segfault if it happen to be loaded, try libva-nvidia-driver is you really need Nvidia decode through VAAPI ) options=('debug') source=( "obs-studio::git+https://github.com/obsproject/obs-studio.git#tag=$pkgver" "obs-browser::git+https://github.com/obsproject/obs-browser.git" "obs-websocket::git+https://github.com/obsproject/obs-websocket.git" "0001-Add_finder_for_uthash.patch" "0002-Use_system_uthash.patch" ) sha256sums=( "SKIP" "SKIP" "SKIP" "f4a56021a7f1c564f95b588d7c09b60a89efa2c1954c8a418cf6320b5a818542" "874456110d17d2efe02f8a1f47f58c877922d8bdab6435df334b9e6460b26bf8" ) if [[ $CARCH == 'x86_64' ]]; then optdepends+=("decklink: Blackmagic Design DeckLink support") fi prepare() { cd "$srcdir/obs-studio" git config submodule.plugins/obs-browser.url $srcdir/obs-browser git config submodule.plugins/obs-websocket.url $srcdir/obs-websocket git -c protocol.file.allow=always submodule update patch -Np1 -i "$srcdir/0001-Add_finder_for_uthash.patch" patch -Np1 -i "$srcdir/0002-Use_system_uthash.patch" } build() { cmake -B build -S obs-studio \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DENABLE_RTMPS=ON \ -DENABLE_LIBFDK=ON \ -DENABLE_JACK=ON \ -DENABLE_SNDIO=ON \ -DENABLE_BROWSER=ON \ -DCEF_ROOT_DIR=/opt/cef-obs \ -DOBS_VERSION_OVERRIDE="$pkgver" \ -Wno-dev sed -i "s|#define OBS_VERSION |#define OBS_VERSION \"$pkgver-browser-$pkgrel\" //|" build/config/obsconfig.h cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build }