322.2. obs-studio-32.2.2
OBS Studio: screen recording and live streaming, with PipeWire screen capture on Wayland
| Version | 32.2.2, release 1 |
| Shelf | video-tools — Video editing, transcoding, muxing, recording, streaming and webcam apps |
| Phase | 44_apps (Applications), 410 of 422 in build order |
| Licence | GPL-2.0-or-later |
| Homepage | https://obsproject.com/ |
| Build time | 15.0 SBU |
| Installed size | 18.9 MiB in 450 files |
| Recipe | ports/core/video-tools/obs-studio/kpkgbuild |
About
OBS Studio records the screen and streams it live, composing scenes from screen and window captures, cameras, images, text and media, with an audio mixer and filters. On Wayland its screen capture is the linux-pipewire plugin, which asks the ScreenCast portal for a PipeWire stream (see Screen capture and the clipboard). The linux-capture plugin, XComposite and XSHM, sees only Xwayland windows; libobs links libX11 and xcb on Linux unconditionally, and that plugin is built with it.
Sources
obs-studio-32.2.2.tar.gz(15.9 MiB)
sha256ec81fb66b03e75ddb3076b576f62679c39262e0e9960cef3e17a40dc5d68e6b4
upstream: https://github.com/obsproject/obs-studio/releases/download/32.2.2/OBS-Studio-32.2.2-Sources.tar.gz
archive copy: sources-4/video-tools--obs-studio-32.2.2.tar.gz
Dependencies
Depends on: cmake, ninja, pkgconf, extra-cmake-modules, qt6-qtbase, qt6-qtsvg, qt6-qtwayland, ffmpeg, x264, libva, libdrm, pciutils, mbedtls, zlib, jansson, uthash, simde, curl, nlohmann-json, swig, luajit, python3, speexdsp, rnnoise, libsrt, librist, vlc, alsa-lib, libpulse, pipewire, glib, wayland, libxkbcommon, mesa, libglvnd, libX11, libxcb, util-linux, freetype2, fontconfig, v4l-utils, eudev.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install obs-studio'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/video-tools/obs-studio.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/video-tools/obs-studio
echo 'ec81fb66b03e75ddb3076b576f62679c39262e0e9960cef3e17a40dc5d68e6b4 obs-studio-32.2.2.tar.gz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/obs-studio
SRC=$SRC_ROOT/obs-studio-32.2.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf obs-studio-32.2.2.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
export CFLAGS="$CFLAGS -Wno-incompatible-pointer-types"
cmake -S . -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_SKIP_INSTALL_RPATH=ON \
-D CMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-D OBS_VERSION_OVERRIDE=$version \
-D OBS_COMPILE_DEPRECATION_AS_WARNING=ON \
-D OpenGL_GL_PREFERENCE=GLVND \
-D ENABLE_FRONTEND=ON \
-D ENABLE_WAYLAND=ON \
-D ENABLE_PIPEWIRE=ON \
-D ENABLE_PULSEAUDIO=ON \
-D ENABLE_ALSA=ON \
-D ENABLE_V4L2=ON \
-D ENABLE_UDEV=ON \
-D ENABLE_JACK=ON \
-D ENABLE_SNDIO=OFF \
-D ENABLE_LIBFDK=OFF \
-D ENABLE_HEVC=ON \
-D ENABLE_FREETYPE=ON \
-D ENABLE_SPEEXDSP=ON \
-D ENABLE_RNNOISE=ON \
-D ENABLE_VST=ON \
-D ENABLE_SCRIPTING=ON \
-D ENABLE_SCRIPTING_LUA=ON \
-D ENABLE_SCRIPTING_PYTHON=ON \
-D ENABLE_BROWSER=OFF \
-D ENABLE_WEBSOCKET=OFF \
-D ENABLE_WHATSNEW=OFF \
-D ENABLE_SERVICE_UPDATES=OFF \
-D ENABLE_WEBRTC=OFF \
-D ENABLE_NEW_MPEGTS_OUTPUT=ON \
-D ENABLE_VLC=ON \
-D ENABLE_AJA=OFF \
-D ENABLE_DECKLINK=OFF \
-D ENABLE_NVENC=OFF \
-D ENABLE_FFMPEG_NVENC=OFF \
-D ENABLE_QSV11=OFF \
-D ENABLE_TEST_INPUT=OFF \
-Wno-dev
cmake --build build
DESTDIR=$PKG cmake --install build
find "$PKG/usr/share/obs" -path '*/locale/*.ini' ! -name en-US.ini -delete
cat > "$PKG/usr/share/applications/com.obsproject.Studio.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=OBS Studio
GenericName=Screen Recorder
Comment=Record the screen and stream live
Exec=obs
Icon=com.obsproject.Studio
Terminal=false
StartupNotify=true
StartupWMClass=com.obsproject.Studio
Categories=AudioVideo;Recorder;
Keywords=recording;screencast;stream;obs;capture;
DESKTOP
chmod 644 "$PKG/usr/share/applications/com.obsproject.Studio.desktop"
for _p in vlc-video linux-jack obs-ffmpeg; do
test -f "$PKG/usr/lib/obs-plugins/$_p.so"
done
readelf -d "$PKG/usr/lib/obs-plugins/obs-filters.so" | grep -q 'librnnoise'
readelf -d "$PKG/usr/lib/obs-plugins/obs-ffmpeg.so" | grep -q 'libsrt'
The switches, and why each is set:
OBS_VERSION_OVERRIDE— The version OBS reports. Without it,cmake/common/versionconfig.cmakeasksgit describeonly when the source has a.git, which the release tarball does not, and otherwise reports its placeholder version.CMAKE_SKIP_INSTALL_RPATH=ON— Install the programs and plugins with noRPATH; libobs and the frontend library are in/usr/lib, on the loader’s default path.CMAKE_COMPILE_WARNING_AS_ERROR=OFF— OBS turns every warning into an error unless this is set; with it, a warning from a newer compiler or library does not stop the build.OBS_COMPILE_DEPRECATION_AS_WARNING=ONlikewise keeps deprecated-declaration warnings from being errors.-Wno-incompatible-pointer-types— Added toCFLAGS: GCC treats an incompatible pointer conversion in C as an error by default, and this keeps it a warning.OpenGL_GL_PREFERENCE=GLVND— Have CMake’sFindOpenGLlink the vendor-neutrallibOpenGLfrom libglvnd rather than the legacylibGL.ENABLE_JACK=ON— The JACK input, off upstream. The JACK library is PipeWire’s (pipewire-jack, built by the pipewire port), so a JACK source in OBS reads from the PipeWire graph.ENABLE_VLC=ON— The VLC video source, which plays a playlist through vlc’s libvlc.ENABLE_NEW_MPEGTS_OUTPUT=ON— OBS’s own MPEG-TS output for SRT and RIST, through libsrt and librist.ENABLE_RNNOISE=ON— The RNNoise noise-suppression filter. With no system library found, OBS compiles the copy in its tree instead and says so only in a warning; thereadelfcheck at the end ofbuild.shmakes sure the filter links the rnnoise port.ENABLE_BROWSER=OFF— WithENABLE_WHATSNEW=OFF: the browser source and the What’s New panel need the Chromium Embedded Framework, which is not a port.ENABLE_WEBSOCKET=OFF— The obs-websocket remote-control server needs WebSocket++ and qrcodegencpp, which are not ports.ENABLE_SERVICE_UPDATES=OFF— Do not download the list of streaming services from obsproject.com at every start; the list shipped in the package is used.ENABLE_WEBRTC=OFF— The WHIP/WebRTC output needs libdatachannel, which is not a port.ENABLE_LIBFDK=OFF— No FDK AAC encoder: its licence cannot be combined with the GPL of the OBS binary that ships. FFmpeg’s AAC encoder is used instead.ENABLE_SNDIO=OFF— WithENABLE_AJA=OFF,ENABLE_DECKLINK=OFF,ENABLE_NVENC=OFF,ENABLE_FFMPEG_NVENC=OFFandENABLE_QSV11=OFF: the sndio audio input, AJA and DeckLink capture cards, NVIDIA NVENC and Intel QSV are left out. sndio, AJA’s libajantv2, NVENC’s FFnvcodec headers and QSV’s libvpl are not ports. DeckLink builds from the SDK headers in OBS’s own tree, but a card works only throughlibDeckLinkAPI.so, loaded at run time from Blackmagic’s proprietary Desktop Video driver, which is not a port.ENABLE_TEST_INPUT=OFF— Build no test sources.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/obs-studio, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf obs-studio-32.2.2-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/obs-studio, and runs the triggers its paths call for.
Contents
Installed programs: obs, obs-ffmpeg-mux.
Installed libraries: libobs-frontend-api.so, libobs-opengl.so, libobs-scripting.so, libobs.so.
Installed directories: /usr/include/obs, /usr/lib/cmake/libobs, /usr/lib/cmake/obs-frontend-api, /usr/lib/cmake/obs-websocket-api, /usr/lib/obs-plugins, /usr/lib/obs-scripting, /usr/share/licenses/obs-studio, /usr/share/obs.
Short descriptions
libobs.pc |
OBS Studio core compositor library |
obs-frontend-api.pc |
OBS Studio frontend API library |
Notes
- The checks at the end.
build.shstops unless thevlc-video,linux-jackandobs-ffmpegplugins were built, and unlessobs-filters.solinks librnnoise andobs-ffmpeg.solinks libsrt. A missing libvlc header, JACK library, libsrt or librist already stops the configure; thereadelfline onobs-filters.sois the one that catches OBS compiling its own RNNoise, which it reports only as a warning. - English only. Every module’s
locale/*.inibuten-US.iniis removed; each module falls back to its English strings. - The menu entry is replaced so that
StartupWMClassiscom.obsproject.Studio, the desktop file name OBS sets and its Wayland app_id, rather thanobs.