# OBS Studio Rust (obs-rust)
> obs-studio-rust is an independent, hybrid Rust/C/C++ rewrite of OBS Studio that keeps the libobs C ABI, the obs-websocket v5 protocol and the plugin/scripting APIs compatible. It ships stable and beta builds for Windows, macOS and Linux, and a local MCP server for agents. Source: https://github.com/obs-rust/obs-studio.
# obs-studio-rust
> [!IMPORTANT]
> **We’re unifying OBS into one hybrid Rust/C/C++ build.**
> Prioritize migrating code to Rust and retiring the C/C++ implementations it replaces.
> Each completed port becomes part of the application, with compatibility and parity
> checks supporting the transition.
[](https://discord.gg/6MWWX4x9pf)
[](https://www.reddit.com/r/ObsRust/)
[](https://github.com/obs-rust/obs-studio/discussions)
[](https://github.com/obs-rust/obs-studio/actions/workflows/leaderboard.yml)
[](https://github.com/obs-rust/obs-studio/queue/master)

This is an independent rewrite of the obsproject's obs-studio.
Same obs studio, but without the bugs. AI generated issues and PRs welcome.
Got an idea? [Start a conversation](https://github.com/obs-rust/obs-studio/discussions).
**Want to help port OBS to Rust?** Paste this into your AI agent:
```bash
PROMPT="/loop 10m https://raw.githubusercontent.com/obs-rust/obs-studio/refs/heads/master/.claude/skills/obs-worker/SKILL.md"
claude --dangerously-skip-permissions "$PROMPT"
```
Using another agent? Paste this instead:
```text
You are a worker in obs-rust/obs-studio, the Rust rewrite of OBS Studio.
Take exactly one issue from claim to an open pull request, then stop.
1. Clone https://github.com/obs-rust/obs-studio if you are not in it.
Read AGENTS.md, then .claude/skills/obs-worker/SKILL.md, and follow it.
It sends you to docs/rust-port/coordination.md and
docs/rust-port/testing-policy.md: read both before you code.
2. Pick one open issue from label:ready (fall back to
label:needs-investigation). Skip any with a recent "Claiming:" comment
or an open PR that names it. Comment "Claiming: #N" with a short plan.
3. Branch from master. Commit a failing test first (RED), then the fix
that makes it pass (GREEN). Run ./lint. One PR per issue.
4. Open the PR against master, describing RED and GREEN.
5. Do not merge, never push to master, and never commit secrets.
Report the PR URL and stop. Maintainers queue PRs; you don't.
Stuck? Ask in the Discord linked in the README, or in Discussions.
```
# Install
OBS-Studio-Rust is a **beta**. Every package is attached to a release in
[releases](https://github.com/obs-rust/obs-studio/releases), named
`OBS-Studio-Rust---.`: take the newest
`obs-studio-rust-v*` release and the file for your OS and CPU. Each release
also ships a `SHA256SUMS` file.
It installs and runs **beside** upstream OBS Studio. It has its own app
identity and keeps its settings in an `obs-studio-rust` folder inside the
usual per-user config directory, so neither program overwrites the other. On
its first start it copies upstream OBS's settings, profiles, scenes and
plug-in settings without changing the originals; later upstream changes are
not imported again. Windows and macOS are a new app identity, so the OS may
ask for capture permissions again.
## Linux (x86_64)
- **AppImage** — any distribution: `chmod +x OBS-Studio-Rust-*-linux-x86_64.AppImage`,
then run it. The AppImage is tested on AlmaLinux 8 (the glibc 2.28 floor),
Ubuntu 22.04, Ubuntu 24.04, Arch Linux and NixOS. On NixOS, see the
AppImage entry in the Q&A below.
- **.deb** — Ubuntu 26.04: `sudo apt install ./OBS-Studio-Rust-*-ubuntu-26.04-x86_64.deb`.
It installs the GUI as `obs-studio-rust-gui`; `obs-studio-rust` is the
obs-websocket command-line client. It keeps its settings in
`~/.config/obs-studio-rust`.
- **Flatpak bundle**: `flatpak install --user ./OBS-Studio-Rust-*-linux-x86_64.flatpak`,
then `flatpak run io.github.obs_rust.OBSStudioRust`. It gets the Freedesktop
runtime from Flathub and does not update itself yet: install the next
release's bundle the same way. It is not on Flathub (`com.obsproject.Studio`
there is upstream OBS Studio), so it installs as
`io.github.obs_rust.OBSStudioRust`, beside upstream's rather than over it.
Its settings are in `~/.var/app/io.github.obs_rust.OBSStudioRust/config/obs-studio`,
and its plug-ins go in
`~/.var/app/io.github.obs_rust.OBSStudioRust/data/obs-studio/plugins/`. To
bring your scenes over from upstream's Flatpak, copy
`~/.var/app/com.obsproject.Studio/config/obs-studio` to that config folder.
## macOS (arm64, x86_64)
Open the `.dmg` for your CPU (`macos-arm64` on Apple silicon, `macos-x86_64`
on Intel), copy `OBS-Studio-Rust.app` to Applications, and start it.
Packages are signed and notarized when the project's release credentials are
configured. For an unnotarized download, try opening the app once, then allow
it in **System Settings → Privacy & Security → Open Anyway**; for a download
you trust, the Terminal alternative is
`xattr -dr com.apple.quarantine /Applications/OBS-Studio-Rust.app`, which
removes quarantine from that app only (see
[Apple's guidance](https://support.apple.com/102445)). Its settings are in
`~/Library/Application Support/obs-studio-rust`.
## Windows (x64, arm64)
**Installer (BETA):** run `OBS-Studio-Rust--windows-x64.msi` (or
`-arm64.msi`). It lets you pick the install folder, adds an
**OBS-Studio-Rust BETA** Start menu entry, and is removed from **Settings >
Apps** (Add/Remove Programs); uninstalling leaves your settings in place.
**Portable:** unpack the `.zip` for your CPU, then start `bin\64bit\obs64.exe`
from the unpacked folder. SmartScreen warns on the first start: choose **More info**,
then **Run anyway** if you trust the download. The `-symbols.zip` files are
only for decoding crash dumps. Its settings are in `%APPDATA%\obs-studio-rust`.
# Conversion progress
How much of **libobs** is Rust — the part that has to be ported. The rest of
the app can stay C++ in the hybrid build. Measured by
[tools/conversion/measure.py](tools/conversion/measure.py); click the card
for the full breakdown.
[](https://obs-rust.github.io/obs-studio/conversion.html)
[](https://github.com/obs-rust/obs-studio/actions/workflows/leaderboard.yml)
The badge date identifies the measured source revision. If it stops advancing,
check the refresh status beside it.
[](https://obs-rust.github.io/obs-studio/conversion.html)
> [!TIP]
> **Come talk to us on [Discord](https://discord.gg/6MWWX4x9pf).** We're a
> new project, and the people building it are there. Ask a question, tell us
> what works or breaks on your setup (AppImage, .deb, Flatpak, your plug-ins and
> capture devices), suggest an idea, or follow the port as it lands. No
> question is too small.
# Features
What OBS-Studio-Rust does differently from upstream OBS Studio, for a user:
new features, changed behavior and fixed upstream bugs, by area, with links
to the issues and pull requests. See the
[features ledger](docs/features.md).
# Fixing bugs with AI + Rust
Want to fix one yourself? Contributors, human or AI-assisted, chat about
ports and pull requests on [Discord](https://discord.gg/6MWWX4x9pf).
https://github.com/user-attachments/assets/4d9af616-bd76-468e-93ac-ef8ef44a0efb
# Launch speed
4.3× faster to the main window and 19% less memory on an NVIDIA streaming
rig (#1168, #1170, #1171, #1172).

# What users say
Word for word, from comments on our issues and pull requests by people who
are not maintainers or contributors here. Each one links to its comment.
`tools/user_quotes.py` gathers them and a reviewer approves each one.
> “Tested obs-rust 0.1.0-beta.20261018 (Linux AppImage, Fedora/Bazzite, kernel 7.2.9) with a fresh config and a copy of my scene collection with the truncated values put back: Elgato 4K X "framerate": 60 (NV12 2560x1440) and Logitech BRIO "framerate": 30 (MJPG 3840x2160). - The log shows Framerate: 60.00 fps for the 4K X, and v4l2-ctl --get-parm reports 60/1 (stock OBS ran it at 144). The BRIO shows 30.00 / 30/1. - Toggling Use Buffering on the 4K X did not restart the capture. - After saving, the collection holds "framerate": 4294967356 for the 4K X and 4294967326 for the BRIO. All three behaviors confirmed. Thanks for the fix!”
>
> — [jrsallee](https://github.com/jrsallee), [#1117](https://github.com/obs-rust/obs-studio/issues/1117#issuecomment-6250423489), 2026-10-18
> “@rdoupe Yep, it works with this fork.”
>
> — [Blayung](https://github.com/Blayung), [#349](https://github.com/obs-rust/obs-studio/issues/349#issuecomment-6233729979), 2026-10-17
> “It works! In both ways - channels are correct and the meter is synced. No worries! I appreciate your time and attention. Well done!”
>
> — [Ezriilc](https://github.com/Ezriilc), [#251](https://github.com/obs-rust/obs-studio/issues/251#issuecomment-6133348602), 2026-10-12
> “Can confirm that it does sanitise the filename correctly for recordings and replay buffer saves.”
>
> — [pricklythorn](https://github.com/pricklythorn), [#199](https://github.com/obs-rust/obs-studio/issues/199#issuecomment-6106432357), 2026-10-11
# Contributors leaderboard
The top five, ranked by merged PRs only, credited to the original author even when a
maintainer re-landed the work (counted once). Updated every 4 hours.
[](https://obs-rust.github.io/obs-studio/)
[See all contributors](https://obs-rust.github.io/obs-studio/#all)
# How CI works here
Lots of people and AI agents work on this repo at the same time, so CI is
built to do as little repeated work as possible:
- **Every pull request gets an admission check.** A same-repository PR can
use client evidence when both its author and the valid signer of final HEAD
are verified active obs-rust members. Complete selected evidence lets Pull
allocate just Event Data, CI Mode and CI Gate for compile/test admission.
Forks, non-members, unsigned heads, unavailable membership lookups and missing
or invalid evidence run the real selected checks, including six-target lint.
- **The merge queue is the heavy gate.** It reruns all selected tests, native
builds and links on the combined merge result, regardless of client trailers.
Required check names stay unchanged; unavailable runners still block admission.
- **The full build runs before each release.** Nightly and release CI builds
and tests every platform, the full app, Flatpak and release packages.
- **Local tooling is optional.** `./push` tries prooft first: complete lint,
clippy and Dylint for Linux x64/arm64, Windows x64/arm64 MSVC and macOS
x64/arm64, host tests, self-tests and validators. Swift is an optional separate
gate when selected. Trailers are self-reported passes, not signed execution
evidence. Sign the final commit after stamping; missing tools or a failed
private-membership lookup use real PR CI. Strict refusal is opt-in with
`PUSH_REQUIRE_ATTESTATION=1`. Legacy Local-Gate records remain diagnostic.
- **Builds are cached and shared.** Rust builds go through `soldr`, which
reuses compiled code across branches and machines.
The full guide, with the tools, rules and commands, is in
[docs/ci-tooling.md](docs/ci-tooling.md). If you're contributing, please
read it before you push: it explains how to avoid overloading the
shared machines and CI.
# Q&A
**Where can I get help, or report something that isn't quite a bug?**
Join us on [Discord](https://discord.gg/6MWWX4x9pf): it's the quickest way to
reach the people working on OBS Rust. For a reproducible bug, please also
[file an issue](https://github.com/obs-rust/obs-studio/issues/new/choose); for
longer ideas, [start a discussion](https://github.com/obs-rust/obs-studio/discussions).
**Does OBS Rust support all of the plug-ins?**
Yes. OBS Rust is fully backwards compatible with OBS Studio — the
plug-ins you already have should work as-is. If you find one that
doesn't, that's a bug: please [file an issue](https://github.com/obs-rust/obs-studio/issues/new/choose)
and link it here so we can track it.
**How do I install it on Linux?**
See [Install](#install) above: the AppImage, the `.deb` and the Flatpak
bundle, and where each one keeps its settings.
**How do I run the AppImage on NixOS?**
The simplest way is `appimage-run` (`programs.appimage.enable = true;`, then
`appimage-run ./OBS-Studio-Rust-*.AppImage`). It gives the AppImage the
paths a regular distribution has, and OBS renders on your GPU and finds NVENC.
Running the AppImage directly works through nix-ld. Your configuration needs
`hardware.graphics.enable = true;`, `programs.nix-ld.enable = true;` and
Wayland among nix-ld's libraries:
```nix
programs.nix-ld.libraries = with pkgs; [ wayland ];
```
Without Wayland there, the AppImage stops at start and says so. You don't
need to add `/run/opengl-driver/lib` or the keyboard layouts: the AppImage
finds the driver libraries (for NVENC) and `/etc/X11/xkb` itself.
**How do I install plug-ins for the AppImage?**
The AppImage loads plug-ins from the same per-user folders as OBS Studio on
Linux, so a plug-in you already installed for your own account is picked up
as-is. To add one, unpack its Linux build into either of these folders:
- `~/.local/share/obs-studio/plugins//`, with the module at
`/.so` and its files under `/data/` (the current
layout).
- `~/.config/obs-studio/plugins//`, with the module at
`/bin/64bit/.so` and its files under `/data/` (the
older layout that many plug-in downloads still use).
Then restart OBS Rust. **Tools → Plugin Manager** lists what loaded.
Plug-ins installed system-wide by a distribution package (under
`/usr/lib/obs-plugins` or `/usr/lib//obs-plugins`) are **not** loaded.
They were built against that distribution's OBS and libraries, not the ones
inside the AppImage. Use the plug-in's own Linux download instead.
A plug-in with its own Qt windows must be built for a Qt 6 release no newer
than the one in the AppImage. If a plug-in sits in one of those folders but
doesn't load, run the AppImage from a terminal and the log will say why.
Then file an issue as above.
Want to see the original README from OBS Project? [Click here](README.upstream.md).
# 🏆 OBS Project User Abuse Hall of Fame
Bugs they confirmed, then closed. Features you relied on, then removed.
Twelve upstream threads where users showed up in numbers and were turned
away anyway. Six of them were closed as stale on a single afternoon.
| | Issue | 💬 | Fate |
|:-:|---|--:|---|
| 🥇 | [Preview Stutter that appears in Streams/Recordings](https://github.com/obsproject/obs-studio/issues/4191) | 184 | locked (off-topic) |
| 🥈 | [OBS Virtual Camera may affect built-in webcams](https://github.com/obsproject/obs-studio/issues/3555) | 87 | closed not planned, locked |
| 🥉 | [Removal of --disable-shutdown-check breaks automated background workflows](https://github.com/obsproject/obs-studio/issues/12650) | 64 | closed not planned, locked |
| 4 | [Dock Sizes are Reset the next time you open OBS.](https://github.com/obsproject/obs-studio/issues/2949) | 34 | closed not planned |
| 5 | [Pause and Resume Recording Doubles or Triples CPU usage](https://github.com/obsproject/obs-studio/issues/3148) | 34 | closed not planned |
**In their own words:**
> **“No amount of "I don't like your answer" will change it.”**
> — [#9285](https://github.com/obsproject/obs-studio/issues/9285#issuecomment-1677822114), to a user who said a downgrade fixed their dropped frames
> **“However, if you refuse to follow the process, there is nothing we can do, and this report is not actionable.”**
> — [#13685](https://github.com/obsproject/obs-studio/issues/13685#issuecomment-5052743359), in the same comment that admitted 32.2 had raised the driver minimum
> **“[…] that decision has already been made.”**
> — [#12650](https://github.com/obsproject/obs-studio/issues/12650#issuecomment-3368592277), on removing a flag users' setups depended on
**[See all 12, every quote, and why each one made the cut →](docs/hall-of-fame.md)**
# Agent instructions
This repository is governed by the [Constitution of the obs-rust Project](https://github.com/obs-rust/constitution/blob/main/CONSTITUTION.md), which supersedes every other document here, this one included.
This repository is being converted from C/C++ to Rust while keeping the public
API (libobs C API/ABI, obs-websocket v5 protocol, frontend and scripting APIs)
compatible.
## OBS WebSocket compatibility directive
Preserve the existing C++ OBS WebSocket plugin in `plugins/obs-websocket`
as a compatibility check for Rust OBS. Do not port it to Rust or modify it
to accommodate the Rust implementation. Existing compiled plugin binaries
must load and work through the preserved libobs C API/ABI, and existing
clients must continue to work through the obs-websocket v5 protocol.
Fix compatibility failures in Rust OBS. This directive supersedes earlier
plans to port OBS WebSocket, including `docs/rust-port/websocket-port.md`.
Changing this policy requires an explicit user request.
## Worker role
Minimize Rust test executables: use one amalgamated binary for each category
in the testing policy's category map. Eight categories are currently selected;
preserve all assertions and required test tiers, and add cases as modules in
the category's existing binary. See the
[test binary policy](docs/rust-port/testing-policy.md#test-binary-budget).
When you take an issue to work on (claim, port, fix, test, or build, lint,
push and open a PR), you are a worker: invoke the `obs-worker` skill
([.claude/skills/obs-worker/SKILL.md](.claude/skills/obs-worker/SKILL.md)).
Agents without skills read that file by hand. It walks the documents below
in order, from rebase to merge queue.
When the maintainer runs you as a worker on a timer (`/loop 10m take on the
role of a worker that is looking for issues ...`), also invoke the
`obs-worker-loop` skill
([.claude/skills/obs-worker-loop/SKILL.md](.claude/skills/obs-worker-loop/SKILL.md)):
each tick moves your own PRs, checks master's health, then picks the next
most important issue. Unlike the coordinator, you claim and do the work.
## Coordinator role
When the maintainer runs you on a timer (`/loop 30m act as coordinator`,
also called concierge or steward) to keep work moving while they are away,
you are the coordinator, not a worker: invoke the `obs-coordinator` skill
([.claude/skills/obs-coordinator/SKILL.md](.claude/skills/obs-coordinator/SKILL.md)).
Each tick, put every green PR into the merge queue; rebase PRs that were
ejected from the queue, stacked PRs and PRs about to go in; push fixups;
review PRs; answer questions; and close stalled follow-ups. Never claim
or port an issue yourself.
Each tick starts from the computed work list of the org-wide
`obs-org-coordinator` skill in
[obs-rust/.github](https://github.com/obs-rust/.github/tree/master/.claude/skills)
(`uv run -m workflow.coordinator`), which covers every obs-rust repo;
`obs-org-worker` is its worker counterpart. Claims, Ready and the board:
[WORKFLOW.md](https://github.com/obs-rust/.github/blob/master/WORKFLOW.md).
## Mandatory reading
Before porting any code, writing any test, or touching `rust/`, `Cargo.toml`,
or `test/`, read and follow
[docs/rust-port/testing-policy.md](docs/rust-port/testing-policy.md) exactly.
It defines the four required test tiers (Rust unit tests, unchanged C tests
against the Rust implementation, differential tests against the original C,
and black-box protocol tests) and the per-unit workflow.
Before writing a test, touching CI or the sanitizers, or chasing a failure
that only shows on one host, read
[docs/knowledge/index.md](docs/knowledge/index.md): what earlier workers
learned the hard way, one concept per file. Where a lesson is a check, the
check is the rule.
Before picking up or filing an issue, or opening a PR, read
[docs/rust-port/coordination.md](docs/rust-port/coordination.md): claim
before coding, search open PRs first, target master, RED then GREEN commits.
A PR with a user-visible change adds its line to
[docs/features.md](docs/features.md) (the features ledger).
Before adding, renaming or building C/C++/Objective-C sources, or touching
`cmake/common/`, `cmake/pch/` or a `build/` group, read [BUILD.md](BUILD.md).
Before building, testing or pushing, read
[docs/ci-tooling.md](docs/ci-tooling.md): soldr, setup-soldr, bosn, act2,
zackees/ci.yml, the local gate and CI attestation, and how to use them so
many agents don't overload the shared machines and CI runners.
## Merge gate: PR CI
`CI Gate ✅` on `obs-rust/obs-studio` remains the required merge check.
Trusted fully attested same-repository member PRs use base-owned verification
admission; the merge queue always executes its selected heavy lanes. Forks,
non-members, unverified final heads, trust-surface edits and missing/invalid
proofs or verifier/API errors retain real selected PR checks. All six supported
targets receive clippy and Dylint on the client or in real PR fallback. Open a
PR (a draft is fine) as soon as the RED test exists; a red CI run on a PR is
expected, not a process failure. Do not build fork or self-hosted CI to
pre-validate PRs. What stays mandatory: RED then GREEN, differential and Tier 2
coverage, and no edits to C tests or public headers.
For focused CI/configuration fixes, record local RED evidence and push the
RED and GREEN commits together when ready; a remote RED run is not required.
Documentation-only updates do not need RED → GREEN tests. See
[coordination.md](docs/rust-port/coordination.md#4-pull-requests).
`ci-pre.yml` remains the general pre-work entry point on PRs. Only its cache
janitor job skips PR events; it sweeps on master pushes. The merge queue
sweeps last instead: `ci.yml`'s final `cache-janitor` job runs after every
other job and evicts least recently used caches down to `[cache].budget`, so
GitHub's own eviction never picks (#1854, zackees/ci.yml#405 `GEN-022`).
Neither sweep is in the required-gate dependency graph. See
[the pre-work policy](docs/ci-tooling.md#pre-work-cache-maintenance-and-cancellation).
## Local gate (recommended, not required)
Local tooling is optional for contributors. `./push` tries prooft's complete
client lanes first, then deprecated partial legacy evidence, then an unattested
push. Strict refusal remains opt-in (`PUSH_REQUIRE_ATTESTATION=1`). Self-reported
trailers establish accountability, not signed proof of execution. Fast admission
requires authenticated active obs-rust membership for both PR author and valid
signer of the exact final HEAD; private lookup denial runs real CI. Stamp first,
then sign the final amended commit. Trust decisions and pins come from immutable
PR BASE; head code and policy never decide skips. See [the admission contract](docs/ci-tooling.md#ci-attestation-skipping-whats-already-proven).
Push through `./push`, not a bare `git push`. Legacy Local-Gate trailers alone
cannot grant full admission. Source or history changes require fresh evidence.
Environment failures: [troubleshooting](docs/rust-port/troubleshooting.md).
- `./lint` (8 s): clang-format 22.1.3 and gersemi 0.25.0 pinned via uvx, rustfmt, clippy, and the repo Dylints (`dylints/*`). `./lint --fix` rewrites files.
- `./unittest`: Rust Tiers 1-3, then Tier 2 (cmocka against hybrid libobs and the explicit C reference, one build in Docker; ~30-40 s warm thanks to zccache).
- For legacy local-gate diagnostics, commit, then run
`uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint local-gate run`.
This legacy path remains available for diagnostics; use complete client gates for fast admission and sign only after stamping.
- Fallback PR execution runs the lanes its changed paths select (the `LANES` table in `ci/ci_scope.py`: Fast Gate always, plus a Linux-hosted Windows MSVC link of every test binary (`ci/windows_link_check.py`) on every non-docs PR and queue run, Tier 2 for libobs/linked crates/`test/cmocka/`, Qt for `frontend/`, a Linux build of only the touched `plugins/`/`shared/` targets; macOS/Windows only for their own platform files). The full OBS app builds never run from a PR path. No label changes what runs. A master push adds every lane a PR defers (Tier 2, Qt, the workspace tests) and runs the macOS/Windows Rust tests and Tier 2 only for paths that select them; it builds no OBS app. Schedule, workflow_dispatch, tags, release branches and the release gate run everything, including the macOS, Windows, Ubuntu and Flatpak app builds (#436).
## Quick rules
- Security bugs come in two tiers ([SECURITY.md](SECURITY.md), "Two tiers"). Low risk (only trusted local input reaches it) is a normal public bug. High risk (a remote party can reach it, or it leaks credentials) is never a public issue, PR or branch: report it as a private advisory. Unsure → private (see obs-worker §2). After triage, follow the `obs-security-disclosure` skill ([.claude/skills/obs-security-disclosure/SKILL.md](.claude/skills/obs-security-disclosure/SKILL.md)): upstream gets embargoed advisories only in the numbered encrypted archives tracked at , so never report one upstream yourself.
- Use `soldr cargo ...`, never bare `cargo`. `.claude/settings.json` wires `ci/hooks/tool_guard.py`, a PreToolUse hook that denies bare Rust tools and bare python/pip (clud sessions get the same rule from clud; `.clud/settings.json` turns on its soldr shims). It denies, after parsing the command: bare `cargo`, `cargo-clippy`, `cargo-fmt`, `clippy-driver`, `rustc`, `rustdoc`, `rustfmt`, `rustup`, `rust-gdb`, `rust-lldb`, `rust-analyzer`, `python`, `python3`, `pip`, `pip3`, also behind `FOO=bar`, `env`, `exec`, `sudo`, `time` or `bash -c`; text inside quoted arguments and heredoc bodies is never matched. Codex has no repo hook: follow the rule by hand. `ci/test_tool_guard.py` (part of `./lint`) also fails on bare Rust tools in `ci/` and `rust/tools/` shell scripts.
- GitHub GraphQL goes through `uv run --no-project --script ci/gh_graphql.py` (same `-f`/`-F`/`--jq` arguments as `gh api graphql`), which routes it through the [ghd](https://github.com/forge-ci/ghd) caching daemon so agents share one budget. `ci/hooks/tool_guard.py` denies a bare `gh api graphql`, even in clud sessions, and `ci/test_tool_guard.py` (part of `./lint`) fails one written into a script, skill or doc.
- Run Python through `uv run` (or `uvx`), never bare `python`/`python3`; standalone scripts use `#!/usr/bin/env -S uv run --script`. `ci/test_uv_run.py` (part of `./lint`) enforces it; see the testing policy's "Python runs through uv" rule.
- **Bump `rust/libobs-rust/Cargo.toml` in the follow-up PR to every stable release.** Nightlies are
`-beta.` and stables are ``, so a nightly only sorts *above* the stable it
descends from while the crate is ahead of that stable. The release `check` job enforces it
(`ci/check_release_version.py` refuses a version that does not sort after the newest stable), but
the fix is always the same: bump the crate, e.g. to `1.0.1` after shipping `1.0.0`.
- Pin `rust-toolchain.toml` to the latest Rust the CI soldr version supports natively, never beyond; bump it only after a soldr bump (see the testing policy).
- Never edit existing C tests or public C headers to make a port pass.
- Name crates, binaries and tags per
[docs/rust-port/naming.md](docs/rust-port/naming.md) (`ci/test_naming.py`
checks crates): `obs-` ports, product slug `obs-studio-rust`.
- Don't move upstream C/C++ files to restructure: the upstream tree
stays in place, Rust goes in the `rust/` workspace, and a fully ported C
component is deleted, not moved. The one allowed copy of its C is the
differential-test oracle under `rust/obs-c-oracle/legacy/` that the
testing policy requires (Tier 3). See the layout section of
[docs/rust-port/naming.md](docs/rust-port/naming.md) (#1051). The one
rename allowed is in place, to the build-role names of
[BUILD.md](BUILD.md) (`foo.c` to `foo.c.h`).
- Native C/C++/Objective-C builds follow [BUILD.md](BUILD.md): explicit unity
groups in each component's `build/`, one precompiled header per group
that is each implementation file's only include, unity and PCH always on
(`ci/test_build_groups.py`).
- C/C++ host code stays in OS-named files (`obs-nix.c`, `platform-windows.cpp`,
`win-capture/`, ...). Upstream files keep their names; new host files use
`hosts//` folders or `*-host-.c` files, `` one of `windows`,
`macos`, `linux`, `posix` (#1009). `ci/platform_ifdef_ratchet.py` (in `./lint`) fails a
new host conditional or OS header in a shared file, and a platform file that
names another OS. Shared libobs core calls host code through one interface
per capability in `libobs/obs-host/.h` (`OBS_HOST_EXTERN`); a
host implements it in its OS file, or its host file (`obs-nix.c.h`, ...)
includes `obs-host/noop/.hpp` for a capability it lacks.
- Host-specific code (`#[cfg(windows|unix|target_os..)]`, `cfg!()`, `std::os::*`,
`libc::`, Win32) goes only in the crate's `src/platform/` (single
`cfg_select!` in `platform/mod.rs`) or `src/ffi/`. A pre-expansion Dylint
(`dylints/ban_platform_cfg_outside_boundary`) fails `./lint` otherwise; see
the testing policy's "Platform boundary" rule.
- Start every task by fetching and rebasing onto `origin/master`
(`git fetch origin && git rebase --autostash origin/master`), so you build,
test and diff against current master. See
[coordination.md](docs/rust-port/coordination.md).
- Every port starts RED (failing test against stubs) and ends GREEN.
- Do not add new GitHub Actions workflow files without explicit sign-off.
- Packaging changes (`build-aux/appimage/`, the Flatpak manifest, anything that
decides what ships in a release artifact) must be covered by a test that runs
the packaged artifact the way a user does, including a saved profile with the
sources users depend on (screen capture, camera, microphone), not only a first
start with an empty profile. `build-aux/appimage/test-appimage.sh` is that test for the AppImage;
extend it when a change adds something loaded at runtime, and show it failing
without the change (obs-rust/obs-studio#426).
Security scans and release validation run nightly, outside PR/merge-group CI.
GitHub CodeQL default setup stays disabled. See the merge queue admission
policy in docs/ci-tooling.md before enabling CI integrations.
# Building C, C++ and Objective-C: unity groups and precompiled headers
This is the build policy for every first-party C, C++ and Objective-C
source in this repository (`libobs/`, `libobs-*/`, `frontend/`, `plugins/`,
`shared/`). It exists so the native build is as fast as we can make it while
staying correct on every platform and every CMake generator. Rust has its
own rules in [docs/rust-port/testing-policy.md](docs/rust-port/testing-policy.md).
Out of scope: third-party code (`deps/`), the git submodules
(`plugins/obs-browser`, `plugins/obs-websocket`), the unchanged C tests
(`test/`) and the C oracle (`rust/obs-c-oracle/`). They build the way their
upstream ships them.
## Why
Compiling one translation unit per source re-parses the same headers
hundreds of times. Measured on a fresh Linux tree (`-j16`, no compiler
cache):
| Build | Wall | CPU |
|---|---|---|
| One TU per source | 315 s | 2416 s |
| Precompiled headers | 322 s | 1798 s |
| Precompiled headers + unity | 198 s | 1053 s |
Those are broader native-build measurements, not isolated libobs timings.
A separate libobs-only experiment (GCC 15.2, RelWithDebInfo, `-j8`, three
trials per condition) measured uncached medians of 9.75 → 9.41 s wall and
63.48 → 46.62 s CPU; the wall-time ranges overlap. Warm ccache rebuilds
measured 1.54 → 1.44 s, with all cacheable compilations hitting. See the
[scoped results, raw evidence and reproduction commands](docs/ci-cache-audit-2026-10-17.md#isolated-c-libobs-build)
before applying either result to CI runner or full-app timing claims.
CMake's own `UNITY_BUILD` got us those numbers but batches sources by count
in list order. Each OS has a different source list, so each OS gets different
batches, and a name clash between two files appears only on the platform
where they happen to share a batch: Linux built clean while Windows failed
in `libobs-d3d11`, `nv-filters`, `text-freetype2` and `win-dshow` (#1128,
#1139). A precompiled header force-included in front of files that also
include their own headers hides what each file really depends on: a header
that only compiled thanks to the PCH broke on macOS alone, and a lean
`` from the PCH broke files that needed the full one on Windows
arm64. Per-file skip lists in CMake piled up to work around both.
The fix is to make the grouping and the headers part of the source tree
instead of build-system heuristics: the same files share a translation unit,
behind the same single header, on every compiler, OS and generator.
## The rules
### Dependency warning boundary (decision of 2026-11-06, #2625)
The maintainer decided: "Only strict settings for OUR headers and source.
third_party code is assumed working correctly and allows relaxed compiler
settings to allow it to pass. Make this a decision and put this in ci.yml."
First-party source and headers retain the full warning policy, including every
conversion group a target has enabled. Do not suppress diagnostics for a
first-party file to accommodate a dependency, or edit dependency code to make it
meet our warning policy. Dependency headers use CMake SYSTEM includes; imported
dependency targets retain CMake's default system-header treatment.
The concrete third-party paths, relative to the repository, are `.deps/**`
(downloaded dependency/Qt SDKs, including AMF, FFmpeg and bundled SIMDe),
`deps/**` (vendored libraries, including a SIMDe checkout placed there), and
`plugins/decklink/{linux,mac,win}/decklink-sdk/**`. A dependency remains third
party when vendored inside this repository. The browser and WebSocket git
submodules keep their own build policy. Everything else in the source tree is
first party unless a later reviewed decision explicitly extends this list;
in particular `libobs/`, `frontend/`, `shared/`, generated OBS headers, and the
rest of `plugins/` must never be made SYSTEM roots. Externally installed SDKs
are consumed through imported dependency targets, not by marking an OBS root
SYSTEM.
`cmake/third-party-headers.cmake` classifies the completed native and cross
target graphs. It keeps the original include lists and warning flags, marks
only dependency include directories SYSTEM, and propagates that classification
from vendored libraries to their consumers. Unknown generator expressions stay
strict; build-interface and simple conditional paths are classified explicitly. Resolved symlinks into
first-party directories are not exempt. CMake searches SYSTEM directories after
ordinary directories, so verify header resolution and generated code when
changing this boundary. Include dependency headers through their dedicated
SYSTEM include roots with angle brackets, including vendored dependencies;
spelling them through the ordinary repository root would bypass the exemption.
This dependency rule is an exception to the repo-root spelling rule below.
This decision is enforced by `ci/test_cross_conversion_ratchet.py`, including
a real compile that accepts a conversion in a dependency header and rejects one
in a first-party header. It runs in the existing required `ci.yml` path:
`Format 🔍 / checks` → `ci/ Self-Tests 🧪` → `ci/local_gate.py --only self-test`.
`CI Gate ✅` requires the Format workflow. "Put this in ci.yml" means enforcement
through that existing job; it does not require another workflow step or a change
to the external `zackees/ci.yml` policy repository.
### 1. File names say the role
| Role | C | C++ | Objective-C | Objective-C++ |
|---|---|---|---|---|
| Implementation (the code) | `foo.c.h` | `foo.cpp.hpp` | `foo.m.h` | `foo.mm.hpp` |
| Group (what the build compiles) | `name+.h.c` | `name+.hpp.cpp` | `name+.h.m` | `name+.hpp.mm` |
| Precompiled header | `family.pch.h` | `family.pch.hpp` | `family.pch.h` | `family.pch.hpp` |
| Header (declarations) | `foo.h` | `foo.hpp` | `foo.h` | `foo.h` |
An implementation file is ordinary source; the build reaches it only through
a group. C-family files end in `.h` and C++-family files in `.hpp` because
tools pick the language from the last extension: clang-format formats a
`.hpp` as C++, where names C code uses (`private`, `new`) are keywords. Group files and precompiled headers live in a `build/` directory
next to the component's `CMakeLists.txt` (`libobs/build/`). A group contains
its precompiled header, then its implementation files in alphabetical order:
```c
/* libobs/build/libobs.util+.h.c */
/* Unity group (BUILD.md): util/ and callback/. */
#include "libobs/build/libobs.pch.h"
#include "libobs/callback/calldata.c.h"
#include "libobs/callback/decl.c.h"
#include "libobs/util/cf-lexer.c.h"
```
Every quoted include of a repo file in a group, a precompiled header, an
implementation file or a forwarding file is a repo-root path
(`plugins/obs-ffmpeg/obs-ffmpeg-formats.h`), never one relative to the file
(`../obs-ffmpeg-formats.h`): a line reads the same wherever it is, and moves
with no rewriting. `cmake/common/groups.cmake` makes the repo root an include
directory of every target. Headers found through a target's own include
directories (``, `"util/base.h"`) keep their usual form.
### 2. One header per group, and it is the only include
Every implementation file includes exactly one header: its group's
precompiled header, as its first line.
```c
/* libobs/util/cf-lexer.c.h */
#include "libobs/build/libobs.pch.h"
static inline void cf_convert_from_escape_literal(...)
```
Everything a file needs (system headers, the component's own headers, the
feature macros that must precede them such as `_FILE_OFFSET_BITS` or
`WIN32_LEAN_AND_MEAN`, and the platform conditionals around them) lives in
that header, in the order the files need it. A file's own macros (`do_log`, a
`FALLBACK_FRAMERATE`) stay in the file, right after its include: only the
macros that set up headers move. A header that defines macros of its own
(obs-outputs' `rtmp-stream.h` defines `do_log`) puts its includers in a
family of their own, and a header that defines data (`mp4-mux-internal.h`)
stays out of headers the C tests compile more than once. So the precompiled header is
exactly what its files depend on, every member of a group sees the same
thing whether it is compiled in the group or alone, and nothing is
force-included in front of anything.
Groups share a header when their files need the same things (all of
libobs's core groups use `libobs.pch.h`), which is what makes precompiling it
pay. A group gets a header of its own where its dependencies differ:
- third-party headers some files must not pull in (FFmpeg for
`libobs-media.pch.h`; the Rust-ported files, which the C oracle and the C
tests compile on their own, have `libobs-ported-*.pch.h` without them),
- a platform (`libobs-windows.pch.h`, `libobs-nix.pch.h`), named so
`ci/platform_ifdef_ratchet.py` sees its host,
- an optional feature (`libobs-pulse.pch.h`, `libobs-wayland.pch.h`),
- a feature macro that must come first (`libobs-platform.pch.h` for
`_FILE_OFFSET_BITS`, `libobs-ported-posix-threading.pch.h` for
`_GNU_SOURCE`),
- a different `` (lean or full).
One language per group: C, C++, Objective-C and Objective-C++ files never
share one. Platform-only groups are listed in the component's
`cmake/os-.cmake` like any platform source, with no `#ifdef` choosing
between groups.
Two exceptions, both after the code starts:
- **No-op host capabilities** (`libobs/obs-host/noop/.hpp`,
#1051) are headers, not group members: each host file
(`obs-nix.c.h`, `obs-windows.c.h`, `obs-cocoa.m.h`) includes the
ones for the capabilities it lacks, at its end.
- **X-macro tables** (a header without `#pragma once` or an include guard,
such as `obs-hotkeys.h`) included as data.
A C test that `#include`s a source file by its old name (`#include "media.c"`)
keeps working through a one-line forwarding file left at that name
(`media.c`: `#include "shared/media-playback/media-playback/media.c.h"`). The build never compiles it, and the
unchanged C test needs no edit.
### 3. Unity and precompiled headers are always on
Converted components build one way: each group is one translation unit, and
the header most of a target's groups share is precompiled (per language; on
Xcode, which allows one prefix header per target, for the language with the
most groups). A group of another family includes its header textually.
`ENABLE_UNITY_BUILD` and `ENABLE_PCH` only steer components not yet
converted.
A target that compiles one implementation file directly (a C test pinning a
single libobs file) compiles a generated one-line wrapper with a real
extension that includes it (generators, Xcode among them, take a source's
type from its extension), with the owning target's include directories,
since its header comes from there.
### 4. Every implementation file is in exactly one group
A file in no group silently drops out of the build; a file in two defines
its symbols twice. It may be in several groups only when each is for a
different host. `ci/test_build_groups.py` (part of `./lint`) checks this,
the shape of every group, and rule 2. New code joins a group in the same
commit that adds the file.
### 5. Names that are file-local must be unique within a group
Inside a group, every implementation file shares one translation unit, so:
- `static` functions and variables, file-scope `enum` enumerators and
anonymous-namespace names get a prefix from their file
(`od_` for `obs-output-delay`, `compressor_` for the compressor filter).
An anonymous namespace does not help: the files share it.
- A file-scope `#define` is `#undef`ed at the end of the file
(`ci/test_build_groups.py` checks it; a macro a header provides may be
restored there instead). A macro that
shadows a system name (`near`, `far`) is saved and restored with
`push_macro`/`pop_macro`.
- Default arguments are declared once, in the header.
- Headers have `#pragma once` and are never duplicated under two paths (a
copy forwards to the original).
- No `using namespace std;` in a group whose header brings in global names
`std` also declares (`byte` from the Windows SDK): qualify instead.
When a clash is cheaper to isolate than to rename (two backends that
deliberately define the same functions, a vendored fork), the file gets its
own group. That is the only exemption, and it lives in the source tree, not
in CMake.
### 6. Renames are mechanical and in place
Turning `foo.c` into `foo.c.h` keeps the directory and the stem, so
`git log --follow`, `git blame` and merges from `upstream/master` follow
the file. Each component converts in its own PR with this order of commits:
1. Only `git mv` of the implementation files (no content change), so rename
detection is exact.
2. The groups, their precompiled headers (each file's includes moved into
its group's header), the CMake change, and path updates in `ci/`, the
platform-ifdef baseline, the C tests' CMake and `rust/` (oracle includes).
3. Any clash fixes.
When an upstream merge adds a new `foo.c` to a converted component, rename
it, move its includes into its group's header and add it to a group in the
merge PR.
The libobs source sets are one JSON list per set,
`libobs/build/source-sets.d/.json` (`LIBOBS_SOURCES.json`,
`LIBOBS_WINDOWS_PORTED_SOURCES.json`, ...; #3235). A change edits only the
lists it touches, and a host set's file name carries its OS token
(`WINDOWS`, `MACOS`, `LINUX`, `NIX`, `PULSE`, `WAYLAND`), so
`ci/platform_paths.py` selects that OS's CI lanes for it while a shared set
selects what any libobs file does. Adding a set means adding its file (CMake
re-runs configure through the `CONFIGURE_DEPENDS` glob) and the code that
consumes it.
A newly ported libobs unity group can register itself in
`libobs/build/ported-source-sets/.json` with the same
`LIBOBS_*_PORTED_SOURCES` keys as the set files. The CMake,
Cargo-native and Tier 2 inventory readers discover these fragments, so two
ports can add their own files without editing the same ported-source list.
Keep each member in exactly one list or fragment.
A port edits only its unit file, never `libobs/CMakeLists.txt` or
`libobs/cmake/os-.cmake` (#3236; `ci/test_port_unit_metadata.py`
checks it). Besides its set keys, a unit file takes two optional fields,
which `libobs/cmake/sources.cmake` applies:
```json
{
"LIBOBS_PORTED_SOURCES": ["build/libobs.ported-audio-resampler-drift+.h.c"],
"compile_options": {"gnu": ["-ffp-contract=off"], "msvc": ["/wd4996"]},
"headers": ["media-io/audio-resampler-drift.h"]
}
```
- `compile_options`: flags appended to each of the unit's groups, per
compiler family: `gnu` (GCC, Clang, AppleClang; C and Objective-C) or
`msvc`.
- `headers`: headers (relative to `libobs/`) listed on `libobs-objects`
wherever one of the unit's sets is built; the Linux and FreeBSD host files
share one `libobs_add_ported_sources()` call per optional set, so a
port no longer edits both.
The Cargo-native build and the Tier 2 inventory read the set keys and ignore
these fields. Settings for a whole target (warning pins, definitions) stay in
the CMake files.
libobs's groups are partitioned into lib-modules, the unit the module
cache of #3256 compiles, caches and relinks:
`libobs/build/modules.d/.json` gives a module's groups as
`fnmatch` patterns on the group name (`core`, `nix-*`, `ported-*`) and
the modules it `depends` on. Patterns keep a new group from editing a
central list: a new `ported-foo` group is already in `ported`. A new
non-matching group goes into the module whose code it is.
`ci/test_build_groups.py` checks that every libobs group is in exactly one
module, that every pattern still matches a group, and that the
dependencies exist and form no cycle (#3258). `libobs/cmake/modules.cmake`
compiles each module into a static archive, `libobs-mod-`, linked
whole into libobs (#3259, #3261).
`ci/libobs_modules.py` caches those archives (#3262). A module's key covers
its compile commands (build dir and compiler launcher left out), every file
its groups read (the preprocessor's `-M -MG` list) and the compiler version.
On a configured tree:
```sh
uv run ci/libobs_modules.py restore --build # copy hits, write hits.cmake
cmake -B -DOBS_LIBOBS_MODULE_CACHE=/libobs-modcache
cmake --build --target libobs
uv run ci/libobs_modules.py store --build # cache the modules built
```
A hit is an IMPORTED archive, not compiled. An unbuilt `-keyprobe` target
keeps its compile commands visible, so the next `restore` sees an edit and
drops the hit. Run `restore` before each build. The cache dir is
`$OBS_LIBOBS_MODULE_CACHE_DIR`, else `modcache` beside the zccache root.
MSVC compile commands are not keyed yet.
The Rust staticlib (`libobs-rust`) is one more cached module (#3265). Its key
covers `libobs-modcache-rust.json` (the features, triple, profile and C
compiler that `libobs/cmake/rust.cmake` records), `Cargo.lock`,
`rust-toolchain.toml`, `rustc -vV`, `RUSTFLAGS`, gio's pkg-config version,
and every file of the path crates `libobs-rust` depends on, found by
walking their `Cargo.toml` files, except `tests/` and `benches/`. It also
covers the files outside those crates that their build scripts read. On a hit,
libobs links the cached archive with Corrosion's link libraries and cargo
does not run.
## Verifying a change
- Linux: `./unittest` and the local gate as usual; `./lint` runs
`ci/test_build_groups.py`.
- Windows and macOS from Linux: `cmake/cross` (soldr's clang with the
Windows SDK and the Apple SDK) builds libobs and the platform plugins
through the same groups. Extend it when a component converts.
- A change to `cmake/common/`, `cmake/pch/` or a precompiled header itself
must pass a full Windows and macOS build
(`gh workflow run ci.yml --ref `, which runs every build) before
it merges. PR CI never builds the OBS apps: `cmake/common/` starts only
the macOS and Windows Rust tests and Tier 2, `cmake/pch/` starts nothing
beyond the Fast Gate, and a `libobs/build/` file starts Linux Tier 2. A
port that only adds its source's `#include` to a `ported-*` group does
not need the manual run.
- `cmake/common/` stays host-neutral (#3234, `ci/test_cmake_common_os_neutral.py`):
no `OS_` branch, MSVC generator expression or `CMAKE_OSX_*` /
`CMAKE_VS_*` read outside `osconfig.cmake` and `soldr.cmake`. Host-only
logic goes in `cmake/windows/`, `cmake/macos/` or `cmake/linux/`, which start
only their own OS lane; a common helper that needs a host variant defines
a neutral default the OS module redefines after including it (for example
`_obs_architecture_matches`, `obs_msvc_exempt_c4201`,
`_obs_dependency_platform_hook`).
## Transition
Components not yet converted still build with CMake's `UNITY_BUILD`
batching, the shared headers in `cmake/pch/` and the skip lists in
`cmake/common/unity.cmake` and `cmake/common/pch.cmake`. Those lists only
shrink: a new entry means the file's component should be converted instead.
When the last component converts, the batching, `cmake/pch/` and the skip
lists are deleted. Order: `libobs/` (done), then `libobs-*/`, `shared/`,
`plugins/`, `frontend/`.
OBS Studio Contribution Guidelines
============
> [!IMPORTANT]
> These guidelines are subordinate to the [Constitution of the obs-rust Project](https://github.com/obs-rust/constitution/blob/main/CONSTITUTION.md), which supersedes them and every other project document. They cover technical practice only. The Constitution replaces the former Code of Conduct.
OBS Studio accepts contributions via public **pull requests**, which encompass changes made to the project as well as a written description of the changes made and the motivation behind them.
Pull requests can be opened by any user with sufficient contribution permissions on the platform chosen by the project. Likewise, any user with sufficient access permissions is able to read, comment, and suggest changes to a pull request, but the ultimate decision for or against adopting the suggested changes lies with **project members**.
OBS Studio has shown steady growth of popularity, complexity, and scope throughout its existence. Contributions that demonstrate they have taken the aspects outlined in this document into account (including the impact to the maintainability of the project) will potentially, but not necessarily, have a higher chance of adoption.
> [!NOTE]
> Past acceptance of a change, including “prior art” that exists in the codebase, does not guarantee that future, similar, changes will be accepted, as the “state of the art” (code style guidelines, best practices, language standard) is constantly evolving and the project consciously chooses to evolve with them.
These guidelines attempt to provide a set of general rules that any contributor can choose to follow and implement before opening a pull request to reduce review effort and increase its chances for adoption.
## General Contribution Guidelines
The canonical language used by the project is “American English”, which mainly applies to source code and non-translated material. Examples include:
* Commit messages
* Names of constants, variables, and types
* Source code comments
* File names
Appropriate templates are presented to the user when opening a new issue report or pull request on GitHub which are required to be fully filled out to be taken into consideration by the project.
The template might require checking off items that might not be applicable e.g., the requirement to have the code properly formatted does not apply when the contribution has not changed any source code. **It is permissible and preferred to tick the box regardless**.
Participation in this project is governed by the [Constitution of the obs-rust Project](https://github.com/obs-rust/constitution/blob/main/CONSTITUTION.md).
## Pull Request Review Guidelines
In general reviews of pull requests are not limited to project members and can be undertaken by contributors and other GitHub users. Project members commonly coordinate reviews of pull requests at their own discretion in line with project needs and available bandwidth.
To reduce possible friction of the review process, a simple set of rules should be followed:
* **Do not** request reviews from specific community or project members yourself.
* It is permitted to ping other GitHub users to notify them of a PR and kindly ask them if they are willing (and able) to review it, all within reason.
* Reviewers might leave comments or ask for changes on specific lines of changed code. Once the comment has been addressed **do not unilaterally resolve** the comment.
* It is entirely the reviewer's decision whether they would consider the changes to be sufficient to address their concerns. Just having addressed a comment, does not resolve it.
* As a reviewer, make sure to regularly review the comments received on your reviews, check the code changes, and resolve your comments once they have been addressed. **Don't leave pull request authors hanging.**
* Project members will usually ping reviewers about unresolved review comments and resolve such comments themselves to unblock PRs from being merged.
* When addressing review comments through code changes, prefer adding commits over force-pushing rewritten history, so reviewers can see what changed since their review.
* This is about the history reviewers read, not about keeping the PR branch current: rebasing onto master when GitHub reports a conflict, and the coordinator's rebases of ejected, stacked or about-to-land PRs, are expected (see [coordination.md](docs/rust-port/coordination.md), section 4). The merge queue squash-merges each PR, so master gets one commit per PR either way.
## Commit Authoring Guidelines
The project uses the “50/72” standard for commit messages, which requires that a commit title uses no more than 50 characters, while any consecutive line used for the commit description is allowed to use a maximum of 72 characters (with long lines manually broken up).
The “anatomy” of a correct commit message with description looks like this:
```
prefix: This is a commit title using 50 characters
This is a commit description line that is allowed to use up to 72 chars
```
Prefixes are commonly defined by the “module” the commit applies changes to, which has repercussions as to how commit contents are authored (see below).
* Changes made to code for “libobs” should use the “libobs” prefix, similarly changes made to “obs-ffmpeg” use “obs-ffmpeg”.
* Changes made to multiple modules in the “plugins” directory can use the “plugins” prefix, particularly if the changes are of a similar nature
* Changes made to files involved in continuous integration (CI) should use the “CI” prefix regardless of the directory name.
* Changes made to files used by the CMake build system should use the “cmake” prefix”
When in doubt about what the correct prefix for a change might be, the existing commit history might be of help, however project guidelines might have changed in the interim and thus a “past” commit message might not be acceptable for new contributions.
### Commit Messages
The commit message is the primary place for documentation of changes, not only as a summary of “what” was changed, but even more importantly “why” the changes were made and “why” specifically in the way they have been made.
As such the commit message should be written in such a way that it could easily pass as the “Description” and “Motivation and Context” required when opening a new pull request (and indeed platforms like GitHub will automatically copy the commit message into the opening post for a pull request with a single commit).
This ensures that documentation and context are encoded within the source tree and do not require external documents or platforms to ensure this information is not lost.
Many of these ideas match the ideas outlined in https://chris.beams.io/git-commit.
### Commit Content Authoring Guidelines
#### Code Style
All code contributions to the project need to follow code style guidelines appropriate to the languages used by the changed files. For C and C++ the project has chosen to adopt well-established code style guidelines as its baseline with specific exceptions and changes outlined in a [separate document](https://github.com/obsproject/obs-studio/blob/master/CODESTYLE.md).
The baseline rules for the common languages used by the project are:
* C code needs to follow the Linux Kernel Coding Style (https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst)
* C++ code needs to follow OBS Studios’ style guide. Familiarity with the Google C++ Style Guide (https://google.github.io/styleguide/cppguide.html) can serve as a baseline.
* Objective-C and Objective-C++ code needs to follow Apple’s ObjectiveC Conventions (https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html)
* Swift code needs to follow the API Design Guidelines (https://www.swift.org/documentation/api-design-guidelines/)
* **The column size limit for all code is 120 characters**
To help with the formatting of code, the project contains configuration files for code-formatters of several languages:
* `clang-format` can be used to correctly format C, C++, Objective-C, and Objective-C++ soure code
* `swift-format` can be used to correctly format Swift source code
* `gersemi` can be used to correctly format CMake source code
> [!NOTE]
> The “build-aux” directory in the project’s root directory contains scripts that can automate this process and are used by the project’s CI infrastructure to automatically check all contributions that changed corresponding source code files.
#### Commit Contents
The changes contained in a commit should attempt to represent logical “units of change” that make sense in isolation and do not necessarily require any preceding or following commits to work. Indeed if a single commit would potentially leave the project in a broken state (e.g., the project cannot be compiled, the application not run, or basic application functionality cannot function) then it is not a full “unit of change”. The accepted exception is a RED commit: under the [testing policy](docs/rust-port/testing-policy.md) a port or fix first commits a failing test, then the GREEN commit that makes it pass.
* Changes to misspelled words or purely aesthetic changes should in principle not be individually capable of breaking the project in such a way and are permitted to be grouped into a single “large” commit
* If a larger change requires some foundation of fixes to the existing code to make sense, those fixes represent a “unit of change” that should be decoupled from the functional changes made on top of them. Even better, such a change should be encapsulated in its own, separate, pull request.
> [!IMPORTANT]
> During review and collaboration the need for additional changes can arise quickly. It is permitted (and preferred) to temporarily ignore these guidelines to quickly provide changes required to address review comments and add many small, iterative, commits to the pull request.
>
> Once all review comments have been addressed, fold the review fixups into the commits they belong to, but keep the RED and GREEN commits separate; do not squash them together. The merge queue squashes the PR into one commit on master.
#### Co-Authorship
Sometimes an open pull request might have been "lost to time" even though its contents might still be a meaningful and positive change. When picking up such a change and authoring a new pull request to "finish it", the original author should be retained as much as possible:
* The original commit can be cherry-picked, which will retain the author information and only change the committer information
* If the original commit needs to be adjusted and changed as it will not apply to an updated code-base, its original author should be added as a "Co-Author" to the commit message.
```
libobs: Refactor audio implementation
Additional commit description
<..>
Co-authored-by: Name
```
## Tools and Authorship
Contributions are judged on their merit alone, whatever tools were used to produce them, including AI assistants (Article III of the Constitution). The contributor is responsible for everything they submit: it must be correct, reviewed, tested to the standards in this document, and license-compatible. Submissions that fail those standards are rejected on those grounds.
# Security policy
obs-rust is a fork of OBS Studio that is being converted to Rust. This
policy covers obs-rust: this repository's code, its CI, and the builds
it publishes. The upstream OBS Project has its own policy and channels
(see [Upstream OBS Studio](#upstream-obs-studio)).
## Two tiers
OBS Studio is a desktop application. Its user already runs it with
their own privileges, and it does not run as a public server. So most
bugs are not security issues, even memory bugs. What decides the tier
is who can reach the bug.
| Tier | Who can reach the bug | Where it goes |
|---|---|---|
| **Low risk** | Only trusted input: the local user's own actions, settings, scene collections and profiles, installed plugins and scripts, tests | A normal public issue and PR, like any other bug |
| **High risk** | A remote party: a streaming or WHIP server, a web page in a browser source, media files or streams from the network, an obs-websocket client, a scene collection or profile someone else sent. Also any bug that leaks credentials (stream keys, OAuth tokens, passwords) to another user or over the network | A private security advisory (below) |
When you are unsure, report it privately. A maintainer moves a report
that turns out to be low risk to a public issue, and tells you.
## Low risk: report it in public
Open a bug issue, or a PR with a failing test and then the fix, as
[docs/rust-port/coordination.md](docs/rust-port/coordination.md) says.
Use the title `bug: : ` with the bug class (for
example use-after-free) in the symptom, so it can be found later. It may
carry the `security` label. No advisory is needed.
## High risk: report it privately
**Do not open a public issue, pull request or discussion for a
high-risk vulnerability.**
1. Open the repository's **Security** tab and choose **Report a
vulnerability**
().
2. Say what is affected (file, function, build or release), who can
reach it, how to reproduce it, and what an attacker gains. A short
proof of concept helps.
3. If you already have a fix, say so. A maintainer will open a
temporary private fork on the advisory, and you can push the fix
there. Do not push it to a public branch or fork.
**Who can see it.** A private advisory and its private fork are visible
only to the repository administrators, the members of the
`security-maintainers` team (which has GitHub's security manager role
for the organization), the reporter, and the people a maintainer adds
to that advisory. Other contributors, including other agents, do not
see it until it is published. Maintainers add a collaborator to an
advisory only when that person works on its fix.
## What happens next (high risk)
- **Within 72 hours:** a maintainer acknowledges the report on the
advisory.
- **Triage:** we confirm the issue and agree on its severity (CVSS)
with you, on the advisory.
- **Fix:** the fix is developed and reviewed in the advisory's private
fork. It follows the normal rules for this repository: a failing test
that shows the bug first, then the fix (see
[docs/rust-port/testing-policy.md](docs/rust-port/testing-policy.md)).
- **Before publishing:** a maintainer checks each of these and records
it on the advisory:
1. **Read the whole comment thread**, not only the description. The
reporter may have added findings since the report. Comments close
when the advisory is published, so this is the last chance to
answer them privately.
2. **Every path in the report is fixed**, not only the first one. Run
each reproduction in the report (every variant: each function,
each code path) against current master, and name the PR that fixes
each one. A fix that landed outside the advisory, in a public PR,
counts only after this check.
3. **The reporter confirms the fix** on the advisory. If they have not
answered within 72 hours of being asked, publish anyway and say
so.
If any check fails, the advisory stays private and the remaining
part is fixed first.
- **Release and disclosure:** we merge the fix, publish the advisory
(requesting a CVE where it applies), and credit you unless you ask us
not to. We aim to disclose within 90 days of the report, sooner once
a fixed build is out.
After disclosure, any public follow-up work (hardening, regression
tests, release notes) is tracked in normal issues with the `security`
label. The label is never used for an undisclosed high-risk
vulnerability.
## Upstream OBS Studio
Much of obs-rust's C/C++ code comes from OBS Studio. If a vulnerability
also affects upstream OBS Studio:
- Report it to obs-rust as described above. **Do not report it upstream
yourself**, and do not discuss it on an upstream issue.
- obs-rust discloses to the OBS Project in a coordinated way. Embargoed
advisories go to the OBS Project in numbered, AES-256 encrypted
disclosure archives. The maintainers send each archive's link, and its
password over a separate channel. The OBS Project reviews and fixes
first, and both projects then publish on an agreed date. The public
tracker at shows each archive, its
SHA-256 and aggregate counts, but never the title or id of an
embargoed advisory.
- An advisory goes into the first archive cut after it is created. A fix
found after its archive was sent goes out as an update in the next
archive. You are credited in the archive unless you ask us not to.
- If you have already reported it upstream, tell us, so that the two
reports share one disclosure date.
Agents follow the `obs-security-disclosure` skill
([.claude/skills/obs-security-disclosure/SKILL.md](.claude/skills/obs-security-disclosure/SKILL.md))
for every step after triage.
A bug that affects only upstream OBS Studio, and not obs-rust, should
go to the OBS Project directly: .
## Scope
In scope:
- Code in this repository, including the Rust ports, the C/C++ code
inherited from upstream, plugins and scripting.
- Network-facing interfaces, such as the obs-websocket server, RTMP,
SRT, WHIP and other outputs, and media inputs that parse files or
streams.
- Builds and release artifacts published by this repository (AppImage,
Flatpak, DMG, Windows packages) and the CI that produces them.
Out of scope:
- Attacks that require physical access to the device, or that require
the victim to install non-standard software or take active steps to
make themselves vulnerable (this includes DLL planting).
- Reports from automated tools or scans that have not been checked by
hand.
- Vulnerabilities in third-party dependencies that obs-rust does not
change. Report those to the dependency's maintainers; tell us as
well if obs-rust ships an affected version.
## Safe harbor
We will not pursue or support legal action against research done in
good faith under this policy. Good faith means avoiding privacy
violations, data destruction and service disruption, testing only
against your own installations, and keeping details confidential until
the advisory is published.
## No bug bounty
obs-rust does not offer payment for reports.
OBS Studio Code Style Guidelines
================================
The project requires all contributions to have their source code formatted using appropriate formatting tools to reduce the potential impact of stylistic changes to a structured “diff” view of code.
In addition to those automatically enforceable stylistic choices the project also prefers contributions to follow a set of architectural guidelines that are chosen to reduce undefined or unexpected behavior and make code easier to reason about during reviews or maintenance.
## Reducing Potential For Errors
The following guidelines have been established as good practices to reduce some common potential for errors or naive coding practices that have lead to such errors in the past:
* **Always Initialize Variables** - Depending on the programming language, language standard, compiler, and platform, rules for when and how variables are initialized automatically might differ. Thus some variables might have random values at program start and naive code might interpret any value but “0” to mean “correctly initialized” and run into unexpected behavior.
* Do not declare or initialize multiple variables on the same line, do not mix declarations and initializations
```C
int i, v = 0; // BAD - v is initialized to 0, i is uninitialized
int i = 0; // GOOD - i is explicitly declared and initialized
int v = 0; // GOOD - v is separately declared and initialized
```
* **Do not use “0” as a valid enumeration value by default** - in many cases an enum requires an explicit choice to be made (only one value of a set of “valid” values can be set) and “not making a choice” should not be considered valid
```C
enum state { ACTIVE, // BAD - zero-initialized enum potentially
INACTIVE, // leads to implicit state changes.
DELETED
};
enum state { INVALID, // GOOD - zero-initialized enum produces
ACTIVE, // an invalid value by default, avoiding
INACTIVE, // an implicit state change.
DELETED
};
enum state { ACTIVE = 1, // GOOD, zero-initialization fails because
INACTIVE = 2, // it’s not a valid enum value to begin with.
DELETED = 3
};
```
* **Use natural language for variables and types** - expressive code is easier to reason about for maintainers and reviewers and also reduces the mental burden when returning to the same code after even a short absence, as code “says what it does” and variables “tell what they represent”.
```C
int c = 1; // BAD: What does “c” represent?
int count = 2; // BAD: Count of “what”?
int num_bytes = 3; // GOOD: “Num(ber) of bytes”
bool valid; // BAD: Meaning is ambiguous
bool has_valid_key; // GOOD: Describes state of element in an object
bool is_valid; // GOOD: Describes state of element itself
bool did_send_packet; // GOOD: Describes state of transaction.
float dur = 1.0; // BAD: Unit of duration unknown
float duration_ms = 5.0; // GOOD: Unit of duration encoded within name
// GOOD: Function signature communicates the unit of the delay explicitly.
start_transition_with_delay(transition_type *transition, float delay_ms);
```
* **Use compound types rather than individual variables** - information like the size or dimension of an object, a timescale, a position in space, should be logically encoded in a compound type and only “unwrapped” when consumed
```C
// GOOD: Function signature communicates the unit of the delay explicitly.
start_transition_with_delay(transition_type *transition, float delay_ms);
// EVEN BETTER: Time values encoded as pieces of a fraction (1/1000th of a
// second representing a “microsecond”) and explicitly passed to
// the function.
typedef struct {
int_64_t time_value;
int_32_t time_scale;
} time_unit;
start_transition_with_delay(transition_type *transition, time_unit delay);
// BAD: Behavior encoded in unrelated booleans, maybe even conflicting
start_transition(transition_type *transition, bool ignore, bool abort);
// GOOD: Function signature requires more meaningful enum rather than bool
enum transition_abort_mode {
TRANSITION_ABORT_INVALID, TRANSITION_ABORT_ALL,
TRANSITION_ABORT_NEW, TRANSITION_ABORT_NONE
};
// Signature:
start_transition(transition_type *transition, enum transition_abort_mode);
```
* **Do not use unnecessary abbreviations** - if a class implements an "Advanced Output", call it AdvancedOutput, not AdvOutput. The same applies to variables holding an instance of the class. Code is read more often than it is written (and indeed the writing part is just the final outcome of a much longer reasoning process) and optimising for the latter incurs a debt on the former.
* **Name functions after what they do rather than how they do it** - a function’s signature is effectively its “interface” and should provide a hint about which functionality it provides to the caller. The actual implementation should not be relevant to the caller and exposing this information can actually have a net-negative effect as the caller might try to “out-think” the API.
* **Prefer pure functions and non-mutable variables** - side-effects are harder to keep track of and can lead to confusing results, particularly when following the prior rule. This also ties into a later rule about avoiding global scope, as global (and shared) variables tend to encourage writing code that surreptitiously changes global shared scope, which makes code harder to test and reason about.
> [!NOTE]
> This obviously does not apply to methods where the implementation detail is a technical need of the API user e.g., for factory methods where the user has data in a specific place that it needs to be loaded from, such as `MyData::loadFromUrl(const std::string &url)` or `MyData::loadFromFile(const std::filesystem::path &path)` where the “what” is essentially intertwined with the “how”.
* **Do not use specific integer types outside of binary protocols** - for the vast majority of cases using an “int” is sufficient and using a signed type also prevents unexpected overflow issues where a small negative number becomes a massive positive number. Use sized types (and unsigned types) when interacting with binary protocols, bitfields (e.g. to explicitly remove any special meaning from the most-significant bit). Prefer 64-bit integers over unsigned 32-bit integers for large numbers.
* **Do not micro-optimize and do not attempt to be overly "clever" with an implementation** - to quote Kernighan:
> Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?
* **Use profiling tools to identify actual opportunities for optimization** - the code that the compiler generates can potentially work in different ways than the source code might suggest and might not even be executed in the same order. Premature optimizations might also prevent the compiler from applying its own, leading to slower code overall. Also be mindful of profiling tools themselves potentially influencing the runtime behaviour of code.
* **Attempt to actively break code during testing** - do not rely on “happy paths”. Try to be creative and come up with ways to break the assumptions your code might have made. Do not rely on assumptions that data will never be “wrong” or that some other data will always be “there”. As the ISO C++ FAQ calls it:
> Write code that is guaranteed to work, not code that doesn’t seem to break.
* **Write code that will be reasonably easy to understand even 6, 12, or 24 months later** - while it is easy to reason about the state of a program while working on it, much of that “inside knowledge” might be gone even a few weeks later. Writing code that is obvious in what it does (and also why it does certain things and which pieces of data it requires) will make it easier to get back into the mental model behind the code. **Write code so that any newcomer to the project will have a reasonably easy time understanding what it does and why it does it the way it’s implemented.**
* **Do not rely on global state or singletons** - both are easily abused as shortcuts to avoid implementing a more expressive and safer design. There are valid use cases for global state (like a global “application” instance implemented as a singleton) but those are the exception and not the rule.
* **Treat programming as a mental exercise and not just as text manipulation** - existing code in particular will have been designed and built with a set of assumptions and theories in mind, which themselves informed the architectural choices made in its implementation. Some changes might seem “quick and easy” but potentially violate those architectural assumptions and thus could leave the code in a precarious state (and indeed might lead to undefined behaviour when yet other code relies on these assumptions not to be violated).
The last point cannot be overstated because it is a common source of friction in long-lived software projects. **Neither source code nor documentation can be a full representation of the “theory” behind the code** and indeed both can never be more than an incomplete “snapshot” of one possible implementation of this theory.
But without a decent understanding of the theory behind the code (or the architectural concerns that went into the current design) one cannot correctly ascertain which changes will be “in line” with the way current code works and might instead violate important principles of it.
And the more such “naive” code (mainly in the form of hacks and workarounds) is piled on, the more difficult the code becomes to work with, culminating in a code base where even shipping “simple” new features becomes a tough exercise (as the code starts to behave in unpredictable ways due to all the violations of the original “theory”).
> [!NOTE]
> This principle becomes more obvious with less abstract examples: An image-editing program will have a set of considerations and constraints that went into its design (code and user interface) and just adding the ability to decode video files will not make the program able to edit video, which is an entirely separate discipline with potentially opposing needs and considerations.
>
> And indeed any new feature added to the photo editor now has to potentially contend with the reality that it might be faced with a video file instead, adding even more bits and pieces to unrelated parts of the program to handle a scenario the foundation of the program was conceptually (and explicitly) not built for.
## Language Specific Guidance
OBS Studio currently contains code written in the following languages:
* C
* C++
* Objective-C/C++
* Swift
* CMake
Continuous integration code is mostly based on Powershell, Zsh or Bash scripts, and Python 3.
While C++ and ObjectiveC/C++ are supersets of the C language, the project prefers to treat them individually with their own rules, conventions, and language standards. Thus rules that apply to “C” do not necessarily apply to these languages and indeed some rules will be replaced for those languages.
### C
For “pure” C code the project follows the Linux Kernel Coding Style (https://github.com/torvalds/linux/blob/master/Documentation/process/coding-style.rst). Parts of the guidelines that relate to Emacs, kernel-level allocators, or macros only available in the Linux kernel source code do not apply.
> [!IMPORTANT]
> The current C language standard of the project is **C17 without GNU extensions**.
Some additional notes:
* Formatting is checked and can be applied by `clang-format`. The formatting generated by it supersedes any rules in the guidelines.
* The project uses a line length of 120 characters, and uses tabs for indentation with a tab width of 8 characters.
### C++
The project treats C++ as its own language and not just as “C with classes”. The associated code style guidelines are based on the Google C++ Code Style Guide (https://google.github.io/styleguide/cppguide.html) with changes to some aspects, as listed below.
> [!IMPORTANT]
> The current C++ language standard of the project is **C++17 without GNU extensions**. A move to C++20 is currently being considered.
Additions and changes (in the order the associated topics appear in the Google document):
* **Header Files**
* OBS Studio uses the “cpp” suffix for C++ source code files rather than “cc” and “hpp” for C++-specific header files
* Header guards are permitted, but not required - a simple `#pragma once` is sufficient
* Use of forward declarations is permitted for class or struct types, but be mindful of the caveats mentioned in the Style Guide. **Avoid “Structuring code to enable forward declarations”.**
* OBS Studio uses a different header include order, documented in a separate section below
* **Classes**
* If any constructor or assignment operator is defined, all 5 types need to be either defined, defaulted, or deleted, including the destructor (**“Rule of Five”**)
* Ensure that move constructor and move assignment operator are marked “noexcept” (and implemented accordingly) to avoid possible pessimization when using user-defined types with standard library containers like `std::vector`.
* Use multiple-inheritance only for the interface/protocol pattern ("implements an interface as defined by" relationship), avoid the diamond pattern and virtual base classes.
* **Google-Specific Magic**
* OBS Studio does not use `cpplint`
* **Other C++ Features**
* Exceptions can (but don't have to) be used, particularly when no good "sentinel value" can be provided and also to avoid littering the code with correctness checks after every function call. It is preferred to keep the “scope” of exceptions within the same module (i.e., the same executable or library).
* Be aware that in C++ any function that is not a destructor and is not explicitly marked as noexcept can potentially throw an exception as part of normal error handling rather than signaling an actual critical failure.
* Instance methods that modify any data, even if it is not their own instance's data, should not be marked `const` to signal that they logically mutate some state.
* Do not use comments to declare the types in structured bindings
* Any guidelines of C++20 features will be evaluated once the project switches to that language standard.
* The project does not allow the use of the Boost library.
* However the project does allow the use of the “Disallowed standard library features” and some “Nonstandard Extensions”.
* **Naming**
* Use the class name (following type name rules) for the file name of its interface header and implementation file.
* Use `camelCase` for instance methods, functions, as well as variables. This also aligns with Qt’s code style.
* Existing constants in code are permitted to be kept with `UPPERCASE` names, but new constants should follow the new convention of `kCamelCase`.
* Namespaces need to follow type name rules, though the project only uses the “`OBS`” namespace for refactoring of application code for the time being.
* Do not use underscore prefixes for any names, as these are reserved for the standard library implementation. Use a trailing underscore for private member variables.
* **Comments**
* Only C++ comment style is permitted for C++ source code, mixing of different styles is not allowed.
* Do not use function argument comments.
* **Formatting**
* Formatting is checked and can be applied by `clang-format`. The formatting generated by it supersedes any rules in the guidelines.
* The project uses a line length of 120 characters, and uses tabs for indentation with a tab width of 8 characters.
* All new C++ code needs to use curly braces for all looping or branching statements. No exceptions.
* Prefer brace initialization to protect against (unexpected) narrowing and prefer it over C-style assignment, except where a functional difference in behavior is needed (e.g. for `std::vector`)
* Class visibility labels are not indented.
Some additional notes:
* Use the C++ standard template library and C++ algorithms as much as possible, but also be aware of known issues with some of them (e.g. bad runtime performance of `std::regex`).
* **Prefer the standard library** over implementing custom loops.
* Prefer **C++ collections and filesystem functions** over their C variants (e.g. `std::array` over C arrays)
* Prefer **range-based and iterator-based loops** over counter-based loops.
* **Prefer C++ types over C types**
* Wrap C library code in C++ code to provide a clean C++ interface first.
* **Use `class enum` instead of `enum`** for enumeration values and do not use enum as “integer” value aliases.
* Do not use inline or static in the same way they are used in C
> [!IMPORTANT]
> The “`static`” keyword is one of the more confusing aspects of modern C++, particularly compared to C. The meaning of the keyword changes depending on whether it is used for a function, a global variable, a function-scope variable, a class method, or a class member.
>
> In general limit its use in C++ code to describe “storage duration” of variables or for class methods (e.g. factory methods). Be mindful that even though since C++11 function-local static variables are initialized non-concurrently, this does not make consecutive _access_ of the object thread-safe as well. Also be mindful of the “Static Initialization Order Fiasco”. Otherwise all the common established pitfalls and issues of global variables apply.
>
> `constexpr` definitions do not need to use the static keyword. `constexpr` implies const and const implies static storage duration by default.
>
> Be careful when mixing `static` and `inline`, as the inline keyword (short for “defined in-line”) allows the same definition to exist in multiple translation units (and thus is allowed to violate the one-definition rule, or “ODR”), enabling the linker to deduplicate all instances of the same function, which is the exact opposite of what “`static`” requires (local visibility and thus a distinct copy of the function in each translation unit).
#### The Exception: Qt Guidelines
Many of Qt’s core concepts were invented years before C++ added support for similar ideas, which means that much code interacting with Qt library functions and QObject-based instances requires violating some of the core language principles outlined above:
* Qt's ownership model predates modern smart pointers or references and thus requires passing around raw pointers:
* Any class derived from QWidget needs to be instantiated using bare new.
* Parent QObjects take ownership of children and will take handle destructing them appropriately
* Thus: **Do not call `delete` on a widget owned by a parent widget. Do not create widgets without attaching them to a parent widget.**
* Qt's default string class QString was an early adopter of Unicode (like Windows or Cocoa on macOS) and uses a 2-byte encoding internally (which was adapted to become UTF-16)
* A QString needs to be converted between UTF-16 and UTF-8 when passing character data to any C-based API or when interacting with `std::string` instances.
* **There Ain’t No Such Thing As Plain Text** (https://tonsky.me/blog/unicode/)
* The lifetime of a heap object passed to Qt must be guaranteed to match or exceed the lifetime of the using/owning Qt object.
* Lambda expressions can and should be used for callback-style programming as much as possible.
* **Be aware of lifetime issues however**: Any reference captured by a lambda needs to be "alive" for as long as Qt might potentially invoke the lambda expression. Use copy-based capture for scalar values.
* Note that a pointer is "just" a scalar value and is thus captured by copy, but there is no strong relationship between the copied pointer and the memory it is pointing to. The lifetime of the heap object needs to be ensured. Be mindful of the lifetime of whomever will be invoking the lambda.
* A pointer captured by reference can potentially be set to nullptr and checked within the lambda expression's body, but the lifetime of the pointer reference itself now needs to be ensured.
### C/C++ Header Include Order
Prefer to include the headers that the implementation itself needs (e.g. because a type or definition is used directly in the implementation) and do not rely on another header possibly having included the same file already. **This follows the “include what you use” rule**.
When including headers, use the following order:
```C++
// Interface definition or “counterpart” of current file
#include “interface.h”
// File in the same directory as the current file _if_ header belongs to the
// same “implementation”.
#include “file_in_working_directory.h”
// First party dependency from the same larger project that is “linked” with
// the implementation
#include
// Third party dependency not part of the same project and “linked” with the
// implementation.
#include
// C++ standard library includes
#include
// C standard library includes
#include
```
> [!NOTE]
> This specific order of includes helps in identifying potentially “broken” headers without “masking” the issue by including potential dependencies first.
>
> That issue can be avoided by following a simple procedure when creating a new interface and implementation pair: The initial implementation should always include the “counterpart” interface header first and should compile just fine even with the “empty” implementation.
>
> The same applies to any first party and third party library headers: Including one by itself should not result in compilation issues or should not require any standard library headers being included first (if that’s the case, the corresponding library header is badly designed).
>
> Putting the standard library includes last (and only including them if the implementation needs them) helps expose such malformed header files. While this scheme relies on convention (rather than enforcement by the language) it leads to self-contained headers and a cleaner set of includes.
Additional rules for this guideline:
* Includes within each block need to be sorted alphabetically with case-sensitivity enabled.
* Do not create platform specific “include blocks”. If a single source file has to include a hodgepodge of platform-specific headers it usually suggests that the source file tries to do “too much” and the “uglyness” that the rule might lead to is the point. To quote the Google C++ Style Guide:
**“Instead of using a macro to conditionally compile code ... well, don't do that at all”.**
* Refactor the source file to be platform-specific and use CMake to add the appropriate file to the target for a specific platform.
* Do not use double quotes to include any file not in the same working directory as the current source or header file. Compilers have been lenient and automatically attempt to use header include paths for all header files, so files might indeed compile nonetheless, but the additional context for the reader (“that header is provided by some other module/target in the project”) is lost.
Some header files will require breaking these rules. Well-known examples include:
* `windows.h` might be required very early in an implementation, particularly when relying on the magic `WIN32_LEAN_AND_MEAN` define, as nested includes of the same header might break compilation in severe ways otherwise..
* The BSD header `libprocstat.h` requires additional headers to be included in a specific order before its own inclusion (as documented in its man page).
* If an impact of include order can be proven through testing, additional headers are allowed to break these rules. This is unavoidable given the legacy and preprocessor architecture of C and C++.
### Objective-C/C++
For Objective-C/C++ code the Google Objective-C Style Guide (https://google.github.io/styleguide/objcguide.html) should be followed, which itself is based on Apple’s [Cocoa Coding Guidelines](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html) and [Programming with ObjC Conventions](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Conventions/Conventions.html).
> [!IMPORTANT]
> The current Objective-C/C++ language standard of the project is **Objective-C 2.0**.
The additions and changes to the Google Style Guide are as follows (in the order the associated topics appear in the Google document):
* **Naming**
* Use `camelCase` for functions.
* Use of the `g` prefix for global variables in file scope is permitted.
* **Types**
* Always use the native 64-bit types (i.e., double for CGFloat).
* **Comments**
* Use Apple’s DocC format for documentation (https://www.swift.org/documentation/docc/).
* Use C++ comment style for inline comments.
* **Cocoa and Objective-C Features**
* Use `#import` for all includes, follow the include order as specified for C/C++.
* **Spacing and Formatting**
* Formatting is checked and can be applied by `clang-format`. The formatting generated by it supersedes any rules in the guidelines.
* Use 4 spaces for indentation, use spaces for alignment.
* The maximum line length is 120 characters.
* All code needs to use curly braces for all looping or branching statements. No exceptions.
### Swift
For Swift code the Google Swift Style Guide (https://google.github.io/swift/) should be followed as well as Apple’s Swift API Guidelines (https://www.swift.org/documentation/api-design-guidelines/).
> [!IMPORTANT]
> The current Swift language standard of the project is **Swift 6**.
The additions and changes to the Google Style Guide are as follows (in the order the associated topics appear in the Google document):
* **General Formatting**
* Formatting is checked and can be applied by `swift-format`. The formatting generated by it supersedes any rules in the guidelines.
* Use 4 spaces for indentation, use spaces for alignment.
* The maximum line length is 120 characters.
Some additional notes:
* **Use the Unmanaged type and associated protocols to create retained or unretained opaque pointers to share with C APIs.**
* Use `passRetained` to pass an opaque pointer with an incremented reference count to a C API.
* Use `takeRetained` to take ownership of that reference count in Swift code and allow normal lifetime management to take over.
* Use `passUnretained` and takeUnretained to pass/receive pointers without influencing their reference count.
* **Object lifetime has to be manually ensured, and is thus unmanaged**
* Use extension to implement protocols in code blocks separate from the core type implementation.
```Swift
class MyType {
// Basic implementation
fileprivate let memberVariable: String
init(argumentOne: String) {
self.memberVariable = argumentOne
}
}
extension MyType : SomeProtocol {
func someProtocolMethod(argument: String) -> String {
return “\(memberVariable) \(argument)”
}
}
```
* **Prefer functional patterns as much as possible over C-style loops.**
* When a loop is still preferable, use the native Range type and enumerated loops if a counter value is required:
```Swift
for i in 0.. [!NOTE]
> Macros differ from functions in that they do not have a function-local scope. A macro body is effectively put into the scope it is called from and thus shares the variable scope.
* Pass variables to functions by their name, use `${}` dollar expansion to pass their value
* **Always use double quotes for strings**
* Prefer using functionality either available via CMake itself or available for specific generators over custom code that runs at configure time
* Particularly when multi-config generators for Visual Studio or Xcode are used, code running at configure time does not have access to the "actual" build configuration that will be used by the IDE and thus is incapable of achieving its potential goal anyway.
It is important to remember that CMake does not represent “the build system”, but rather is a “build system generator” that translates the abstract dependency tree of “targets” into an actual build system or IDE project.
### JSON and YAML
Both file formats are predominantly used for build system configuration or continuous integration, but are still subject to a limited set of rules:
* **Use schema files as much as possible** to ensure that a given JSON or YAML file uses correct structure and - as far as possible - valid values.
* Some editors can pull up common schema files when a loaded JSON or YAML file has a specific file name or sits in a directory of a specific name.
* Use `camelCase` for variable names
* **Exception:** Job names for GitHub action workflows commonly use `dash-case` for the job names.
* **Exception:** If the key of a variable is used for an underlying system e.g., to define environment variables in a shell environment that commonly uses `UPPER_SNAKE_CASE` names.
* Use **double quotes** for **key names** and **string values** in JSON files.
* Use **single quotes** for **complex strings in YAML files** that might otherwise not be correctly interpreted as strings, quoting is otherwise not necessary.
# Constitution
This repository is governed by the **[Constitution of the obs-rust Project](https://github.com/obs-rust/constitution/blob/main/CONSTITUTION.md)**.
It is the supreme governing document of the obs-rust organization. Nothing in this repository, including [CONTRIBUTING.md](CONTRIBUTING.md), supersedes it.
# CI cache audit: 2026-10-17
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Implementation and measurement tracker:
[obs-studio#1286](https://github.com/obs-rust/obs-studio/issues/1286).
## Current executive verdict — October 18 UTC
**The latest full native validation is successful.** Run
[39089156757](https://github.com/obs-rust/obs-studio/actions/runs/39089156757)
at `df86995022` passed all seven app builds: Ubuntu OFF/ON, Windows x64/arm64,
macOS x86/arm64 and Flatpak. Native Rust tests, Tier 2 and nightly scans also
passed. Linux OFF/ON each registered 296 tests with zero failures; CTest took
314.80 / 304.42 s. Both Ubuntu modes published compatible snapshots.
[Current full-run and producer evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-ubuntu-compatible-producer.json).
The earlier full run at `2f9bf8d77` also passed; its distinct 295-test results
remain [recorded separately](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-full-warm-validation.json).
| Finding | Verified result | Recommendation/status |
| --- | --- | --- |
| Native compiler reuse | Linux Tier 2 784/785 cached; Windows Tier 2 308/309 cacheable hits | Preserve native compiler stores |
| Warm Ubuntu ON | Full job 684 → 435 s; build 602 → 324 s, in unmatched observations | Keep the working ON seed; measure durability |
| Ubuntu OFF fallback | 43/361 calls cached; mixed state 9,526 MiB; save skipped | #1371 verified: later OFF restored the exact seed and achieved 208/345 cacheable hits; remaining misses and retention unresolved |
| Embedded Rust store | All eight expanded soldr lanes reported no embedded session | #1372 disables transport; #1380 retired retention and the queue janitor reclaimed 183,330,575 bytes |
| Compiler correctness | Rust stale-source/target blockers remain; a separate rapid-edit native C probe also returned stale output | Keep Rust bypass; follow native freshness upstream #1935 and avoid deeper reuse without validation |
| Startup incident | Local reproduction plus PR, queue, master and full-run verification | #1365 verified; #1355 closed |
| Storage headroom | Post-run listing summed to 12.43 GB; separate usage API disagrees; useful plugin seeds later absent | Resolve global-budget policy and preserve queue-useful seeds; no stable-headroom claim |
| Representative queue throughput | Product-code queue observation 843 s; older unmatched median 954 s | Full post-rollout day still required; no causal speedup claim |
**Build improvements are real but scoped.** The isolated libobs experiment
measured median CPU 63.482 → 46.620 s (26.6% lower); uncached wall
9.749 → 9.407 s had overlapping ranges. The broader app's historical
315 → 198 s result is a different benchmark. Neither establishes the
current merge queue's end-to-end improvement.

The plot shows all three trials and min–max ranges. Its warm panel excludes
the initial seed build and uses a separately identified grouped revision.
[Raw trials and reproducible plotting script](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/libobs-2026-10-17/plot_trials.py).
**Next priorities:** investigate the remaining Ubuntu OFF misses,
resolve the independently reproduced recording-wait race blocking #1362,
restore durable retention of the measured plugin seeds, and collect at least
one representative post-rollout day. Qt publication
reuse and skipped upload are verified for one docs-only pair. The proposed
queue-only publisher needs a transport compatible with temporary queue refs;
cross-run artifacts are feasible, but that architecture has not been deployed.
## Retention verification after the full run
PR #1380 merged after successful queue run
[39088853334](https://github.com/obs-rust/obs-studio/actions/runs/39088853334).
All seven setup-soldr callsites already disabled embedded compiler-store
transport; retiring its unused family allowed the actual queue janitor to
delete all three remaining archives, totaling **183,330,575 bytes**. A fresh
inventory contained zero such archives. The pinned offline executor selected
exactly those three additional IDs, leaving its other decisions unchanged.
[Executor and runtime evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-retired-embedded-cache.json).
This is verified storage reclamation, not a measured CI speedup or proof of
stable headroom.
The subsequent master run 39088999741 passed. Its Tier 2 build restored
compiler, apt and timing snapshots and reported 785 cached / 1 cold native
compilations; OFF and ON each registered 296 tests with zero failures.
[Post-retirement master observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-retired-embedded-master-validation.json)
verify useful native reuse survived this change. A single passing run does
not establish durable retention or resolve the separate recording race.
The useful touched-plugin compiler and apt seeds were present in the saved
00:32 UTC inventory (28,117,319 and 147,539,809 bytes), but absent in the
01:56 inventory. Seventeen completed janitor logs inspected from 00:42 to
01:55 record no deletion of those IDs. These observations establish a retention
gap; they do not identify the deletion actor or prove GitHub eviction.
[Entries, inspected jobs and limitations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-plugin-cache-retention-gap.json).
The earlier 41/41-hit warm consumer remains valid historical evidence, while
retention durability remains unresolved under #1269.
A later master run, 39088389865, failed the independent recording-wait
assertions in ON (296 registered CTests, one failing executable); OFF passed
all 296. The successful full native run above predates this recurrence.
The proposed helper patch has not been applied, and no tests were skipped or
relaxed. See [the #1283 recurrence](https://github.com/obs-rust/obs-studio/issues/1283#issuecomment-6244581047).
### Post-compatibility Ubuntu producer validation
In full run 39089156757 on `df86995022`, Ubuntu ON passed with 340 cached,
5 cold and 16 noncacheable compiler calls. It restored the compatible ON
archive, then saved a new 795,699,586-byte archive from 5,488 MiB of raw
state, below the 8,192 MiB guard. Restore/build/save took 19/234/18 s; the
whole job took 340 s, including successful GPU and app Tier 4 checks.
[Producer metadata](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-ubuntu-compatible-producer.json)
keeps this separate from the earlier unmatched warm observations.
OFF also passed. It found no compatible archive, built all 345 cacheable
calls cold (16 other calls noncacheable), and published its own snapshot:
5,045 MiB raw, below the 8,192 MiB cap. The API confirmed both mode-specific
seeds were present after the jobs completed. This verifies producer behavior
under #1371, replacing the previous mixed-mode 9,526 MiB save failure. A later
OFF consumer is recorded below; stable retention remains unverified. The parent full run
subsequently passed all seven native app builds and the remaining checks.
The two new Ubuntu archives total 1,508,547,016 bytes, exceeding their pooled
zccache family footprint of 1,153,433,600 bytes (shared with AppImage and
sanitizer entries). The pinned janitor, run offline on the saved inventory
with a hypothetical clock beyond the grace window, plans deletion of the
ON archive and retention of OFF. Both were present in the real inventory;
this is a predicted future plan, not an observed deletion.
[Exact entries, capacity and dry-run plan](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-ubuntu-retention-plan.json).
Mode-compatible restores repair correctness of reuse and snapshot sizing,
but cannot keep both modes warm under this allocation. Whole-budget policy
remains unresolved under #1269; no global allocation change is claimed here.
### Same-revision Ubuntu consumer results
Both Ubuntu jobs passed in consumer run 39090099191, at the same source
revision as the producer, and restored their exact new mode-specific keys.
| Mode | Producer cached / cold | Consumer cached / cold | Build, producer → consumer | Whole job, producer → consumer |
| --- | --- | --- | --- | --- |
| OFF | 0 / 345 | 208 / 137 | 630 → 359 s | 661 → 405 s |
| ON | 340 / 5 | 343 / 2 | 234 → 212 s | 340 → 324 s |
Each job also reported 16 noncacheable calls. These are individual runner
observations, not a controlled hardware comparison or queue-throughput result.
[Consumer logs, counters and step timing metadata](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-ubuntu-compatible-consumer.json).
The parent consumer workflow subsequently passed, including all seven native
app builds and the remaining checks.
OFF's runner image, GNU 15.2.0, zccache 1.15.5 and all 306 logged installed
package versions match the producer. That excludes the visible version
differences; it does not explain the 137 cold calls. These logs lack
per-compilation hit/miss records, so neither their affected units nor root
cause are established. Keep this gap distinct from the now-verified cache
transport and compatibility fix.
The save actions still compressed the stores on exact hits, taking 14 s OFF
and 11 s ON, then warned that the immutable keys could not be reserved.
Merged #1381 adds a guard to skip this redundant work; subsequent Ubuntu
execution of that guard is not yet a verified runtime saving. Restore, build and integrity coverage remain required.
### Native journal diagnostic and correctness limit
Pinned zccache 1.15.5 supports private sessions with `--stats --journal
.jsonl --profile`, followed by offline `zccache analyze --json`. Raw
journal records contain arguments, outcomes, `miss_reason` and `miss_diff`.
This provides a diagnostic route beyond the current CI aggregate counters;
no journal instrumentation has been enabled in production CI by this audit.
An isolated GCC 15.2.0 fixture exposed a separate freshness failure: compile a
function returning 7, warm it, then immediately write return 8 with equal
size and a naturally changed nanosecond mtime. The journal reports a hit and
the cached executable returns 7; a fresh compile returns 8. The unwrapped GCC
binary reproduces the result, so it is not limited to the Nix compiler wrapper.
A separate 200 ms settling control returns the correct value; the delay is
not a production workaround. Private cache/endpoint ownership keeps these
fixtures separate from the shared daemon.
[Source, executable results, stamps and raw journals](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-native-journal-freshness.json)
corroborate existing upstream [zccache#1935](https://github.com/zackees/zccache/issues/1935#issuecomment-6244827358).
This does not establish wrong output in the GitHub runs, explain OFF's 137
misses, or identify a specific internal shortcut from aggregate outcomes.
The compiler-cache correctness recommendation now includes this native
rapid-edit limit alongside the existing Rust and restored-target blockers.
Upstream 1.15.6 contains a separate Clang PCH timestamp-isolation fix
([#1958](https://github.com/zackees/zccache/pull/1958)). Neither that release
nor a production version bump is qualified by the measurements here; it is
not asserted to fix this GNU fixture or the observed CI misses.
## Executive assessment
The janitor failed because a fork PR received a read-only Actions token:
all 32 deletion requests returned HTTP 403. Maintenance also delayed useful
work through its dependency graph. The merged fix keeps `ci-pre.yml` as the
common pre-work entry point, runs only its janitor on trusted queue/master
events, and keeps maintenance outside build, required-gate and cancellation
dependencies. A maintenance failure remains visible without blocking a merge.
Compiler caching is effective. The remaining speed work is reducing needless
transfers, matching dependency snapshots to consumers, and shortening the test
critical path. Preserve useful caches and required integrity coverage; judge
changes by total gate time and runner cost rather than archive HIT messages.
### Verified rollout results
Master [39061960882](https://github.com/obs-rust/obs-studio/actions/runs/39061960882)
completed successfully with the following results:
| Area | Observation | Decision |
| --- | --- | --- |
| Linux Tier 2 | 774/775 compilations cached; build step 53 s; complete build job 162 s | Keep the working compiler cache |
| Qt frontend | 295/297 cacheable hits; restore 10 s, build/tests 55 s, save 6 s | Keep the 1.2 GB cache bound and realistic retention allowance |
| OFF/ON tests | 286 registered per mode: 283 passed, 3 skipped, 0 failed; concurrent phase 327 s wall / 642 runner-seconds | Keep both implementations and parallelize independent modes |
| Scheduling | Fast Gate 234 s; 3 s to build start; build 162 s; 3 s to test runners | Continue measuring runner waits as well as commands |
| Rust compiler correctness | Pinned soldr 0.9.35 still returns a stale success in the nested-source probe | Retain the wrapper bypass pending the upstream fix |
The earlier serial test job took 578 s for 283 tests per implementation; the
first parallel trial spanned 366 s and consumed 715 runner-seconds. The newer
327-second phase above registered 286 tests per mode (283 passed, three
PulseAudio device tests skipped). These are **unmatched phase
observations**, not proof of overall queue throughput improvement. Source,
runner placement and compiler-cache rollout conditions differ.
[Machine-readable rollout results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-master-cache-rollout.json)
include job IDs, phase times and independent compiler counters. The isolated
libobs results below remain separate from whole-app and CI build timings.
### Full native validation and cache survival, 22:15 UTC
Full manual run [39074304012](https://github.com/obs-rust/obs-studio/actions/runs/39074304012)
at `d315ee9c6` passed all seven native app builds: Ubuntu OFF/ON, Windows
x64/arm64, macOS x86/arm64 and Flatpak. This confirms native unity/PCH build
success at that revision. The overall workflow **failed**: Linux OFF
`test_slideshow_empty` returned `obs_startup=false` in group setup. The startup failure is tracked in
[#1355](https://github.com/obs-rust/obs-studio/issues/1355). Subsequent local
reproduction and the merged Xvfb lifetime fix are described below; that does
not establish the cause of every historical startup incident.
The X-display informational message also occurs in passing tests and does not
diagnose that failure. No test assertion was relaxed.
The Tier 2 build recorded 779 cached compilations out of 780. Its execution
overlapped Fast Gate by 142 seconds and finished 57 seconds before the gate.
This verifies actual compile overlap, not a representative queue speedup.
Both Ubuntu app builds were cold (345 misses, 16 noncacheable calls each),
retained their 5,045 MiB raw compiler state through the post-build size guard,
and saved OFF/ON archives of 712,826,136 / 712,780,180 bytes. A subsequent
warm consumer is still required to establish their value.
Cache survival remains unresolved. The Tier 2 job restored the earlier seed
and saved a refreshed `d315ee9c6` archive at 22:19:04 UTC; the 22:34 janitor
inventory had no Tier 2 family. The PR janitors inspected in that interval
were skipped. These observations do not identify who removed the archives or
prove global-capacity eviction. Separately, the 22:36 janitor explicitly
deleted the Ubuntu OFF archive under the pooled nightly LRU budget, retaining
ON. The family split protects Tier 2 from that pool's eviction decisions;
it does not yet demonstrate durable retention.
The loss affected a real consumer: PR #1353's Tier 2 build
[job 117521595282](https://github.com/obs-rust/obs-studio/actions/runs/39075342558/job/117521595282)
missed all Tier 2 compiler-cache restore keys at 22:33:13 UTC, then reported
782 total compilations, zero cached and 782 cold. The successful job took
426 seconds, including a 345-second build step. Its apt, soldr cook/build
and CTest timing restores succeeded. This establishes an archive miss and
cold compilation, but changed source and runner conditions prevent a matched
runtime attribution. The disappearance therefore has an observed consumer
cost even though its cause remains unresolved.
[Job identities, times and observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-full-validation.json)
keep the successful native builds, failed test setup, cold cache production
and unresolved cache loss separate. The full-day comparison remains open.
### Startup fix verified in the merge queue, 00:10 UTC October 18
PR [#1365](https://github.com/obs-rust/obs-studio/pull/1365) merged at
00:10:16 UTC after queue run
[39081091301](https://github.com/obs-rust/obs-studio/actions/runs/39081091301)
succeeded. Both implementations registered 295 tests with zero failures;
CTest took 314.95 s OFF and 308.87 s ON. The slideshow test and the new
startup-failure diagnostic test passed in both modes. These observations
verify queue coverage of the Xvfb `-noreset` fix; they do not replace the
pending full nightly run or establish a throughput improvement.
[Machine-readable queue results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-startup-queue-validation.json)
keep this verification separate from the earlier PR results and local
repeated-startup experiment.
Linux release setup also now uses `linux-host-v1`: PR
[#1367](https://github.com/obs-rust/obs-studio/pull/1367) merged at 00:11:16 UTC.
All seven setup-soldr callsites now have explicit consumer profiles, and all
Linux callsites distinguish host and container cache identities. The release
workflow itself was not dispatched; its subsequent warm-consumer performance
remains unmeasured.
### Master validation and controlled recording-wait reproduction
Master run [39081770788](https://github.com/obs-rust/obs-studio/actions/runs/39081770788)
passed after the startup fix: both modes registered 295 tests with zero
failures; CTest took 314.72 s OFF and 308.66 s ON. Both the startup diagnostic
and recording-shutdown test passed. [Raw master observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-startup-master-validation.json)
do not disprove the recording race seen in a different run.
The unchanged recording-shutdown test passed 20 local repetitions. A separate
minimal fixture using the production helper, a real signal handler and an
atomic active flag demonstrated the inspected race: after `deactivate`, a
controlled 100 ms worker pause before the inactive store lets the UI helper
return `stopped=true` while `active=true`. Both signals were registered and
the worker joined cleanly. This confirms a possible ordering failure under
controlled scheduling; it does not prove that pause occurred in historical
CI. [Fixture source, source identities and results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-recording-wait-race-probe.json)
are retained separately from the unchanged-test results. The follow-up is
posted to the existing #1283 claim; production code and existing tests were
not edited.
### Warm Ubuntu consumers and full-run write pressure
Full run [39082733551](https://github.com/obs-rust/obs-studio/actions/runs/39082733551)
completed successfully, including both Ubuntu jobs. Both restored the earlier ON archive (712,780,180 bytes).
| Mode | Compiler results | Restore | Build, cold → warm | Job, cold → warm |
| --- | --- | --- | --- | --- |
| ON | 200 cached / 145 cold / 16 noncacheable | 23 s | 602 → 324 s | 684 → 435 s |
| OFF, using ON fallback | 43 cached / 302 cold / 16 noncacheable | 28 s | 584 → 574 s | 629 → 619 s |
These are individual unmatched observations across revisions and runners,
not causal benchmarks. ON passed both Tier 4 checks and saved a 794,953,805-byte
archive. OFF accumulated 9,526 MiB of mixed compiler state, exceeded the
8,192 MiB save guard and published no OFF archive. The opposite-mode fallback
therefore provided limited observed reuse and prevented seeding this mode in
this run. Restore compatibility and snapshot growth must be addressed before
claiming both modes are warm. [Raw observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-ubuntu-warm-consumers.json).
A mid-run listing summed to 12,218,332,982 bytes, above the declared 10 GiB
budget. Three Qt snapshots alone held approximately 3.48 GB; their observed
jobs each had only 2–4 compiler misses. The separate usage endpoint reported
8,389,095,940 bytes, so these are different observations, not proof of an
atomic storage peak or a particular eviction actor. Avoiding redundant
per-commit Qt snapshots is a remaining opportunity; preserve useful seeds.
Fast Gate also missed its host release cook key, then received HTTP 409
on reservation. Two later listings had no visible entry for that exact key.
The cause remains unknown; it is tracked in
[setup-soldr#581](https://github.com/zackees/setup-soldr/issues/581).
[Inventory summaries and explicit limits](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-cache-pressure-and-cook-conflict.json)
keep the publication conflict separate from compiler hits and storage totals.
### Merged transport policy and a post-native-burst consumer
PR #1372 merged at 00:49:59 UTC. Its successful queue run
[39084053608](https://github.com/obs-rust/obs-studio/actions/runs/39084053608)
reports the embedded build-cache layer as disabled while restoring the exact
host cook archive. The action's policy layers are now toolchain, registry
and cook; setup took 19.1 s in this configuration cohort. This verifies the
transport choice without claiming a product-code speedup.
A later master consumer, job 117546797737 in run 39083903921, restored the
full native run's `2f9bf8d77` Tier 2 seed and recorded 784/785 cached
compilations, then saved a new seed. The later inventory retained that new
seed. Thus the queue compiler store has observed useful consumption after
the native write burst. Registry and mini-tool cache misses still occurred;
this single observation does not establish durable overall retention.
[Runtime policy and consumer evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-cache-policy-runtime.json).
The mode/configuration restore restriction #1371 is also merged, but no
post-change Ubuntu seed/consumer measurement is claimed. PR #1374 merged and its master Qt producer (job 117551485401, run
39084764880) passed: 298/300 cacheable hits, a new
`qt-ccache-linux-inputs-v1-7d748b6e…` snapshot, and a 5-second save step.
[Producer metadata](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-qt-identity-producer.json) records the
exact key and bytes. The subsequent docs-only consumer, job 117554246917 in
run 39086280608, passed its 15 registered Qt tests with the exact same key,
298/300 hits, and its Qt
snapshot save step skipped. It reused the 1,161,888,219-byte archive without
uploading another Qt snapshot. Build/tests still ran (74 s versus the
producer's 54 s); these unmatched runner observations do not establish an
end-to-end speedup. [Consumer and upload evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-qt-identity-consumer.json).
The producer's parent workflow later failed the separate recording-wait
assertions. A proposed private-helper patch passes two controlled ordering
cases where the original fails, and ten invocations of the unchanged test
(40 cases). It was offered on the existing #1283 claim for review;
production source and assertions remain unchanged, and real app shutdown
validation is still required. [Patch, probe source and results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-recording-wait-proposed-patch.json).
The unchanged group-hide audio test passed three isolated and sixteen
concurrent local invocations on four pinned CPUs (76 cases, no skips). This
negative sample did not reproduce #838; serial execution preceded concurrent
execution without cold/warm Mesa cache control, and local binaries were not
matched to the GitHub revision. No scheduling or assertion change was made.
[Local probe and limitations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-audio-resource-probe.json).
### Subsequent consumers and availability failures
[Consumer and capacity observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-cache-consumer-followup.json)
record actual reuse after the host/container namespace split (#1354):
| Consumer | Cook result | Observed timing / outcome |
| --- | --- | --- |
| #1360 queue Fast Gate, documentation cohort | Exact host dev hit; 16,213 restored files | Setup 24 s, lint 53 s, job 97 s; successful |
| #1362 initial PR Tier 2 build | Exact container release hit; 542 restored files | Setup 12 s; later standalone compiler-cache daemon failure |
Both new namespaces have observed master producers and later consumers.
These runs do not establish a product-code speedup or resolve the Rust
stale-source blocker. A cook archive hit and a standalone compiler-cache
daemon failure describe different layers.
The latter failure preserved the first build's lost daemon connection and
subsequent connection-refused/cooldown messages. #1362 adds original-log and
daemon diagnostics, plus uncached real compilation during the existing single
recovery attempt when daemon status confirms unavailability. Local testing
with checksum-verified zccache 1.15.5 confirms unavailable status exits 1,
valid C compiles with `ZCCACHE_DISABLE=1`, and deliberate invalid C still
fails with its current diagnostic. Latest PR run
[39081664635](https://github.com/obs-rust/obs-studio/actions/runs/39081664635)
passed the build but failed the unchanged `test_recording_shutdown_wait`
state assertions in both modes: each registered 295 tests with one failing
test executable. The startup diagnostic passed in both. Source inspection
found a race candidate: the wait may return on `deactivate` before the output
reports inactive. Evidence is posted under the existing claim in
[#1283](https://github.com/obs-rust/obs-studio/issues/1283#issuecomment-6243649634);
no rerun, skip, or assertion change was made. This is not evidence of a cache
recovery failure. The daemon-death cause remains unknown, and #1362 is not
yet merged. [Raw validation summary](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-recovery-pr-validation.json)
keeps build success separate from test failures.
The full dispatch's native Windows Tier 2 compiler cache hit 308/308
cacheable calls, with 27 noncacheable calls. macOS Tier 2 passed 163
registered tests per mode in 112.59/100.78 seconds. The accompanying eight
soldr consumer observations preserve literal cook and embedded compiler
summaries separately: zero embedded session hits do not negate the Windows
C/C++ cache's independently observed hits.
Capacity pressure is now quantified without claiming a deletion actor.
The starting inventory contained 8,380,452,969 bytes. Known new archives
written before the 22:33 Tier 2 miss, and still present in the later
inventory, added at least 3,777,435,796 bytes. Retaining both sets would
require 12,157,888,765 bytes, exceeding the 10 GiB budget by 1,420,470,525
bytes. This is a lower bound on required removals, not an observed peak.
The oldest accessed survivor was newer than the lost Tier 2 seed, and no
known janitor ran during the relevant interval. Global LRU eviction is a
supported inference; manual/external deletion remains unexcluded.
The impact reached the queue: #1353's subsequent merge-group build missed
the compiler archive and compiled all 783 units cold (290-second build step,
395-second job). Source and runner differences prevent a matched timing
attribution. Family isolation alone has not established durable retention.
That product-code queue run completed successfully in 843 seconds from run
creation to required-gate completion. Its Fast Gate job (209 seconds) ran
entirely within the Tier 2 build job (395 seconds), verifying 209 seconds
of actual overlap on a code change. OFF/ON each registered 293 tests with
zero failures; CTest times were 316.03/316.71 seconds. Their concurrent job
phase took 390 seconds and consumed 772 runner-seconds. All non-skipped
jobs together consumed 1,499 runner-seconds; these are observed job durations,
not a monetary billing calculation. The older code-queue baseline median
was 954 seconds across eight samples, with different source, test counts
and runner conditions. One new sample does not establish a causal speedup
or replace the required representative-day comparison.
[Raw critical-path observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-code-queue-critical-path.json)
include the independent OFF/ON results and coverage caveats.
### Native Rust profile verification
Master [39063249804](https://github.com/obs-rust/obs-studio/actions/runs/39063249804)
passed native Rust test jobs on both platforms with `--profile dev`:
| Platform | Setup | Cook inside setup | Rust tests | Post-job setup-soldr save |
| --- | --- | --- | --- | --- |
| macOS arm64 | 34 s | 23.1 s | 89 s | 13 s |
| Windows x64 | 53 s | 30.0 s | 125 s | 15 s |
[Raw job observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-native-rust-cook-rollout.json)
verify profile use and successful consumers. Compiler-wrapper session counters
were zero in both jobs; these are separate from dependency-cook reuse. The
parent master run was later canceled after its native jobs and cache writers
finished; this is not a full-workflow pass or a matched speed comparison.
Windows native Tier 2 also passed in this master run, using `--release` for
the static-library consumer and recording **304/305 cacheable ccache hits**,
one miss. It saved `windows-tier2-ccache-6d7b7f7a...`. These C/C++ counters
are independent of the zero embedded zccache session counters printed by
setup-soldr. [Job timings and counters](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-windows-tier2-cache-rollout.json)
confirm that useful native compiler reuse survived the changes.
macOS native Tier 2 passed both implementation runs too: 161 registered,
160 passed and one `test_svt_av1` skip each, with CTest times 96.45/101.15 s.
Its release-profile consumer succeeded and saved `macos-tier2-xcas-6d7b7f7a...`.
The embedded compiler session recorded 22 hits and zero misses; this does not
establish an Xcode compilation-cache hit rate.
[Native macOS observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-macos-tier2-cache-rollout.json)
keep these independent scopes explicit. The obsolete master workflow was
canceled after its native jobs and cache writers completed; it is not claimed
as a full-workflow success. Full nightly verification remains separate.
### What still dominates test time
The [serial-test profile](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-tier2-serial-profile.json)
identifies eight `RUN_SERIAL` tests totaling 174.47 s OFF and 165.17 s ON,
against CTest wall times of 257.61 s and 248.03 s. The longest are async audio
delay (~59 s), PipeWire resume (~39 s), VLC pacing (~35 s), and audio clock
drift (23.52 s OFF / 14.55 s ON). The independent mode runners are balanced
within 12 s of job wall time; dividing tests evenly by count would not balance
these durations. No test sharding or removal of serial isolation was shipped.
A future experiment can isolate long suites in separate environments, measuring
extra runner/setup cost and timing stability before changing their scheduling.
Both modes skipped `test_pulse_monitor_device`, `test_pulse_stream_restart`
and `test_pulse_two_sources`; a green workflow is not evidence those device
scenarios executed. Their environmental coverage remains a stated limitation.
### Queue admission and operating strategy
1. Queue admission covers compilation and integrity: selected builds, lint,
tests, ABI/behavior and differential checks. Security scans and release
packaging validation run nightly or through explicit manual/release runs.
Automatic GitHub CodeQL setup is disabled; merged #1327 puts the same four
languages in the existing Scheduled workflow and reports nightly failures.
2. Queue/master janitors own retention. PRs restore useful snapshots; remote
setup-soldr saves are master-only. Local development saves remain enabled.
3. Protect correctness first: retain the Rust wrapper bypass and cross-lane
toolchain safeguards. Do not trade stale-output protection for headline hits.
4. Preserve one active master warming build and the latest pending snapshot.
Catch-up scope must retain paths from superseded pushes; #1328 implements
that after the plugin seed exposed a lost-path case. Follow-up #1330
protects the rollout baseline from older coalesced successes that did not
cover replaced pending pushes.
5. Keep independent OFF/ON test runners and publish the extra runner cost.
Keep all applicable test coverage; no test sharding was introduced.
Nightly security migration is live-verified: manual Scheduled run
[39064183327](https://github.com/obs-rust/obs-studio/actions/runs/39064183327)
passed CodeQL for Actions, C/C++, Python and Rust. Automatic default setup
remains disabled. [Per-language results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-nightly-codeql-verification.json)
record durations and job IDs. This proves nightly/manual scanning works; the
full nightly run subsequently finished with the macOS integrity failure described below.
Trusted scoped-plugin warming is now observed: master run
[39064132902](https://github.com/obs-rust/obs-studio/actions/runs/39064132902)
saved `targets-ccache-linux-713ceb3b...`, a 25,761,103-byte archive on master.
The touched-target build and save steps succeeded. The prepared measurement
PR selects only `linux-v4l2`; its tracked compiler-input fingerprint matches
the seed revision, excluding Markdown and generated version metadata.
[Experiment records](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-plugin-cache-experiment.json)
retain the cold sample and trusted save. Subsequent PR compiler reuse is verified below; archive creation alone was
not used as proof of reuse.
### Scoped plugin follow-up measurements
| Condition | Compiler hits | Target step | Full job | Apt fetched |
| --- | --- | --- | --- | --- |
| Original cold PR | 0/41 | 57 s | 153 s | 147 MB / 13 s |
| Warm compiler archive | 41/41 | 70 s | 169 s | 147 MB / 30 s |
| Shared apt archive, wrong layout | 41/41 | 70 s | 190 s | 147 MB / 28 s |
| Shared apt archive, layout normalized | 41/41 | 46 s | 145 s | 142 MB / 13 s |
| Host-specific apt, cold | 41/41 | 57 s | 165 s | 147 MB / 21 s |
| Host-specific apt, warm | 41/41 | 39 s | 148 s | 0 bytes |
Compiler work fell from about 12 s to half a second, but this alone did not
make the first warm job faster. Package download/install overhead dominated.
The container archive supplied only about 5 MB of the host's package needs,
even after 563 archives were relocated correctly. The large shared restore
is therefore rejected. Merged #1335 instead uses a host-specific archive, with image rotation and
an enforced 200 MiB producer cap from #1339. Trusted master has now saved
147,542,391 bytes for image `20261012.163.1`. Its tracked compiler-input
fingerprint matches the prepared report PR. The cold host run retained 323
packages and took 165 s (57 s target step, 41/41 compiler hits). The subsequent
PR restored all 323 packages in 2 s and downloaded zero package bytes, with
41/41 compiler hits. Its target step took 39 s and full job 148 s: observed
reductions of 18 s (31.6%) and 17 s (10.3%) respectively versus the host cold
sample. Both used runner image `20261012.163.1` and the compiler inputs match
the trusted seed. This is one cold/warm pair, with network/runner variance;
it is not the representative-day queue-throughput result.
These are individual unmatched runs, with network and runner variation;
145 versus 153 s is not claimed as a robust causal improvement.
### Full nightly outcome
[Final job results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-nightly-final-results.json) show
successful Ubuntu OFF/ON app builds, macOS Intel/Apple Silicon, Windows
x64/arm64, Flatpak, security analysis, Linux OFF/ON Tier 2 and Windows Tier 2.
The **overall run failed** at macOS `test_ingest_refresh_wait` /
`failed_refresh_ends_wait`: its elapsed time exceeded 150 ms. The first
implementation run failed, so the second implementation was not validated.
[Failure evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-nightly-macos-failure.json) and
[#1334](https://github.com/obs-rust/obs-studio/issues/1334) preserve the failure
and required diagnostics. Scheduling sensitivity is a hypothesis; no cache
cause is established. The existing C test was neither weakened nor skipped,
and no speculative whole-workflow retry was performed. This native build
matrix is distinct from the AppImage nightly release pipeline.
The full Ubuntu app cache has a separate confirmed defect: 13 baseline
restore events unpacked 5–6 GiB and then deleted the directory at a 2 GiB
pre-build threshold. [#1337](https://github.com/obs-rust/obs-studio/pull/1337)
consumes the cache first and bounds the subsequent save instead. Its shell
regression covers 6 GiB, 8 GiB and over-limit snapshots; actual warm app reuse
still needs live verification. The 8 GiB guard is uncompressed per-run disk
state, not additional Actions storage allocation.
### Measurement status and limits
The before window is 2026-10-16 17:00 through 2026-10-17 17:00 UTC: 473 listed
runs and 117 detailed samples. Successful code PRs (n=9) had median gate wall
1,016 s; code merge groups (n=8) had median 954 s. Sampled canceled code PRs
used 211.57 runner-minutes and sampled canceled code merge groups 194.45.
These cancellation costs describe the sample, not an extrapolated population.
Docs/configuration cohorts are kept separate.
[Baseline log observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-16_17-ci-baseline-log-observations.json)
preserve the observed compiler counters, archive sizes, saved keys and test
counts. Logs were unavailable for 33 of 117 sampled attempts, all canceled;
missing counters are unknown. Repeated archive messages and independent
compiler scopes must not be summed into fictitious transfer/hit totals.
The [per-lane baseline](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-16_17-ci-baseline-lane-timings.json)
separates code/docs/configuration cohorts and records each literal step's
sample count. Selected **code-cohort successful jobs** were:
| Lane | PR n / median job | Queue n / median job | PR / queue median soldr setup |
| --- | --- | --- | --- |
| Fast Gate | 27 / 128 s | 19 / 139 s | 23 / 32 s |
| Tier 2 build | 8 / 196.5 s | 7 / 179 s | 25 / 17 s |
| Serial Tier 2 tests | 7 / 597 s | 3 / 598 s | Not applicable |
| Qt frontend | 5 / 256 s | 10 / 161 s | Not applicable |
These include successful jobs in workflows that later failed or were canceled;
the JSON discloses parent outcomes. They are not the successful-gate sample
counts above. Step medians are not additive totals, and historical lane/shard
names remain separate. Missing/skipped step times do not become zero samples.
The collector now emits `lane_cohorts` so the same method applies after rollout.
A [post-nightly inventory snapshot](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-post-nightly-cache-inventory.json)
records both cache APIs with collection timestamps. The itemized listing
contained 41 entries / 8,951,159,430 bytes; the usage endpoint reported 49 /
10,617,481,983 bytes. The pinned contract interprets `10GB` as 10 GiB
(10,737,418,240 bytes). These endpoints were asynchronous during concurrent
writers and janitor cleanup; their totals are not combined, and neither is
presented as steady-state headroom. An earlier listing peaked near 10.70 GB.
Nightly app archives dominate the transient footprint; useful queue caches
must remain warm through the full representative-day comparison.
### Confirmed retention pressure after rollout
[Capacity and eviction evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-cache-retention-capacity.json)
records a confirmed janitor eviction at 20:12 UTC: the 711,970,692-byte Ubuntu
ON archive exceeded the shared `zccache` family's 1,782,579,200-byte allowance.
The same sweep removed the 1,083,740,873-byte Windows x64 app archive under
the shared Windows family's 838,860,800-byte allowance. These deletions are
distinct from the removed Ubuntu pre-build purge. The Ubuntu OFF archive's
disappearance remains unattributed.
The analyzed family declarations at `92605bf02` sum to 16,951,069,900 bytes against the
10,737,418,240-byte repository budget. This sums shape ceilings and platform
cardinality; it is declared capacity, not simultaneous live usage. Increasing
nightly allowances alone cannot establish durable retention. The pinned
janitor protects only one newest entry per LRU family, so shared platform
families also allow independent consumers to compete for retention.
Before changing those bounds, allocate the whole budget from measured producer
sizes and reuse value, prioritize queue-critical caches, and evaluate separate
families and producer limits. Confirm that retained nightly seeds survive long
enough for a later consumer. Neither successful upload nor current headroom
proves that requirement.
The queue-priority retention fix separates `zccache-tier2-linux-*` before the
broad `zccache-*` prefix. It reserves a 550 MiB Tier 2 family and leaves the
nightly families pooled at 1,100 MiB: combined 1,650 MiB versus the previous
1,700 MiB. Cache keys stay unchanged. An offline probe of the pinned janitor
reproduced deletion of a 475,427,223-byte Tier 2 seed after two newer Ubuntu
writes; with the split it protects Tier 2 and evicts the older nightly entry.
[Raw before/after results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-tier2-cache-retention.json).
This isolates janitor protection without expanding its allowance. It does not
prevent GitHub's global-capacity eviction, retain both Ubuntu variants, or
resolve the overall declared-capacity mismatch. Live retention remains to verify.
A transitional sample from 20:38–21:45 UTC listed 32 runs and inspected 12.
The collector previously treated JSON evidence reports as product code when
they accompanied CI changes. The corrected classifier treats only JSON under
`docs/ci-evidence/` as documentation; product JSON remains code. Reclassifying
the saved actual diffs leaves the full-day baseline unchanged and moves four
transitional runs into CI/config. Its two successful queue samples (167.5 s
median) are CI/config, leaving **zero successful product-code queue samples**.
There is only one successful product-code PR sample (772 s). These sparse,
unmatched observations establish no queue speedup. See the
[cohort correction and preserved old/new counts](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-ci-cohort-correction.json).
The final after window must cover at least a full day of representative code
PR and queue traffic following rollout. It has not elapsed. The first host
cold/warm pair is complete. Repeatability over real traffic, Ubuntu app reuse
after the purge fix, the unresolved startup failure (#1355), stable cache
headroom and the representative-day comparison remain acceptance work under
#1286. This report does not claim those requirements are complete.
## Recommendation and acceptance checkpoint
### Rebuilt Tier 2 cache: observed warm consumer
After the archive disappearance, master `635454ee7` rebuilt 783 units cold
and saved a 188,194,495-byte compiler archive. Master `3ac86f74c` subsequently
restored it, recorded 734 cached / 49 cold compilations, and saved an updated
193,854,787-byte archive. Only documentation changed between these revisions;
generated revision metadata and runner placement still differ.
| Observed job | Complete build step | Whole job | Compiler hits |
| --- | ---: | ---: | ---: |
| Cold producer 117527420015 | 300 s | 383 s | 0/783 |
| Warm consumer 117530045228 | 117 s | 238 s | 734/783 |
[Raw producer/consumer observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-tier2-reseed-cold-warm.json)
establish useful reuse of the smaller new archive. These are single
observations, not a matched causal benchmark. Survival through another full
nightly write burst and representative-day traffic remains unverified.
### Expanded soldr lane observations
The earlier full dispatch also supplies
[eight soldr lane observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-full-dispatch-soldr-lanes.json),
including separate setup/post-step times and literal cook/embedded compiler
summaries. These are eight expanded jobs from the configured callsites,
not eight matched cold/warm experiments. Native test and static-library
consumers are kept separate from host cross-lint and Fast Gate. The Windows
Tier 2 standalone ccache hit 308/308 cacheable calls while its embedded soldr
counter was zero; those values describe different cache layers. Do not
disable the working native compiler cache based on the embedded counter.
### Existing artifact transport cost
The successful #1353 queue run uploaded its 177,835,306-byte execution tree
in 3 seconds. OFF/ON consumers downloaded it in 2/4 seconds and unpacked it
in 2 seconds each. [Literal step observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-tier2-artifact-transfer.json)
show inexpensive same-run transport for this payload. Cross-run producer
selection/authentication and deep Cargo/object-state payloads are separate,
unmeasured costs; this does not implement queue-only cache publication.
### Startup blocker: local failure identified
The failure diagnostics in proposed #1365 let the real unchanged slideshow
test identify `XOpenDisplay` failure during hotkey initialization under
concurrent startup/shutdown. On a shared default Xvfb server, six of 68
attempted invocations failed (workers stop at their first failure). With
only `-noreset` added, all 160 invocations and 1,920 startup groups passed.
The earlier Xlib-only probe had not reproduced this behavior. #1365 proposes
the server-lifetime fix for normal and repeated runs, preserving assertions,
parallelism and failure propagation. Full fresh OFF/ON CI and queue validation
remain pending; this local reproduction does not assign every historical
startup failure to the same cause.
### Remaining acceptance work
The follow-up fixes also incurred iteration cost. Across eight completed
runs on only the #1362/#1365 branches, canceled runs consumed 44.07 observed
runner-minutes and failed runs 58.08. Two active corrected runs are excluded
from this snapshot. [Per-run observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-followup-iteration-cost.json)
keep this separate from steady-state gains, billing and total #1286 rollout
cost. Failures included cache-daemon availability, startup and the new test
interposer; superseded runs also consumed work before cancellation completed.
These costs must not be hidden by reporting only successful final runs.
The pinned janitor's global-budget behavior is now checked directly:
`cache/ops.py::janitor` plans family/stale/finding cleanup and applies
newest-entry/grace protection, without a global trim against `[cache].budget`.
A [read-only synthetic executor probe](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-janitor-global-budget-probe.json)
kept two current 6 GiB entries when their individual limits were 6 GiB,
despite a 10 GiB global budget. That fixture intentionally has invalid
aggregate declarations; it is not a live inventory or a claim that static
budget checks accept it. Lowering the global budget field alone would not
create retention headroom. Whole-budget allocation and writer-burst policy
remain tracked in #1269; family isolation is insufficient by itself.
Keep the merged queue policy, Rust correctness safeguard, bounded useful
compiler caches and parallel OFF/ON runners. Validate the observed host-package
benefit over real traffic; an archive HIT alone is not a throughput result.
Validate Ubuntu app reuse after removing the pre-build purge, and compare a
full day of code PR/queue traffic after the final cache rollout. The
macOS integrity failure was resolved by #1338. The startup fix in #1365
has passed PR, queue, master and full native validation; #1355 is closed.
| #1286 requirement | Evidence/status at this checkpoint |
| --- | --- |
| 1. Match cook profiles and measure consumers | Explicit profiles landed in #1318; local dev/release/no-cook experiment and native consumers recorded. Representative post-rollout comparison remains pending. |
| 2. Rust cache correctness | Reproduction still fails on pinned soldr; safeguard retained in #1290, upstream zccache#1943 linked. |
| 3. Remove unused overhead | #1372 disables unused embedded transport in all seven callsites; #1380 reclaimed 183 MB of retired archives. Qt exact-key reuse skips duplicate publication. #1371 mode-compatible Ubuntu producers and later OFF reuse passed; remaining misses and whole-budget retention remain unresolved. |
| 4. Warm scoped plugin builds | PR consumer verified 41/41 compiler hits, 323 packages and zero package download bytes; first unmatched job pair 165 → 148 s. Both seed families were later absent. Warming works; durable retention and day-scale benefit remain unresolved under #1269. |
| 5. Persist test timing | Nonempty OFF/ON producer, save, later restore and CTest consumption verified across master runs (#1288/#1311). |
| 6. Match remote save policy | All seven setup-soldr consumers use master-only remote saves; PR/queue/local-save behavior verified (#1291). |
| 7. Bound Qt cache | 1.2 GB compiler bound, 1.3 GB family, actual high hit rates and restore/save times verified (#1309). Overall repository headroom still needs the full-day view. |
| 8. Unify nightly cleanup | Competing purge removed and startup permission failure fixed (#1289). #1338 resolved the macOS assertion; #1365 startup correction passed queue/master/full validation. Latest full run 39089156757 passed all seven app builds and nightly checks. |
| 9. Isolated libobs measurements | Three trials per condition and raw wall/CPU/cache evidence published in #1306. Wall-time ranges overlap. |
| 10. Shorten critical path | Independent OFF/ON runners and Fast Gate/build overlap landed. Product-code queue observation: required gate 843 s; Fast Gate 209 s entirely overlapped with build. Runner cost and coverage recorded; causal/day-scale gain remains unproven. |
| 11. Durable before/after comparison | Full-day baseline and cohort-separated per-step collector ready. At least one full representative post-rollout day remains outstanding. |
This checkpoint preserves the original scope. #1286 remains open while the
Ubuntu app reuse, stable budget behavior and representative-day
comparison are unverified. A green isolated job is not substituted for a
full workflow, and configuration/docs traffic is not substituted for code PRs.
## Isolated C libobs build
Measured the `libobs` target alone, with Rust libobs, frontend, scripting,
browser, websocket and unit-test builds disabled. Source revisions were
`be611227b18bc9df89ad089992e6f05eda6e53ba` (immediately before #1128) and
`d145635326a4753e729a4767eb233911258ef82b` (explicit unity/PCH groups).
Both used the same Nix dependency environment, GCC 15.2, RelWithDebInfo,
eight parallel jobs, and an AMD Ryzen 7 3700X. This is a local Linux build
experiment, not a GitHub runner measurement or an application benchmark.
| Condition | Before median wall (range), s | Current median wall (range), s | Before/current median CPU, s |
| --- | --- | --- | --- |
| Compiler cache disabled, 3 trials | 9.749 (9.654–9.899) | 9.407 (9.390–9.932) | 63.482 / 46.620 |
| Warm ccache rebuild, 3 trials | 1.543 (1.541–1.556) | 1.435 (1.428–1.447) | 2.652 / 2.368 |
The uncached wall medians differ by 3.5%, with overlapping ranges; this
experiment does not establish a robust wall-time gain. CPU work fell 26.6%.
The warm wall difference is 0.108 s (7.0%). Neither result supports calling
the broader 315 → 198 s benchmark a libobs-only improvement. The revisions
also contain intervening source changes, so this comparison measures the
two actual revisions rather than isolating unity as the sole cause. Load
averages are recorded per trial; no attempt was made to monopolize the host.
With ccache 4.13.6, every measured warm trial had 125/125 cacheable hits
before and 39/39 now. The initial cache-population build is retained in the
raw data but excluded from warm medians. Warm trials remove compiler
outputs before building, so they are real rebuilds rather than Ninja
no-ops. Current PCH outputs cover `libobs`, `libobs-objects`,
`libobs-core-modules`, and `libobs-version`; the remaining group families
include their own headers textually under the build policy.
[Raw trials, compiler settings, environment and cache statistics](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/libobs-2026-10-17/)
are committed with the report. Configure and Nix environment startup time
are excluded from build timings. Existing application build directories and
global caches were preserved; benchmark outputs and per-revision ccache
stores live under the same checkout's ignored `build_ci_audit/` directory.
### Reproduce
Use the same checkout, switching source revisions between experiments.
Save the measurement helper under `build_ci_audit/` before checking out an
older revision that predates the helper. Run configure and measurement
inside the same dependency environment, for example
`nix-shell rust/tools/sanitize/shell.nix` on this Linux host.
```sh
mkdir -p build_ci_audit
cp ci/benchmark_libobs.py build_ci_audit/benchmark_libobs.py
# Switch to the revision being measured; use a new directory per revision.
cmake -S . -B build_ci_audit/libobs-example -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DOBS_BUILD_NUMBER=1 \
-DENABLE_FRONTEND=OFF -DENABLE_SCRIPTING=OFF -DENABLE_BROWSER=OFF \
-DENABLE_WEBSOCKET=OFF -DENABLE_RUST_LIBOBS=OFF -DENABLE_UNIT_TESTS=OFF \
-DENABLE_AJA=OFF -DENABLE_WEBRTC=OFF -DENABLE_QSV11=OFF \
-DENABLE_VST=OFF -DENABLE_DECKLINK=OFF \
-DENABLE_ZCCACHE=OFF -DENABLE_CCACHE=OFF
uv run build_ci_audit/benchmark_libobs.py \
--build build_ci_audit/libobs-example --output build_ci_audit/example-cold \
--repetitions 3 --jobs 8 --rebuild
```
For warm-cache trials, add ccache to the environment, reconfigure the same
dedicated build with `-DCMAKE_C_COMPILER_LAUNCHER=ccache` and
`-DCMAKE_CXX_COMPILER_LAUNCHER=ccache`, set a fresh per-revision `CCACHE_DIR`
under `build_ci_audit/` and `CCACHE_MAXSIZE=250M`, then run the helper with
`--repetitions 4 --rebuild --cache-stats`. The first trial populates the
empty cache; compare the next three. The helper requires `safe-rm` to move
only the dedicated build's compiler outputs to trash before each trial.
## Rust compiler cache: verified blocker
The pinned soldr 0.9.35 still reproduces
[zccache#1943](https://github.com/zackees/zccache/issues/1943). A nested Rust
module changed from a comment to `compile_error!`, preserving its size and
nanosecond mtime. Touching the unchanged crate root forced Cargo to invoke
rustc. The cached command returned success with a HIT; the same command
with `SOLDR_RUSTC_WRAPPER=none` failed with the injected diagnostic.
| Step | Exit | Probe error reported | Seconds |
| --- | ---: | --- | ---: |
| Warm valid source | 0 | No | 2.888 |
| Cached changed source | 0 | No: false success | 2.052 |
| Uncached changed source | 101 | Yes | 1.621 |
These durations describe a tiny correctness fixture, not a performance
benchmark. [Captured result](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-rust-cache-source-probe.json).
Keep the local/CI gate's wrapper bypass until this reproduction passes on
the version we adopt. The standalone Linux C/C++ PCH cache upgrade in
[#1265](https://github.com/obs-rust/obs-studio/pull/1265) is separate from
soldr's embedded Rust cache and does not prove this issue fixed.
Reproduce from the repository root with the same executable CI pins:
```sh
uv run ci/cache_source_probe.py \
--directory build_ci_audit/source-probe-new \
--soldr /absolute/path/to/soldr --expected-version 0.9.35
```
Use a new scratch directory for every run. The probe preserves logs and
`result.json`, and exits 1 when the cache fails the source-safety check.
The explicit binary and expected-version check matter: in this checkout,
`uv run` found soldr 0.9.34 on its environment PATH while the shell's soldr
was 0.9.35. Both reproduced the stale success; the table records the explicit
0.9.35 run. No cache or daemon was purged to obtain these results.
The required gate's existing source probe now exercises a nested module
edit preserving size and mtime, so it guards the workaround against this
specific failure mode rather than checking only an ordinary append.
## Timing persistence and scheduled retention
[#1288](https://github.com/obs-rust/obs-studio/pull/1288) enables hidden-file
uploads for `.tier2-cost` and rejects missing or unmeasured OFF/ON timing
files before writing a cache. #1311 subsequently fixed the singleton-artifact
download layout. Master run 39059448618 produced 282 measured records per
mode and saved a 5,920-byte timing cache. Later run 39060831338 restored the
newer nonempty timing entry and completed both CTest modes. Producer,
persistence and consumer evidence are recorded in #1286.
The [failed scheduled run](https://github.com/obs-rust/obs-studio/actions/runs/39002695404)
was rejected before job execution: its annotation says the nested `ci-mode`
job requested `actions: read` but the caller allowed none. This was a workflow
permission error, not a cache script failure.
[#1289](https://github.com/obs-rust/obs-studio/pull/1289) grants that permission
and removes the independent nightly compiler-cache purge. Cache retention
belongs to the existing merge-group/master janitor and `ci.toml`; scheduled
builds reuse its warm entries. Dispatch 39064183327 subsequently started every
job and completed the full native app matrix and security scans. Its separate
macOS ingest-refresh assertion failure (#1334) remains visible; it is not a
startup or cleanup failure.
## A day of baseline CI traffic
The window 2026-10-16 17:00 → 2026-10-17 17:00 UTC contains 473 Pull/Push
workflow runs. Both workflow listings extend before the start of the window,
so the listing limit did not truncate it. Detailed jobs and actual changed
files were inspected for 117 runs, sampled across event/outcome and time,
with extra documentation candidates whose diffs were verified. These are
sample medians, not weighted population estimates.
| Successful gate cohort | Samples | Median created-to-gate time |
| --- | ---: | ---: |
| Code PR | 9 | 16m 56s |
| Code merge group | 8 | 15m 54s |
| Docs PR | 1 | 4m 01s |
| Docs merge group | 2 | 6m 58s |
| CI/config merge group | 2 | 2m 55s |
The sparse docs samples do not establish a stable typical duration.
Across the full listing, merge groups had 35 successful, 163 canceled and
6 failed runs. The sampled canceled code merge groups alone consumed
194.45 runner-minutes. That is observed sampled waste, not an extrapolated
total, and the run outcomes alone do not establish why cancellation occurred.
The window spans earlier CI/build rollouts; this baseline cannot attribute
a later difference to any single cache or concurrency change.
[Summary, outcome counts, listing coverage and per-lane medians](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-16_17-ci-baseline-summary.json)
and [sample IDs, diffs, gate and runner times](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-16_17-ci-baseline-samples.json)
are retained. Cache inventory in the summary is a snapshot at collection
time, not a reconstruction of cache contents at the historical window end.
The full raw run/job/cache responses remain under `build_ci_audit/metrics-before/`
in the measurement checkout; the collector reproduces that evidence.
`ci/cache_metrics.py` resolves source cohorts from actual compare diffs,
including an unambiguous PR branch/lifetime fallback for older runs whose
API metadata no longer contains a PR association. Missing/ambiguous diffs
remain unknown. It reports latest run attempts only and does not reconstruct
overwritten attempts. In addition, every merge-group CI Gate summary now
lists completed setup/cache step durations from the already-fetched job
metadata, without adding another API request to the gate.
Post-change measurements must use a separate window and preserve these
cohort/coverage distinctions. The day-long post-change comparison remains
open until the configuration changes have landed and that window exists.
## Unused gate compiler-cache layer
Master run [39056485478](https://github.com/obs-rust/obs-studio/actions/runs/39056485478),
Fast Gate job 117465447413, restored a 1.2 KB build-cache archive (four
files, 1.8 KB inflated) in 0.7 s. Its final session counters were zero
hits, misses and compilations; post-job save skipped the zero-compile
delta. The local gate explicitly bypasses this Rust compiler cache for
lint, tests and cross checks because of the verified correctness blocker.
Merged #1315 disables this layer only for deferred PR/merge-group Fast Gate runs,
retaining cook and registry snapshots. The full-day sample contains 26
PR and 18 merge-group Fast Gate session reports with no positive compiler
hits (26 and 16 respectively had zero compilations). In contrast, 5/24
master Fast Gate samples and 3/8 PR/queue cross-lint samples had positive
hits. Keep full/master and cross-lint caching rather than extrapolating
from the initial zero-counter run.
The Rust wrapper bypass does not establish that every compiler-cache
consumer is inactive: dependency cooking and C compiler work may still
use it. [Captured sample coverage](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-gate-cache-consumption.json).
This is a small measured operation to remove from the deferred path, not
a claim of a large CI gain. Cold cook may lose potential compiler-cache
reuse after a lock change; retain the published post-job cook snapshots
and measure total live setup/consumer time. Concurrent action phase
times must not be summed as sequential wall time.
## Additional cache inventory: CodeQL overlays
The cache API snapshot at 2026-10-17 18:39 UTC contained 43 entries totaling
4,389,323,635 bytes (below the 10 GB repository budget). This is a live
snapshot, not historical baseline occupancy. Qt's newest entry was
1,114,881,014 bytes; #1309 subsequently corrected its bound and allowance.
At that initial snapshot, GitHub's default CodeQL setup wrote
`codeql-overlay-base-database-*` entries outside the explicit workflow files.
The snapshot included a 131,294,279-byte C++ base and Python bases around
11 MB. They were undeclared then. PR run 39057119695, C++ job 117467259478,
restored the master overlay in about 3.7 s; master run 39057995138 saved a
new base in about 5.1 s. This demonstrated consumption, not a measured
analysis speedup against a cold run.
#1316 subsequently declared a bounded 200 MB LRU overlay family. #1327 then
disabled automatic default setup and moved all four languages to the existing
nightly workflow. The explicit nightly C++ job 117488229574 still uploaded
an overlay base, so the bounded family remains relevant after that migration.
Security analysis stays outside PR/merge-group admission. Its cache behavior
is independent of the compiler-cache hit rates used to assess build speed.
## Queue publication and deeper unit-test caching
The proposed single publisher must account for GitHub's branch-scoped caches:
temporary merge-group caches are not shared default-branch seeds. A queue
payload could be promoted by an existing master-push workflow after verifying
the successful queue run and matching source tree. That publisher would be
the cache-write exception; ordinary jobs could enforce `cache-mode: read`.
No publication-policy change or promotion implementation is claimed here.
GitHub caches are immutable, so refreshed payloads need generation keys.
There is also a GitHub-native alternative to master-side promotion: queue
jobs can publish compressed build-state artifacts, and consumers can select
and download them across workflow runs. The official
[artifact action](https://github.com/actions/download-artifact#download-artifacts-from-other-workflow-runs-or-repositories)
supports this with a run ID and token possessing `actions:read`. This means
literal queue-only production does not necessarily require external storage.
Artifact storage is separate from the native cache allowance, with different
[storage accounting](https://docs.github.com/en/billing/concepts/product-billing/github-actions).
A read-only feasibility check listed #1353's successful queue artifacts and
downloaded its tiny lane-proof marker from a separate CLI session. Its
177,835,306-byte Tier 2 execution-tree artifact remained available with one-day
retention. This verifies discovery and authenticated cross-run access, not
large-payload transfer performance or fork-job token behavior. The execution
tree lacks objects/Cargo state; it is not itself a deep incremental cache.
Before choosing this design, measure one queue-produced build-state archive
and later PR consumption; validate producer repository, merge-group event,
successful required gate and compatibility metadata; bound retained generations
and verify fork access. Preserve executable permissions inside the archive,
keep miss/expiry fallback to normal compilation, and retain current-source
invalidation safeguards. No artifact-backed cache producer or writer-policy
change has been implemented.
Deep Rust state is already present: the pinned setup action's native macOS
post-step saved a `full` archive with 8,238 files, and the local dev archive
contains test fingerprints and incremental state. With the pinned action's
default `cook-delta: false`, a warm base selects no save layer. Measure bounded
generation refresh and consumption before adding a duplicate target archive.
The existing Tier 2 execution-tree artifact is 177,234,558 bytes in run
39069670404. It contains binaries/runtime files, excludes objects and Cargo
state, and currently transfers work from the build job to OFF/ON test jobs.
Exact-input reuse could save compilation work; it cannot replace executing
tests, and it does not supply changed-source incremental reuse by itself.
[A manual deep-cache probe](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-deep-test-cache-probe.json)
demonstrates a separate invalidation problem with the compiler wrapper disabled:
| Condition after target restore | Observed result |
| --- | --- |
| Unchanged source | Unit-test binary reused and executed successfully |
| Ordinary nested edit adding `compile_error!` | Recompiled; exit 101 with current diagnostic |
| Same edit preserving size and nanosecond mtime | Old unit-test binary executed; false success |
| Invalidate changed package's fingerprints | Recompiled; exit 101; unchanged dependency stayed cached |
The guard quarantines package fingerprints without deleting the cached
dependency. The fixture knows which package changed; automatic content-to-package
mapping, generated/build-script inputs and full-workspace invalidation remain
unimplemented. This validates a mechanism, not production cache safety or a
performance improvement. Preserve both existing safeguards while evaluating it.
Run the probe in a new directory within this checkout:
```sh
uv run ci/deep_test_cache_probe.py \
--directory build_ci_audit/deep-cache-new \
--soldr /absolute/path/to/soldr --verify-guard
```
`--verify-guard` requires unchanged reuse, ordinary-edit rejection, guarded
same-stamp rejection and dependency preservation. Without that flag the probe
exits 1 when it reproduces stale unit-test success. Logs and the archive remain
in the chosen directory. No global cache or daemon is purged.
### Native fingerprint helper evaluation
Standalone zccache 1.15.5 already exposes `snapshot-fp-record` and
`snapshot-fp-validate`, so the audit tested those native APIs before adding
production package-mapping logic. Both experiments kept the Rust wrapper
bypassed and preserved the modified nested source's size and nanosecond mtime
through hydration.
| Root package | Native source coverage | Validation report | Unit-test result after validation |
| --- | --- | --- | --- |
| `obs-deep-cache-probe` | 0 crates / 0 sources | 0 clean / 0 dirty | Old binary passed; current compile error absent |
| `obs_deep_cache_probe` | 1 crate / 2 root sources; hyphenated dependency missing | 0 clean / 1 dirty | Old binary passed; current compile error absent |
The naming failure is concrete: the recorder looks for a `.d` file using the
hyphenated fingerprint-directory basename, while Cargo emits a normalized
target filename with underscores. The same construction remains in the
inspected upstream source. It is tracked in
[zccache#1959](https://github.com/zackees/zccache/issues/1959).
The control also establishes a separate semantic limit. Native validation
recognizes changed source when covered, but only future-stamps clean units;
it leaves dirty Cargo metadata intact. It therefore cannot alone enforce
freshness for the preserved-timestamp case. The existing known-package
quarantine rejects the edit and retains the dependency in both fixtures;
automatic production mapping and generated-input coverage remain unfinished.
[Versions, source coverage, CLI outcomes and controls](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-18-native-fingerprint-helper.json).
Reproduce with a new directory and the pinned executables:
```sh
uv run ci/deep_test_cache_probe.py \
--directory build_ci_audit/native-fingerprint-new \
--soldr /absolute/path/to/soldr \
--native-fingerprint-tool /absolute/path/to/zccache \
--verify-native-guard
```
The current pins return 1 because native coverage/invalidation is insufficient.
Repeat in another new directory with `--package-name obs_deep_cache_probe`
for the naming control. Existing `--verify-guard` still verifies only the
known-package quarantine. These are manual experiments; no native helper
was enabled in production CI and no tests were skipped.
### Build-script inputs can defeat deep reuse
The workspace-shaped delta experiment produced a 62,371,228-byte delta versus
a 188,072,837-byte updated full snapshot. Both restores nevertheless rebuilt
`obs-util`. Cargo's diagnostic identified the same source path changing from
1792262706.251336821 to 1792262706.251000000 seconds after hydration. Its
default build-script package scan treated the lost sub-millisecond precision
as changed input. Restoring that one exact original timestamp eliminated the
rebuild in a diagnostic control; no source bytes changed.
The downstream mitigation declares the actual `obs-util/build.rs` inputs:
itself and the applicable Windows C shims. Rust sources remain rustc inputs.
After rebuilding and saving this configuration, an unchanged full restore
kept test products fresh without timestamp edits: compile-only command
0.816 s, versus 6.181 s before the mitigation in the earlier diagnostic run.
These are individual local observations, excluding network and test execution;
the new snapshot's save/restore still cost 12.620/16.628 s. No whole-CI gain is
claimed. [Raw results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-obs-util-build-inputs.json).
The upstream replay-precision issue remains
[soldr#3851](https://github.com/zackees/soldr/issues/3851). This mitigation
does not address same-stat source edits or justify removing the correctness
safeguards. Native Windows input tracking still requires CI validation.
### Host and container cache identities
The pinned janitor's superseded-generation check groups by family and key
shape, ignoring GitHub cache version. An offline probe marks a valid host
archive superseded by a newer container archive with the same cook key and
different version, even though both fit the family allowance. The observed
18,020,243-byte Linux release entry's version matches the container archive
path, not the host path. This does not prove a particular historical deletion.
Use the existing `cache-key-suffix` input to distinguish `linux-host-v1`
and `linux-container-v1`, keeping compatible host jobs together. The pinned
superseded-generation check retains both namespaced fixtures. Profiles and
master-only saves stay unchanged. The input also namespaces the action's Rust
build-cache: first consumers can miss until trusted master seeds exist.
Registry, toolchain, mini and standalone C/C++ keys stay shared as before;
disabled layers stay disabled. No warm entry is forcibly deleted.
[Identity probe and side effects](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-cook-layout-namespaces.json).
Full validation's Fast Gate independently reported a base restore miss and
later reservation conflict. Its cause remains unproven; namespace isolation
is not evidence that this conflict is fixed. Measure fresh seeds and later
consumers before claiming improved deep reuse or a throughput gain.
## Post-job cook-profile comparison
The pinned action saves its cook archive **after** the job's consumers, so
an archive initially cooked with `--release` can contain dev/test artifacts. A pre-consumer
snapshot is not an adequate model for disabling this cache.
The isolated local experiment used soldr 0.9.35, four Cargo jobs, identical
compiled Rust inputs and dependency environment, wrapper bypass enabled
for consumers, and post-job snapshots taken after workspace clippy and
`obs-util` tests. Each restored snapshot ran warm cook, workspace clippy
and the same tests. Policy order rotated across three trials per scenario.
A forced core rebuild touched the unchanged obs-util crate root and
required actual recompilation in the log; source bytes were preserved.
| Policy | Unchanged median (range), s | Core rebuild median (range), s | Archive bytes |
| --- | ---: | ---: | ---: |
| release cook | 57.259 (56.007–57.611) | 67.869 (67.801–90.592) | 205,118,438 |
| dev cook | 36.170 (35.849–40.269) | 82.736 (48.692–139.906) | 187,723,562 |
| no cook/archive | 72.136 (71.493–74.113) | 78.291 (73.830–79.011) | 0 |
[Raw trial results](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-17-soldr-cook-post-job.json) include
individual command, restore and warm-cook durations and load averages.
The totals include local restore plus consumer commands, excluding network
transfer, formatters, Dylint and post-job save. Initial archive creation
took 8.534 s for release and 7.203 s for dev. Local archives cover selected
tests and are smaller than the 637,542,999-byte live CI release snapshot;
their sizes are not predictions of full-workspace CI archives.
Dev cooking clearly wins the unchanged-input scenario here. Core rebuild
variance is large and the ranges overlap; its median favors release, so
these data do not establish a universally fastest profile. Disabling cook
loses useful post-job artifact reuse. Retain release cooking on core work
until live comparisons justify changing it, and evaluate dev cooking for
non-core Fast Gate runs with unchanged workspace inputs. Match explicit
release/static-library consumers to release; do not infer cross-target
benefits from this host-only experiment.
Reproduce using a fresh directory in the same checkout and the same Nix
dependency environment (existing target caches are left intact):
```sh
nix-shell rust/tools/sanitize/shell.nix --run \
'uv run ci/benchmark_soldr_cache.py --directory build_ci_audit/cook-new --soldr /absolute/path/to/soldr --trials 3 --jobs 4'
```
Keep compiled sources fixed throughout. The recorded run reused completed
seed consumers at their original target paths, then modeled actual
post-job saves. A measurement assertion initially expected Cargo to label
a forced rebuild only “Checking”; Cargo correctly used “Compiling”. The
assertion was corrected, that attempt's logs were preserved, and only the
remaining unrecorded trials resumed. All published trials passed.
## Dylint setup-soldr feature audit
Fast Gate currently invokes `soldr cargo dylint` after stable-profile
clippy. In master run 39056485478, job 117465447413, catalogued Dylint
tools/driver downloaded from 18:05:40.654 to 18:05:41.944. Nightly
`rustc-dev`, `rust-src` and `llvm-tools` preparation then lasted until
18:06:06.119, roughly 24 seconds. The repo plugin pins
`nightly-2026-05-28`; caching that foundation is a plausible opportunity.
However, pinned setup-soldr b782f606a2f3beadc35b9e3bf5b4565e005f52ed
[resolve-setup.ts](https://github.com/zackees/setup-soldr/blob/b782f606a2f3beadc35b9e3bf5b4565e005f52ed/src/lib/resolve-setup.ts)
forcibly sets `inputs.prebuildDeps = "none"` whenever `dylint: true`,
including explicit cook inputs. That mode assumes a Dylint-only job; it
is not a drop-in improvement for this mixed stable-check/test/Dylint job.
Its foundation cache also owns exact nightly paths, while legacy
`dylint-cache: true` alone does not include those paths by default.
**Decision:** retain the current mixed-job mode and ordinary cook reuse.
Do not enable `dylint: true` indiscriminately to maximize feature count.
The measured post-job cook benefit would be lost, and the network/restore
tradeoff of a separate foundation has not yet been measured. A dedicated
Dylint lane or an explicit mixed-job foundation implementation would need
its own setup/restore/consumer/save benchmark, required-gate integration,
nightly/target identity checks and bounded retention before adoption.
No workflow or cache family was added for this rejected rollout.
# macOS Qt contract artifacts (#5008, slice c)
`ci/macos_qt_artifact.py` prepares the four contracts selected by the conditional
`Check Published Qt SDK` step in `rust-tests-macos`. It adds their target
executions to the existing `ci/macos_test_artifact.py` bundle. The workflow switch
remains separate: this infrastructure alone changes no hosted job.
```sh
uv run --no-project ci/macos_test_artifact.py build --output build_macos_tests
uv run --no-project ci/macos_qt_artifact.py build --work /tmp/obs-qt-producer --bundle build_macos_tests
# On macOS, extract the bundle into the same real checkout path, then:
uv run --no-project ci/macos_test_artifact.py run --manifest manifest.json
```
Use a fresh work directory for each preparation. The helper downloads and verifies
the Qt SDKs, asks soldr for its LLVM/Apple SDK drivers, cross-builds static cmocka,
and runs the original Rust tests on Linux with Darwin target selection. All graph,
generated-code, target-count, CMake configuration and CTest property assertions
still execute. Calls that would run target binaries instead record pending
executions. A successful preparation receipt proves preparation only. The macOS
manifest runner must execute every record and check its exit status; it preserves
the recorded working directories, environment, arguments and timeouts. No compiler,
Cargo, CMake build, or Qt generator is invoked by those runtime entries.
| Rust contract | Native sources and runtime coverage | Qt / libobs linkage |
| --- | --- | --- |
| `native_test_graph_generates_qt_metaobjects` | Generated `answer.hpp`, `answer.cpp`, `twin.cpp`, `answer.ui`, `answer.qrc`, `payload.txt`; both native and CMake builds. The answer checks the metaobject, invokable return value, generated form/header precedence and embedded resource; CMake also runs twin. | Core, Gui, Widgets; Linux moc/uic/rcc. No libobs. |
| `canonical_remux_queue_runs_unchanged` | Darwin selects `test_top_level_windows`, `test_frontend_api_call`, `test_profile_import`, `test_remux_queue_model`, `test_settings_track_rows`, plus source-present `test_ws_image_mime` and `test_ws_session_duration`. Sources come unchanged from `test/cmocka/build/test-graph.json`: `test/cmocka/test_.cpp`, `frontend/utility/RemuxQueueModel.cpp.hpp`, its moc header, the settings `.ui`, and the graph's source-only WebSocket helpers. The original CMake subset and all its property/inventory assertions remain. | Core, Gui, Widgets and static cmocka. These selected targets do not link libobs. Qt Test is absent from the pinned published SDK, so its original optional backtab guard remains false; Linux-only graph cases retain their original host guards. |
| `canonical_frontend_product_and_meter_tests_run_unchanged` | `test/cmocka/test_product_name.c`, `frontend/utility/product-name.c.h` and `test/cmocka/test_volume_meter_snapshot.cpp`; both native and CMake consumers. | Static cmocka and pthread; no Qt or libobs runtime. |
| `canonical_frontend_utility_tests_run_unchanged` | Original named frontend utility graph, selected for Darwin by `native_test_facts`; unchanged C tests plus their graph-listed frontend, host-policy and utility sources. Both native and CMake consumers retain the exact target/test inventory assertions. `graph.json` in the payload records the full source inventory. | Static cmocka, libcaption and system math as selected by the graph. Existing core-header interfaces remain headers only; no substituted libobs or installed libobs is linked. |
The remux inventory assertion also accounts for the two source-only WebSocket
owners that `validation::build_qt_tests` already discovers. It still checks exact
equality, and those helpers remain in the runtime payload. No WebSocket source,
public header, or existing C test is modified.
The SDK pins match the existing job and cross-compile host-tool pins:
| Input | URL | SHA-256 |
| --- | --- | --- |
| Darwin Qt 6.11.1 universal2, deployment target 11.0 | | `85093eae764f83d167f8850c5b057c0ff5d2f928ad7d49fe2544ce0ca20074b0` |
| Linux x86-64 Qt 6.11.1 host tools | | `f0edfc3432bd57058bbb9a2cf18aacceb55a2564b018346778c34eb0e3369dbf` |
| cmocka 1.1.7 source, compiled for Darwin on Linux | | `810570eb0b8d64804331f82b29ff47c790ce9cd6b163e98d47a4807047ecad82` |
`CMakePresets.json` additionally pins obs-deps' macOS Qt package from
`obs-rust/obs-deps` release `2026-10-25`, hash
`322cf861992c957f5fd2b3ec43ce42eebdb7162cce7f81f74c651b184e67adcd`.
This producer uses the published SDK that the original integration job tests.
The runtime closure contains arm64 Core, Gui, Widgets frameworks and both minimal
and offscreen platform plugins. The generated metaobject contract uses minimal;
the unchanged Darwin C tests select offscreen in-process. Their load names already
use `@rpath`; the producer supplies
relative `@executable_path` rpaths for each native/CMake layout and rejects
unbundled load paths. macOS system dependencies include libc++, libSystem,
Objective-C, zlib and the Apple frameworks exported by the Qt interfaces (including
IOKit, DiskArbitration, UniformTypeIdentifiers, AppKit, CoreFoundation and
Foundation). No Apple SDK or Linux host tools are needed by the consumer.
The original arm64 Qt slices keep their ad-hoc signatures. soldr's ld64.lld signs
each new arm64 executable. The shared verifier checks every SHA-256 CodeDirectory
page, permits Apple's zero signature padding, and retains execute-only checking
by default; Qt dependency checks explicitly permit dylibs/bundles. Checksums cover
the complete transported payload. Missing contracts, missing/corrupt files,
unsigned or wrong-architecture output, unknown runtime properties and producer
load paths fail preparation. Hosted macOS execution and timing remain unverified
until the complete run-only workflow is activated.
# Merge-group scope and native runner capacity — 2026-11-04
Current decision (#4747, authorized in #4743): merge groups execute selected
heavy checks on the merge result. This supersedes the November 4 Linux-only
placement decision described below. PR routing stays unchanged until the
separate admission cutover; full application builds remain nightly/manual/release.
The immutable event base/head diff includes every PR in the group. Core/shared
changes select both native Windows and macOS Rust tests and Tier 2; platform
paths retain their current selection. Linux Tier 2 runs two complete suites,
OFF and ON, from the existing shared build/runtime producers. Qt, C/C++ cross
compilation and touched Linux targets keep their path rules. Every non-docs
group also runs Windows MSVC test linking and clippy/Dylint for the host plus
all five cross targets. The two main cross targets still link tests with
`--no-run`; the extra three lint only. GNU-oracle link coverage is retained.
No client trailer, hosted input proof or cached test/lint verdict may suppress
queue execution. Build and Format set `SOLDR_VERDICTS=off`; compiler/dependency
artifacts may still be restored. CI Gate computes a full expected job manifest
independently of reusable outputs and requires success for every selected job,
including individual matrix legs and complete OFF/ON modes. Missing, skipped,
unfinished, cancelled and runnerless selected jobs reject admission. True
out-of-scope skips remain allowed. The required context is still `CI Gate ✅`.
Eligible Linux jobs use the selected `MQ_RUNNER_LABELS` with hosted fallback;
native jobs retain native runners. Capacity failures remain failures and never
authorize bypassing the queue. Cancellation and independent janitor behavior
are unchanged. Security scans, sanitizers and packaged/hardware qualification
remain on their existing nightly/manual/release events.
## Failure and cause
[Merge-group run 41859960760](https://github.com/obs-rust/obs-studio/actions/runs/41859960760)
concluded failure. Event Data job 126678747964 logged
`full=false core=true macos=true windows=true qt=false tier2=true asan=false`.
CI Gate job 126688014957 reported
`CI Gate did not receive the merge group's core scope`.
The caller consumed `needs.build-project.outputs.core` across a reusable-workflow
boundary. That value was empty after nested macOS jobs 126679116973 and
126679117143 ended cancelled, with empty runner names and no assigned runners
or steps. The gate checked scope before querying jobs and hid the cancellation.
The observed evidence establishes lost output despite successful computation;
GitHub's internal output propagation after cancellation is not observable.
The gate now reads `merge_group.base_sha` and `head_sha` from `GITHUB_EVENT_PATH`
and diffs those immutable commits. Invalid/missing fields, unavailable commits
and unsuccessful Event Data fail closed. Job failures are printed first, so a
missing scope input cannot hide them. A cancelled job with explicit empty
runner identity and no steps is diagnosed as a runner-capacity condition and
still fails. Other cancellations, failures, timeouts, startup failures and
action-required results continue to block. No automatic retry masks failures.
Maintenance exemptions are unchanged. No ruleset changes are needed: the sole
required context remains `CI Gate ✅`.
## Capacity evidence
[forge-ci/zccache run 41857782623](https://github.com/forge-ci/zccache/actions/runs/41857782623),
observer job 126671059827, concluded failure and observed macos-15 queued for
909 seconds. Another repository and runner image also exhibited starvation;
this supports hosted capacity pressure rather than an OBS code failure.
## Real master-push execution baseline
[Push run 41849221687](https://github.com/obs-rust/obs-studio/actions/runs/41849221687)
concluded success. macOS Rust Tests job 126640904675 ran 14:36:42–14:45:30 UTC
and macOS Tier 2 job 126640904805 ran 14:36:42–14:47:04 UTC on November 4,
both with assigned runners and success conclusions. Windows jobs 126640904718
and 126640904827 also ran successfully. The macOS application job was skipped,
as intended, and is not execution evidence. Post-change queue/push observations
belong on the PR. A cancelled workflow is never green proof.
## Regression coverage
RED commit `3b23668df`: three focused tests failed with seven assertion failures:
missing capacity diagnosis, a healthy queue rejected for empty reusable output,
and native queue selection. That change resolved scope independently and preserved fail-closed diagnostics.
The current tests restore selected heavy execution and enforce its manifest.
Tests extend the existing Python files. Rust/C/API port tiers do not apply to
this CI-only change. Push-scope regressions preserve native selection for core
and platform changes; tests do not substitute for real hosted execution evidence.
# Linux Tier 2 concurrency audit — 2026-10-21
Issue: [#1634](https://github.com/obs-rust/obs-studio/issues/1634).
Initial experiment binaries built from `0b10a2f61389076e7eea82343a4d14f80b5b1723`.
## Landing decision
PR [#1643](https://github.com/obs-rust/obs-studio/pull/1643) CI run
[39658456956](https://github.com/obs-rust/obs-studio/actions/runs/39658456956)
failed OFF shard 1: `yadif_2x_bottom_first_50i_into_30` skipped up to three
fields where the assertion allows one. The local capped successes below did
not establish CI reliability. **Retain deinterlace's serial guard** and the
renderer budget; remove the other nine broad barriers using the isolation
described below. The two-shards-per-backend CI matrix remains unchanged.
The output-delay blocker is corrected in core teardown: publish `active=false`
before emitting `deactivate`. A new real-libobs regression observes state
inside the synchronous callback. Both normal and forced stop fail
deterministically against both original backends; the fix passes 100
iterations per stop path per backend (400 stop cycles). Existing C tests and
public headers are unchanged.
This fixes the core notification ordering; #1391's separate frontend work is
not claimed as completed here.
The tables below retain the exploratory results, including failed trials;
they are not timings of the final conservative scheduling policy.
Final local verification, rebased onto `f3e6260b1`: the official Linux harness
passed all 351 registered CTests in both modes (169.61 s OFF, 169.20 s ON),
with the same three unavailable PulseAudio skips. Registry checks confirm no
loss of the original 346 tests: four tests arrived on master and one is the
new deactivation regression. Only deinterlace remains serial with Xvfb
available; every Linux registration retains the renderer budget. Export
comparison still matches all 1,766 symbols; the updated base excludes 64
ported C implementations from hybrid libobs.
This final run used the harness's unrestricted CPU affinity (16 logical CPUs
reported), not the exploratory four-core affinity. It verifies correctness;
its timings are not a controlled speed comparison with the initial base.
PR CI and the merge queue remain the required merge checks.
## Findings
The ten CTest `RUN_SERIAL` properties prevent their test process from
overlapping **any** other CTest process in the same invocation. They do not
reserve a CPU, isolate the host, or imply that each test needs its own machine.
Eight have no identified resource conflict across processes. One mutates a
shared display; one is especially sensitive to CPU scheduling.
| Test | Resource / reason | Proposed scheduling |
|---|---|---|
| `test_async_delay_audio` | Process-owned source and real-time audio assertions | Concurrent; retain assertions and timeout |
| `test_audio_clock_drift` | Synthetic source timestamps; does not change the system clock | Concurrent |
| `test_deinterlace_2x_field_order` | Real-time field delivery; software-renderer CPU contention | Retain serial guard and worker budget after CI failure |
| `test_inhibit_sleep_dbus` | Private GTestDBus and fake service | Concurrent; preserve private bus |
| `test_media_cover_art_seek` | Process-owned media/source; timestamp-named temporary files | Concurrent |
| `test_pipewire_screencast_resume` | Private PipeWire daemon, bus and temporary runtime directory | Concurrent; preserve wrapper |
| `test_pipewire_screencast_shm` | Same private PipeWire wrapper | Concurrent; preserve wrapper |
| `test_screencast_portal_teardown` | Private GTestDBus and fake portal; environment changes affect only its process | Concurrent |
| `test_vlc_audio_pacing` | Process-owned VLC source; timestamp-named files; real-time pacing assertions | Concurrent; retain assertions and timeout |
| `test_xshm_resolution_change` | Changes global RandR resolution on its X server | Private `xvfb-run -a`; keep serial fallback if unavailable |
Many guards arrived together in `142aad0a7` (#837), when parallel CTest was
introduced. Their presence alone is not evidence of a machine-wide dependency.
### CPU contention
Mesa llvmpipe normally creates rendering workers according to available cores.
Eight test processes can each create a worker pool. `LP_NUM_THREADS=1` bounds
each software renderer without changing OBS frame-rate settings or assertions.
One observed deinterlace process had 14 threads with the default and 8 with
the cap; the cap does not limit every thread in the process.
See [Mesa's environment documentation](https://docs.mesa3d.org/envvars.html)
and [llvmpipe documentation](https://docs.mesa3d.org/drivers/llvmpipe.html).
The candidate appends that environment setting to Linux CTest registrations
and sets it in the Linux validation harness. Existing environment entries,
test names, skip behavior and timeouts are preserved. It gives XSHM its own
display and removes the other broad barriers. No C test body or public header
is changed.
### Restrictions to retain
Rust integration helpers using `--exact --test-threads=1` already start
independent child processes. The one-thread option applies to a child running
one test; it does not serialize the parent suite. Keep it.
Allocation counters (`bnum_allocs`), log-handler replacements, callback
stand-ins and oracle globals are shared **within a process**. Existing child
isolation or locks protect those checks. Separate processes can share one
machine. Examples: `rust/obs-util/tests/common/mod.rs`,
`rust/obs-output/tests/output/main.rs`,
`rust/obs-callback/tests/callback/proc_parity.rs`, and
`rust/obs-missing-files/tests/missing_files/main.rs`.
Build serialization (Cargo target locks and Windows x86 build limits) is a
different concern; this audit does not propose removing it.
Cmocka cases inside a single executable still run sequentially. Many reuse
the process's libobs singleton and fixtures. Parallelizing executables
already permits concurrency on one machine without making those fixtures
thread-safe or splitting every case into a separate runner.
## Runtime evidence
The experiment uses the existing Linux validation image and build volume,
four allowed CPU cores (`taskset -c 0-3`) and `ctest -j8`. OFF loads
`libobs-c-reference`; ON loads hybrid `libobs`. An `ldd` check verifies the
loaded backend. The build compared 1,766 exported symbols and excluded 63
ported C implementations from hybrid libobs.
This is a shared Ryzen 7 3700X host. Affinity is not exclusive CPU reservation;
host load varied substantially. Results measure CTest execution, excluding
compilation, downloads, runner provisioning, queue delay and final CI gate.
| Configuration | C reference (OFF) | Hybrid (ON) |
|---|---:|---:|
| Original ten serial guards, complete suite | 325.5 s, pass | 338.3 s, pass |
| Remove all ten, private XSHM, default renderer workers | 99.8 s, **deinterlace failure** | 95.6 s, pass |
| Keep deinterlace serial, remove other nine | 173.9 s, **deinterlace failure** | 168.1 s, **output-delay failure** |
| Remove all ten, private XSHM, one renderer worker | 100.1 s, pass | 98.3 s, pass |
| Actual candidate registrations, repeat 1 | 96.6 s, pass | 94.1 s, pass |
| Actual candidate registrations, repeat 2 | 93.9 s, pass | 98.1 s, **output-delay failure** |
| Actual candidate registrations, repeat 3 | 93.7 s, pass | 95.8 s, pass |
All six actual-source runs retained 346 registered CTests, 2,146 cmocka case
starts, all 40 deinterlace cases, identical internal skip names and the same
three top-level skips. Their output was not truncated. Five passed; one hit
the output-delay race. Deinterlace passed all eight capped full-suite runs
(the initial exploratory pair plus the six actual-source runs).
An additional original-policy OFF run used the repository's two-shard
planner with the measured baseline costs: 172 and 174 tests, respectively.
The shards took 155.9 s (deinterlace failed) and 176.8 s (passed), measured
sequentially on the same host. Their sum is 332.8 test-runner seconds; the
longer is 176.8 s. The longer time is only an estimate of ideal concurrent
latency, not an observed concurrent workflow time. This plan may differ
from the historical costs used by a particular CI run.
Their combined full outputs contain 2,146 cmocka case starts. Both initial
capped full runs also contain 2,146 starts, all 40 deinterlace cases, and the
same internal skipped-case names as the combined old shards. They contain
no truncated outputs. This checks execution below CTest's executable count.
Every complete run registered 346 CTests. The same three unavailable
PulseAudio tests were skipped: `test_pulse_monitor_device`,
`test_pulse_stream_restart`, `test_pulse_two_sources`. Initial passing outputs
were truncated by CTest; subsequent validation retains full output to compare
internal cmocka execution and skips as well.
### Failures are retained
* Unbounded parallel OFF failed `linear_2x_top_first_50i_into_50`: three skipped
fields, where the unchanged assertion permits none. This is the timing
sensitivity tracked by [#456](https://github.com/obs-rust/obs-studio/issues/456).
* OFF also failed deinterlace when it was still serial and ran first, alone
within CTest. Serialization cannot protect it from other host workloads.
* ON with deinterlace serial failed `test_output_delay_e2e` at its inactive
assertion after `deactivate`. `libobs/obs-output.c.h` signals `deactivate`
before clearing `output->active`. This matches the ordering problem already
tracked by [#1391](https://github.com/obs-rust/obs-studio/issues/1391).
It is not proof of a cross-test resource collision.
No assertion, expected frame count, test selection or retry policy was relaxed
to hide these failures. A successful small group or single full run is not
enough evidence for a reliability claim.
The second exploratory actual-source hybrid run reproduced
`force_stop_skips_delay` at line 484 with the renderer cap enabled. The cap
alone did not resolve the lifecycle race. The landing revision fixes this
ordering in core and adds the deterministic regression described above,
without adding a whole-suite serial guard for output delay.
## Sharding decision
The existing workflow uses two shards per backend: four test jobs. Once the
concurrent suite is reliable, one complete invocation per backend would use
two jobs and avoid duplicated runner setup. Keep OFF and ON coverage.
Retain the current CI shard matrix: the field-order test still needs timing
isolation, and a smaller shard count needs actual gate-latency and runner-cost
measurements. The core signal-ordering fix removes the output-delay blocker;
it does not eliminate real-time field-delivery sensitivity. This PR does not
change the workflow matrix or complete #1391's separate frontend work.
The unsharded capped trial is about 3.3 times faster than the original
unsharded suite on this host. That is **not** a measured CI gate speedup or a
comparison with two concurrent CI shards. The repeated actual-source runs
support the concurrency mechanism but expose the remaining race. The broader
representative-day runner-cost/gate study remains
[#1581](https://github.com/obs-rust/obs-studio/issues/1581).
## Reproduction and artifacts
Verification: 27 focused configuration, environment and shard tests passed;
the changed CMake scheduling files passed pinned gersemi; Bash syntax and
`git diff --check` passed. The full local gate was not run. No Rust source or
protocol implementation changed; the runtime evidence here is Tier 2 against
both backends. The candidate remains for review; PR CI decides a merge.
Build the native suite using `OBS_TIER2_STAGE=build
rust/tools/linux-validate/run.sh`, following `docs/ci-tooling.md`. Run baseline
and candidate scheduling against the same tree/image and both library paths,
with fresh HOME/XDG directories per run. Capture registry and complete output:
```sh
ctest --test-dir /build/tree --show-only=json-v1
LP_NUM_THREADS=1 taskset -c 0-3 xvfb-run -a \
'--server-args=-screen 0 1280x1024x24 -noreset' \
ctest --test-dir /build/tree -j8 --output-on-failure \
--test-output-size-passed 10485760 --test-output-size-failed 10485760 \
--output-junit /audit/result.xml
```
The command runs inside the repository's bounded `ci/docker-task.sh` wrapper;
set `LD_LIBRARY_PATH` to `/build/tree/libobs-c-reference` for OFF and
`/build/tree/libobs` for ON. Save every failure, rather than retrying until
green. Native code is identical across the comparison; CMake reconfiguration
applies the candidate registrations.
Local raw logs, JUnit, generated registry and experiment scripts are retained
in `build_ci_audit/serial1634/`. The [companion JSON](ci-serial-audit-2026-10-21.json) retains run
summaries, including unsuccessful experiments and observed host load.
# CI speed batch: October 21, 2026
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Work tracked in [#1581](https://github.com/obs-rust/obs-studio/issues/1581).
All five implementation PRs merged. The full post-rollout day and later
decisions are reported below. Comparisons are observational, not controlled
estimates of the effect of an individual change.
## Baseline
Read-only collection covered October 20 00:40 UTC through October 21 00:40 UTC.
The initial 31-run stratified sample was expanded to all 265 listed runs.
[Full-window evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-ci-speed-baseline-full.json)
retains every inspected run URL/revision, outcomes, cohorts, per-lane timings,
and sample counts. The initial sample remains available separately in
[its original snapshot](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-ci-speed-baseline.json).
| Successful code cohort | Runs | Median required gate | p95 |
| --- | ---: | ---: | ---: |
| PR | 83 | 723 s | 1,121 s |
| Merge group | 61 | 697 s | 988 s |
p95 uses nearest rank. Canceled code queue runs consumed 324.065 runner-minutes
in this window; this is observed elapsed job time, not billed cost. Unknown
source diffs, manual dispatches and CI/config changes remain separate cohorts.
The collector's broad `code` category includes Rust harness/test paths; inspect
lane selection and changed files before treating a CI/harness rollout as
representative of product changes.
Reproduce with the existing collector:
```sh
uv run ci/cache_metrics.py --output build_ci_audit/1581-before \
--start 2026-10-20T00:40:00Z --end 2026-10-21T00:40:00Z --per-group 1000
```
## Where time goes
[Queue run 39521142237](https://github.com/obs-rust/obs-studio/actions/runs/39521142237)
took 696 seconds through CI Gate: 36 seconds initial orchestration, 215 seconds
overlapping Fast Gate/build, 3 seconds transition, 422 seconds concurrent OFF/ON
test jobs, and 20 seconds final aggregation. Tier 2 compilation is already
overlapped. The build step's 96 seconds includes orchestration, not just compiler
CPU time. Across eight inspected successful runs, that step took 66–96 seconds.
The ON suite registered 341 tests and took 331.24 seconds. Five RUN_SERIAL tests
had durations of 82.79 seconds (deinterlacing), 59.26 (async audio delay), 38.87
(PipeWire resume), 34.61 (VLC pacing), and 23.60 (audio clock drift). Increasing
CTest parallelism cannot overlap a RUN_SERIAL test with other tests in its
environment. Three PulseAudio device scenarios skipped; preserve that distinction
between registration and executed coverage.
## Decisions and current evidence
1. **Overlap Qt with Fast Gate — implement and measure.**
[PR #1582](https://github.com/obs-rust/obs-studio/pull/1582) starts Qt after
successful scope detection while keeping both jobs required. Configure,
build, and test phases get separate successful-phase wall times. In its
[PR run](https://github.com/obs-rust/obs-studio/actions/runs/39523981726),
Qt ran 00:53:16–00:56:23 UTC and Fast Gate ran 00:53:29–00:55:42: all
133 seconds of Fast Gate overlapped Qt. This verifies scheduling, not a
causal before/after speedup. Failed-gate wasted Qt time remains to measure.
2. **Two isolated Tier 2 shards per mode — retain rollout for day measurement.**
[PR #1583](https://github.com/obs-rust/obs-studio/pull/1583) reuses the build
artifact and duration planner. Four runners replace two; each keeps
RUN_SERIAL intact and verifies all plans partition its actual CTest registry
exactly once. Missing plans fail closed. Both its PR and queue passed with
341 registered tests per mode and the same three PulseAudio device skips.
The PR split OFF 169+172 and ON 171+170; all 338 executed tests per mode
passed. No C test or RUN_SERIAL property was changed. The first queue's
longest test step took 178 seconds; required gate took 485 seconds. The
increased runner cost remains part of the final acceptance decision.
3. **Prepared Tier 2 environment — defer deployment under #1592.**
Cached apt archives still leave 30–52 seconds installation per job. A
prepared image must beat stock-image setup including pull/restore time,
with a pinned reproducible package set. Existing
[#525](https://github.com/obs-rust/obs-studio/issues/525) gates dependency
producers on measured payoff and explicit sign-off for repository/workflow
creation. The [local experiment](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-tier2-environment-experiment.json)
measured 150.634 seconds for a fresh stock container with seeded apt archives
versus 4.343 seconds for a fresh container from a resident prepared image.
Both package/version fingerprints matched. The prepared image is 541 MB
uncompressed. These local figures exclude registry publication and a fresh
runner's download/unpack; local installation is much slower than CI. The
current credential cannot inventory registry packages (`read:packages`,
HTTP 403), and no compatible published immutable image was verified.
[#1592](https://github.com/obs-rust/obs-studio/issues/1592) records the
publication/access and fresh-runner benchmark gate. Keep stock Ubuntu and
apt caching in this batch; no producer, workflow or image publication was
introduced, and no net CI environment gain is claimed.
4. **Rust compilation — retain settings; measure individual rebuilds next.**
The three inspected workspace test steps combine about 35–41 seconds of
Cargo-reported build/link work with 59–62 seconds between first test launch
and last test-result output. The compiler is a substantial portion, but
treating the whole 96–102 second step as compilation overstates it. The
[phase evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-rust-test-phase-profile.json) retains
run IDs, command timestamps and output spans. Merged
[#1590](https://github.com/obs-rust/obs-studio/pull/1590) extracts these
with `--include-logs`, including Soldr timestamp prefixes and raw or escaped
ANSI colors, without another build. Missing markers remain unknown.
Linker-only cost, exact process teardown time and Cargo rebuild reasons
remain unavailable from these log lines. Controlled per-unit profiling and
rebuild/fingerprint work remain with
[#1286](https://github.com/obs-rust/obs-studio/issues/1286). Keep the Rust
wrapper bypass and fingerprint safeguards; no compiler-setting speedup is
claimed from three unmatched revisions with restored cook archives.
5. **Scheduling gaps — measure intervals and remove empty publication work.**
In [run 39520254679](https://github.com/obs-rust/obs-studio/actions/runs/39520254679),
Tier 2 aggregation ended at 00:26:12 UTC, CI Gate was created at 00:26:13,
and a runner started it at 00:28:29. Thus 136 of the 137 seconds were after
job creation, rather than compilation or a running dependency. The API
does not establish the dispatch delay's cause. The baseline also contains
job creation-to-start intervals of 427 seconds for a Tier 2 build and 818 seconds for a Swift
format job. Report job-created-to-started duration separately from job
execution. Creation-to-start intervals can include dependency waiting and
cannot isolate dispatch latency without inspecting readiness; avoid inferring
capacity exhaustion or changing concurrency
policy from one observation. In the shard PR, the Tier 2 publication job
waited 96 seconds, ran for four seconds and skipped every work step. Merged
[#1589](https://github.com/obs-rust/obs-studio/pull/1589) checks for an
eligible proof or master timing publication before requesting that runner.
Matrix failures remain failures of the required gate. Interval and sample
tail reporting landed in [#1585](https://github.com/obs-rust/obs-studio/pull/1585).
## First rollout observations
[Literal timings and coverage](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-ci-speed-rollout.json)
retain run IDs and the source diff between the two queue trees. Libobs, Rust
crate, Cargo/toolchain and cmocka test source paths were unchanged; CI/harness
and frontend files changed. Runners and setup/cache conditions differ, so
these observations do not isolate a causal speedup or replace a full day.
| Observation | Earlier queue | Shard PR | Shard queue |
| --- | ---: | ---: | ---: |
| Required-gate wall | 696 s | not used as queue comparison | 485 s |
| Concurrent test-job phase, including setup | 422 s | 283 s | 254 s |
| Summed test-job runner time | 838 s | 970 s | 982 s |
| Registered tests per implementation | 341 | 341 | 341 |
| Skipped device scenarios per implementation | 3 | 3 | 3 |
The queue observation is 211 seconds shorter with about 17% more test-job
runner time. More isolated runners trade cost for latency. The PR observation
also exposed the empty publishing job's avoidable runner wait; #1589 removes
that job only when no proof or timing publication is possible.
## Full post-rollout day
[Day evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-ci-speed-day.json) covers October 21
01:20:52 UTC through October 22 01:20:52 UTC. Collection began after a
30-minute drain and completed at 01:57 UTC: all 276 listed runs were inspected,
with three successful code PR and three successful code queue logs sampled at
evenly spaced positions. Both workflow listings extend before the window.
The evidence retains revisions, changed paths, outcomes, lane summaries, cache
inventory, sampled log hashes and parsed output. Cache inventory describes
collection time, not the window-end cache contents.
### Before and after
The broad code cohort became slower overall. Do not use the earlier single
485-second queue observation as the day's expected runtime.
| Successful code cohort | Before n | After n | Median before → after | p95 before → after |
| --- | ---: | ---: | ---: | ---: |
| All code PRs | 83 | 58 | 723 → 791.5 s | 1,121 → 1,874 s |
| All code queue runs | 61 | 55 | 697 → 711 s | 988 → 1,197 s |
The following comparison matches the complete set of non-skipped job names,
normalizing only the shard suffix. It includes format and cross-platform jobs
in the matching key, rather than treating every code change as equivalent.
Linux rows run Fast Gate and Tier 2 without Qt or native platform lanes; Qt
rows run Fast Gate and Qt without Tier 2. The JSON contains all matched groups,
run membership and the comparison source. These are comparable lane cohorts,
not identical code or controlled runner/cache experiments.
To reproduce every matched group, outcome/cost total and first-attempt
sensitivity calculation from the committed inputs, run from the repo root:
```sh
uv run --no-project python - <<'PY'
import json
from pathlib import Path
import sys
path = Path('docs/ci-evidence/2026-10-22-ci-speed-day.json')
data = json.loads(path.read_text())
sys.argv = ['reproduce-comparison', str(path)]
exec(compile(data['reproduce_comparison_source'], 'reproduce-comparison', 'exec'))
PY
```
| Selected lanes / event | Before n | After n | Median before → after | p95 before → after | Median runner-minutes before → after |
| --- | ---: | ---: | ---: | ---: | ---: |
| Linux Tier 2 / PR | 55 | 25 | 723 → 593 s | 1,219 → 1,085 s | 21.767 → 25.600 |
| Linux Tier 2 / queue | 38 | 24 | 696.5 → 581.5 s | 1,050 → 902 s | 22.242 → 25.100 |
| Qt / PR | 3 | 4 | 576 → 358.5 s | 608 → 453 s | 9.433 → 9.758 |
| Qt / queue | 2 | 4 | 487.5 → 401 s | 522 → 412 s | 9.483 → 9.975 |
Linux medians are 130 seconds (18.0%) and 115 seconds (16.5%) shorter, with
17.6% and 12.9% higher median total runner time respectively. Qt samples are
small: nearest-rank p95 is their maximum and is not a stable population tail.
Cross-platform matched groups became slower; see the JSON rather than
extrapolating Linux gains to Windows/macOS work. Job elapsed minutes are not
billed minutes or monetary cost.
Of the successful after-window Linux rows, 20/25 PR runs and 19/24 queue runs
used four shards; the remaining five in each row used complete suites.
The table therefore measures the day's mixed policy, not sharding alone.
| Code cohort / outcome | Before runs | After runs | Before runner-minutes | After runner-minutes |
| --- | ---: | ---: | ---: | ---: |
| PR success | 83 | 58 | 2,175.093 | 1,987.102 |
| PR failure | 10 | 11 | 171.967 | 364.599 |
| PR canceled | 21 | 22 | 381.681 | 356.115 |
| Queue success | 61 | 55 | 1,644.061 | 1,777.482 |
| Queue failure | 3 | 2 | 24.033 | 114.184 |
| Queue canceled | 9 | 1 | 324.065 | 7.883 |
Outcome totals are separate from successful-gate latency. Latest attempts only
are available; the comparison includes a first-attempt-only sensitivity view.
Some rerun job creation timestamps are later than their retained start times;
those cannot establish dispatch latency. No claim about overwritten attempt
costs is possible from this dataset.
### Revision changes and final decisions
This was a representative day of actual repository work, with changing source
and policy. It was not a day on a frozen implementation. In particular:
- **Qt overlap: retain.** 19 of 20 PR and 14 of 15 queue successful Qt/Fast Gate
job pairs overlapped; median overlap was 184.5 and 144 seconds. These counts
include all source cohorts. No observed failed Fast Gate run had an active
Qt job, so failed-gate wasted Qt cost is unmeasured, not proven zero for
future runs. Keep both final dependencies and cancellation conditions.
- **Sharding: superseded.** The mixed-layout day cohorts showed lower Linux gate medians
with more runner time. [#1643](https://github.com/obs-rust/obs-studio/pull/1643)
merged at 20:43:20 UTC, removing nine serial barriers after resource isolation
and a core ordering fix. It retained deinterlace RUN_SERIAL. At the user's
request, [#1663](https://github.com/obs-rust/obs-studio/pull/1663) merged at
22:22:41 UTC, restoring one complete suite per backend and halving repeated
test-job setup/download work. Keep that current unsharded policy. Do not
restore four runners based on the earlier cohort result. Optional local
sharding tools remain available.
- **Prepared environment: defer under #1592.** The original local experiment
excludes a fresh runner's image transfer. No net CI saving is established;
keep stock Ubuntu plus apt caching until its publication and transfer
benchmark gate is satisfied.
- **Rust compile settings: retain; further profiling under #1286.** Sampled
Fast Gate workspace commands reported 37.39–43.79 seconds build/link and
59.72–64.29 seconds observed test output. A changed-crate queue command was
only 2.92 seconds build/link and 2.88 seconds output: do not pool these
different scopes. Logs still cannot isolate linker-only time or rebuild
reasons. No extra compilation or wrapper/fingerprint changes were made.
- **Empty publisher skip and timing metrics: retain.** Required failures stay
failures. Master timing publication was verified after the original rollout;
remote cache publication remains master-only. Several independent cache
changes (#1670, #1671, #1672, #1675, #1680 and #1681) also landed late in the
day. They and the hybrid-default change #1588 prevent attributing the entire
day to #1581. Qt pruning #1690 landed after the observation window.
### Coverage and failures
Across the day, concrete Linux Tier 2 test jobs had 341 successes, two failures
and seven cancellations (188/1/7 on PRs; 153/1/0 in the queue). These are job
outcomes, not an independent-trial flake probability. A canceled workflow can
contain a failed final gate; do not count that as another test failure.
The sampled successful shard runs registered 341, 342 and 346 tests per
backend as new tests landed. Each mode retained the same three unavailable
PulseAudio skips and zero failures. A late unsharded PR run
[39703552196](https://github.com/obs-rust/obs-studio/actions/runs/39703552196)
registered 353 per backend, executed 350, skipped the same three and reported
zero failures: OFF 168.19 seconds, ON 167.45 seconds. The early sampled queue
[39528104438](https://github.com/obs-rust/obs-studio/actions/runs/39528104438)
retained 341 per mode; the middle queue retained 346. The final queue sample
selected no Linux Tier 2 job. Coverage evidence is sampled; a successful job
alone does not reconstruct every test assertion or every registry union.
The original exact-partition checker and focused rollout evidence establish
shard union invariants. Current unsharded jobs run the complete registry.
The two observed Linux test failures were inspected directly:
- [39549304820](https://github.com/obs-rust/obs-studio/actions/runs/39549304820),
ON shard 2: `test_output_delay_e2e/force_stop_skips_delay`. #1643 corrected
inactive-state publication before the deactivate signal and added a
deterministic callback regression test, preserving existing assertions.
- [39658456956](https://github.com/obs-rust/obs-studio/actions/runs/39658456956),
OFF shard 1: `test_deinterlace_2x_field_order/yadif_2x_bottom_first_50i_into_30`
during the experiment removing its guard. #1643 restored deinterlace
RUN_SERIAL instead of relaxing the timing assertion.
The unchanged three device skips remain visible. This batch introduced no new
workflow file, product ABI/protocol change, Rust test binary, C-test relaxation
or public-header change. Later independent product/test changes are explicitly
identified above. The initial RED/GREEN and partition/failure-condition checks
remain linked through the implementation PRs; documentation needs no artificial
RED test.
### Measurement limits and follow-through
The day supports adopting Qt overlap, retaining the publication guard and phase
instrumentation, and recording the cost of the temporary shard experiment.
It does not establish a universal speedup. Cache hits in sampled build logs
indicate warm restores, while some compilations remain cold; missing cache
markers are unknown. Setup, restore/save, build/configure and test step times
are retained separately in lane summaries. Qt phase markers and Cargo phase
markers are in sampled logs; build-step wall time is not compiler CPU time.
Creation-to-start includes dependency waits and cannot identify runner
contention by itself. The earlier 136-second post-creation gate delay remains
unexplained; further readiness/dispatch diagnosis stays with the overall queue
runtime tracker [#930](https://github.com/obs-rust/obs-studio/issues/930).
This batch adds measurement rather than changing runner policy.
Further prepared-image work is gated by #1592 and rebuild/link/cache work by
#1286. Preserve the current complete OFF/ON suites, required checks,
differential tiers and cache safeguards while pursuing those follow-ups.
# Next CI speed batch
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Tracked in [#1694](https://github.com/obs-rust/obs-studio/issues/1694).
All seven implementation PRs are merged. The final available-run comparison
below uses the shorter observation period explicitly requested by the maintainer.
Earlier sections retain the chronology and expectations recorded before rollout.
## Current-policy baseline
[Evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-speed-batch-baseline.json) covers October 21
22:22:41 UTC (complete-suite rollout) through October 22 02:15 UTC. Both run
listings cover the window: 85 runs listed, 84 terminal runs inspected; one
master push was still running. This is an initial short-window baseline,
not a full post-rollout day. Later cache and product changes are
retained through revisions and paths; these are observational cohorts.
| Successful code cohort | n | Median gate | p95 |
| --- | ---: | ---: | ---: |
| PR | 11 | 849 s | 1,172 s |
| Merge group | 11 | 709 s | 1,197 s |
Platform paths remain mixed in this broad table. Use the evidence's lane
cohorts and records when matching a candidate's selected lanes. API job and
step fields are retained with run IDs, revisions, paths, outcome costs and
cache inventory. Inventory is collection-time state; missing log counters
remain unknown. Recollect using:
```sh
uv run ci/cache_metrics.py --output build_ci_audit/1694-baseline \
--start 2026-10-21T22:22:41Z --end 2026-10-22T02:15:00Z --per-group 1000
```
## First implementation: repeated Tier 2 setup
Across 59 successful concrete test jobs, checkout took median 10 seconds
(range 8–12), bootstrap installation 15 seconds (9–87) and the full package
installation 34 seconds (28–49). Samples include PR, queue and master work;
this is not a controlled runtime estimate.
Test-only runners unpack a tree whose configure, source compilation and
symbol comparison already passed in the build job. They do not need full
Git history or browser/websocket source downloads. Use a normal shallow
checkout there; retain recursive submodules and full history in the builder.
The harness initializes those submodules only when building. Complete OFF/ON
CTest registries and all runtime package inputs remain unchanged.
Both fresh containers already refresh apt indexes before installing Git.
Reuse those same indexes in their later package install instead of refreshing
them a second time. Package caching, install retries and fail-on-error remain.
### Expected gains recorded before rollout
| Change | Measured opportunity | Expected gate saving / uncertainty |
| --- | --- | --- |
| Shallow test checkout without submodules | 10 s median total checkout per test job | 0–10 s per test runner; checkout overhead remains and overlaps between OFF/ON must not be added |
| Reuse the bootstrap apt index | Part of 34 s median package-install step | Unquantified until step-level runtime comparison; no package install is removed |
| Complete first change | Both test jobs wait for the same build/Fast Gate, then run independently | At most the longest affected path's reduction; no universal gate percentage promised |
Focused RED commit and GREEN results are recorded in the implementation PR.
Further runtime-package/image transfer, Rust rebuild/link, scheduling and
CTest experiments remain required by #1694; these first small setup changes
do not complete the batch. Conditional release/dev dependency cooking stays
unchanged: the existing post-job archive experiment in #1317 supports that
policy and requires a fresh controlled comparison before replacement.
## Rust execution: schedule across existing binaries
The [local experiment](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-rust-runner-experiment.json)
separates a 41.48-second initial no-run compilation from a subsequent
96.34-second Cargo suite command. The latter reported only 0.29 seconds
build work, then ran the eight category executables sequentially. Core,
application and utility execution took 29.27, 29.85 and 18.79 seconds.
A linker-only diagnostic, using the original `cc` behind a timing wrapper,
recorded 35 calls totaling 2.17 seconds of link wall time (overlapping calls;
not gate elapsed). Individual links were at most 0.21 seconds. Changing the
linker identity triggered a diagnostic rebuild, so its 18.15-second outer
command is not an A/B compilation result. These local measurements do not
justify changing linker settings or bypassing cache freshness safeguards.
The candidate uses pinned nextest 0.9.143 on Linux x86-64/aarch64 to schedule
individual tests globally across the same eight binaries. It caps concurrent
tests at four or the available CPU count, whichever is smaller. It builds no
additional Rust test executable, changes no assertion and uses the same
selected packages. Other hosts retain Cargo's existing execution path.
Nextest does not run documentation tests; Cargo runs them separately, even
when a unit suite fails. Both results must pass. The repository's explicit
runner configuration selects all tests, with no retry-to-green; user runner
configuration is disabled. Existing ignored tests retain their status.
An empty workspace is an error; a scoped package with no tests retains
Cargo's existing successful zero-test behavior. The source-freshness probe
now has an actual assertion to exercise this runner before the unchanged
nested-source mutation must fail compilation.
The static upstream archive is SHA-256 pinned and checked before installing
or reusing its executable; unsupported hosts download nothing. Installation
happens only when Rust scope selects tests. No new remote cache writer or
workflow file is added. Runner code/configuration participates in Rust lane
keys, attestation surfaces and workspace scope selection, so changing the
executor cannot reuse an old proof or skip its runtime qualification.
### Expected gain before rollout
| Observation | Cargo | Pinned nextest plus Cargo doctests |
| --- | ---: | ---: |
| Local warm suite command, one trial each | 96.34 s | 64.89 s |
| Passing unit cases | 2,019 | 2,019 |
| Existing ignored case | 1 | 1 |
| Passing documentation cases | 4 | 4 |
| Rust category executables | 8 | 8 |
Cargo discovery was compared by exact passing-case identity across all eight
categories; the only unexecuted discovered case is the existing ignored NVENC
real-GPU test. A separate GNU-binary prototype took 64.18 seconds without
doctests; do not pool it with the complete musl candidate.
The complete local observation is 31.45 seconds shorter, about 32.6%. This is
one warm-tool sample on a local host with Soldr 0.9.34, while CI pins 0.9.38;
it is not an expected whole-gate percentage. Fresh hosted tool download cost,
CPU contention, changed-crate scope and critical-path overlap must be measured.
Use 0–31 seconds as a planning range for this Rust execution phase until CI
qualification; overlap can make gate savings zero. Retain conditional cook
profiles and wrapper/fingerprint safeguards. PR/queue runtime qualification
and the representative post-rollout day remain outstanding.
## Fresh prepared-environment transfer protocol (#1592)
The opt-in `tier2-setup-probe` input on the existing Pull workflow is restricted
to manual master runs. It preserves the normal full build. The final gate includes the optional jobs;
a requested experiment failure fails that manual run. On PRs and queue events,
both experiment jobs are skipped.
It requires the runtime manifest shipped by #1707; do not dispatch until that
change is on master. No new workflow, registry publication, token permission or
remote cache writer is introduced.
One disposable producer installs the actual artifact's exact package closure
on the pinned stock Ubuntu base, retaining checkout bootstrap tools. It records
the complete resolved dpkg inventory, immutable image ID, input pins, compressed
archive SHA256/bytes, revision and pull/install/commit/save/compression durations.
The image and metadata are separate one-day Actions artifacts. Capture the
producer's input download, apt restore and artifact upload step durations too;
these are publication cost, not free savings.
Three fresh stock consumers restore the existing apt archive family and install
the complete locked producer inventory. Three prepared consumers download,
verify, decompress and load that exact image, rejecting a resident prepared
image and inventory drift. Stock consumers download only the small metadata,
so image transfer is not charged to both variants. Join Actions download/restore
step durations with JSON phase durations; neither phase sum alone is total setup.
The stock comparison uses one package transaction rather than CI's separate
bootstrap/install transactions, so report that modeling limit. Record cache hits
and misses from Actions rather than assuming the cache restored.
The first prepared consumer additionally runs both complete OFF/ON suites with
the existing harness and unchanged C tests, at the original artifact paths.
Those logs are retained separately from setup measurements. An experiment pass
is not a lane attestation and cannot skip normal coverage. The manual experiment
uses seven extra runners and does not make its producer part of routine CI.
Before dispatch, expected net benefit is unknown: the historical package-install
portion was 28–49 seconds, but runtime closure reduction changes that baseline,
and archive download/load/verification plus amortized producer cost may consume
all of it. Retain stock setup unless the fresh measurements, coverage and normal
CI provide evidence for a separate deployment decision. Report rejected results
and small-sample variance; do not promise a universal gate percentage.
## Runtime package closure experiment (#1694, #1592)
The builder retains the full development package set. Test runners consume an
exact-version manifest produced from every runtime ELF in the built tree with
`ldd` and `dpkg-query`, plus explicit dlopen providers and tools. Missing loader
libraries or package metadata fail closed. The manifest travels inside the
existing artifact; apt archive restore and master-only publication stay intact.
Local bosn validation used the actual #1700 hosted artifact (run 39711866137,
189,868,667 compressed bytes) at its original absolute paths in the pinned
Ubuntu 26.04 environment. The reduced manifest contained 224 direct package
specifications. Both complete suites used unchanged C tests, Xvfb and the
existing isolation policy:
| Mode | Registered | Executed | Device skips | Failures | CTest seconds |
| --- | ---: | ---: | ---: | ---: | ---: |
| OFF | 353 | 350 | 3 | 0 | 190.63 |
| ON | 353 | 350 | 3 | 0 | 166.96 |
The same Pulse monitor/restart/two-source cases skipped. An initial prototype
was rejected because it lacked the compiler/Ninja needed by the manifest CMake
fixture and the unversioned VLC loader library. Retaining gcc, libc6-dev,
ninja-build and libvlc-dev restored fixture execution and VLC coverage; focused
regressions now require them. Test runners do not configure OBS, but this
unchanged CTest fixture does compile a small C program.
Local Docker-reported `Size` changed from 541,093,691 to 445,476,013 bytes
(17.7% smaller), using the containerd snapshotter. These fields are not verified
uncompressed rootfs sizes or wire-byte counts. This compares package closure, not fresh hosted transfer or
setup latency. Expected setup saving is bounded by the old package installation
portion (baseline 28–49 seconds), with manifest generation and artifact handling
subtracting from any gain. No gate saving is claimed before hosted comparison.
A fresh prepared-image transfer experiment and the post-rollout observation day
remain separate requirements.
### Remaining serial CTest decision
The complete-suite evidence identifies `test_deinterlace_2x_field_order` at
82.60 seconds OFF and 82.88 seconds ON. Inspection of the unchanged test explains
nearly all of that wall time: 40 cases, 16 at source 30 fps and 24 at 25 fps.
Each case sends six warmup frames and 36 measured frames on real timestamps,
then waits 300 ms to drain playback and 250 ms between cases. The first frame
is immediate, so its intended pacing/drain floor is:
`16 × (40 / 30 + 0.55) + 24 × (40 / 25 + 0.55) = 81.733 seconds`.
That is 98.6–99.0% of these observed durations, before accounting for startup,
video resets or additional warmup polling. This is source-derived wall-time
attribution, not a CPU sampling result. The rest of each complete suite is
already scheduled with CTest concurrency and retained cost history; the
runtime evidence records every individual duration for further comparison.
Decision: reject a deinterlace scheduling/algorithm change for this batch.
There is no demonstrated substantial removable computation here. Preserve all
frame-rate/order cases, assertions, real-time pacing and `RUN_SERIAL`; no C test
or public header changes. Do not add its duration to setup/Rust savings, and do
not restore shards. Revisit only if separate profiling establishes a removable
cost while preserving the same real-time correctness coverage and isolation.
### Manifest producer overhead
The first hosted producer took 13.36 seconds to derive its runtime manifest.
A follow-up local cProfile comparison in the same full Ubuntu environment
measured 14.562 seconds before and 7.663 seconds after batching package ownership
queries. The original performed 850 subprocess calls; the candidate performed
621. Package ownership resolution dominated the removed work. Per-path lookup
remains for missing records and loader aliases/diversions, and unresolved
ownership still fails closed. The 224-pin output is byte-for-byte identical.
These are single sequential local profile runs, not a hosted A/B distribution.
The expected additional opportunity is approximately 0–7 seconds of producer
work; the actual hosted result and critical-path overlap remain to be measured.
Normalized function timings and the matching manifest SHA256 are retained in
the runtime experiment evidence. No full-suite assertion or dependency changes
are introduced by this lookup optimization.
### First hosted runtime qualification (before ownership batching)
PR run [39717762825](https://github.com/obs-rust/obs-studio/actions/runs/39717762825)
passed both complete suites after the single-directory artifact upload fix.
Current master added a test since the local snapshot: each mode registered
354, executed 351 and retained only the same three Pulse device skips.
OFF took 165.50 seconds and ON 163.95 seconds. Package installation steps took
28 and 24 seconds respectively, compared with the earlier full-package baseline
median of 34 seconds (28–49 range). This is one qualification run, not a matched
causal comparison; producer overhead and critical-path overlap still apply.
Per-job step timings, test/skip counts, IDs and log hashes are in the evidence
JSON. The ownership batching change requires its own hosted qualification.
The manual producer waits for the normal reusable build to finish, but can
consume its Linux artifact even if an unrelated platform job failed. Cancellation
still prevents the probe, and missing/invalid artifacts fail it. The final gate
continues to require the normal build result: useful setup evidence from a red
full run must never be reported as full-platform qualification.
### Fresh prepared-runtime experiment and production candidate (#1717)
[Hosted run 39721238636](https://github.com/obs-rust/obs-studio/actions/runs/39721238636)
completed successfully at `ee148335c2e1e4780c77c07dec2a3ed50bd4faab`, including
normal full-platform validation and all seven experiment jobs. Portable phase
measurements, transfer step durations, trial/job IDs, producer inventory and
coverage hashes are in
[`2026-10-22-prepared-runtime-experiment.json`](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-prepared-runtime-experiment.json).
| Accounted setup on fresh hosts | Stock Ubuntu + apt | Prepared runtime |
| --- | ---: | ---: |
| Samples | 3 | 3 |
| Median | 55.604 s | 24.510 s |
| Range | 49.997–67.755 s | 24.431–42.751 s |
Accounted setup adds explicitly timed phases to Actions metadata and image
download steps (prepared) or apt-cache restore (stock). Actions timestamps have
one-second resolution. The median difference is 31.095 seconds, about 56% of
this setup model; it is not a whole-gate speedup. Trials use different fresh
hosts and are too few to estimate population p95. The stock model installs the
complete locked inventory in one apt transaction, unlike split production
bootstrap/closure installation. Stock helper teardown adds roughly 10 seconds
of default Docker stop grace plus other cleanup outside the phase model;
whole measurement-step duration must not be called production setup time.
Producer explicit phases totaled 91.326 seconds (including installation,
commit, save and compression), before input download/cache restore, upload
and cleanup. The original transferred archive was 493,209,776 bytes. The
production candidate repacks the same Docker-save OCI contents with the
existing dependency CLI's zstd9 convention: 493,631,934 bytes, SHA256
`5e5102bfb16ef6d9bec4d24fbe3ee3bafa7abb5f565ad7c7308320cf4df5a558`.
The immutable OCI manifest digest and Docker-reported image identity remain
`sha256:84efcd622069129995c242d5af614a664abe6d48b31779d38595f1a7c541f6b5`.
The archive's image config is
`sha256:7362a072406b293ded09f9a52be142367a56bc797e9dbf464ef21feaffaf4986`.
Publication/refresh cost must be amortized over consumers, never treated as free.
Prepared correctness coverage ran both complete suites: OFF189.30 seconds,
ON189.22 seconds; each registered354, passed351, failed0, and retained the same
three Pulse device skips. These experimental suites did not restore production
CTest history, so their duration is not a causal test slowdown comparison.
Decision: qualify a production candidate in #1717. It retains normal timing
history, full OFF/ON coverage, fixed source/build paths, read-only source,
eight CTest workers, deinterlace isolation and trusted master-only cache writers.
Exact package-closure matching selects the prepared image. Changed closures or
unavailable assets select stock installation; integrity failures fail closed.
The descriptor pins the approved dependency-repository asset URL, byte count,
SHA256, base, image identity and full resolved package inventory. No additional
CI credentials, registry or cache writer are required. A unique prerelease
precedes qualification; shared stable catalogue publication waits for success.
Expected gate benefit before candidate rollout: **0–31 seconds**, bounded by
measured setup savings before release-asset transfer differences and critical
path overlap. Adoption still requires actual prepared-path CI execution,
unchanged-suite success, normal queue validation and the final matched
post-rollout observation day. This experiment alone does not satisfy them.
#### First normal production-path qualification
[PR run39726143474](https://github.com/obs-rust/obs-studio/actions/runs/39726143474)
passed the required gate at `4b1dbbc82b65121abb341708f68cbc8a4da72f7c`.
Both consumers selected **prepared**, verified image inventory, and restored
`tier2-ctest-cost-b095a8347f25d1178abc637f5fe99c2e19a868b2`.
| Mode | Prepared setup | Complete CTest | Registered | Executed | Failed | Skipped |
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
| OFF | 19.627 s | 168.21 s | 355 | 352 | 0 | 3 |
| ON | 30.455 s | 169.23 s | 355 | 352 | 0 | 3 |
The same Pulse monitor/restart/two-source cases skipped. This revision includes
one more registered case than the earlier setup experiment; coverage was not
reduced. Setup includes release download, verification, decompression/load,
container creation/start and inventory verification. Host checkout, apt/history
cache restore and compiled-tree download/unpack remain separate Actions steps.
Raw per-mode measurements, step timestamps and full-log hash are preserved in
[`2026-10-22-prepared-runtime-qualification.json`](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-prepared-runtime-qualification.json).
This is one qualification run on a different revision, not a matched population
estimate. Runner allocation delays dominated portions of the run and remain
separate from setup execution. Final-head PR and queue validation, catalogue
publication, and the final post-rollout day are still required.
### Rollout and post-merge qualification
#1717 merged through the normal queue on October22 at05:50:37UTC,
`0e42adcfeff236099f7b8f7cecff054c267079ab`.
[Queue run39729486071](https://github.com/obs-rust/obs-studio/actions/runs/39729486071)
passed. The final PR run39728550270 tested merge checkout
`05ef92bb97cfc543d7481534978b2bb33924eb3b`, rather than only its head SHA.
Catalogue [obs-studio-libs#7](https://github.com/obs-rust/obs-studio-libs/pull/7)
merged at05:51:29UTC; the verified release asset was promoted without replacing
bytes. This completes deployment, not the required representative-day analysis.
| Qualification | Mode | Prepared setup | CTest | Registered | Executed | Failed | Skipped |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: |
| Final PR39728550270 | OFF |32.461s|168.39s|357|354|0|3|
| Final PR39728550270 | ON |32.712s|192.13s|357|354|0|3|
| Queue39729486071 | OFF |36.068s|166.39s|357|354|0|3|
| Queue39729486071 | ON |34.629s|192.92s|357|354|0|3|
| Later master39733445653 | OFF |16.337s|169.24s|359|355|0|4|
| Later master39733445653 | ON |20.984s|194.38s|359|355|0|4|
All rows selected prepared and verified inventory. Master
`5d0f6a7707f4c1386dd2e1e0ded18864191b9691` restored prior history,
uploaded timing files, merged359reported non-separator lines per mode, and
saved `tier2-ctest-cost-5d0f6a7707f4c1386dd2e1e0ded18864191b9691`
in trusted master job119676285297. This verifies publication, not just restore.
The full master run later concluded failure: Linux qualifications and trusted
cache publication passed, while the Windows Tier2 job failed. Keep that overall
outcome and platform runner cost in the day comparison.
The latest source adds `test_pulse_monitor_samples` to the prior358-case
registry, removing no cases. Its fourth skip joins the three earlier Pulse
prerequisite skips. These wrappers start private software sound servers and
need no hardware; they allow exit77 when software prerequisites are absent.
The prepared inventory contains `pipewire`, but lacks `wireplumber`,
`pipewire-pulse` and `pulseaudio-utils` (which provides `pactl`/`parec`).
Preserve case identities and source revisions in comparisons; do not describe
this source-added skip as a removed assertion or a hardware requirement.
#### Unexplained portal alarm retained in results
[Master39730342498](https://github.com/obs-rust/obs-studio/actions/runs/39730342498)
at `8534113ae7b0ad5282c7c4c03a835363d016ed30` passed Linux ON, but OFF
failed `test_screencast_portal_teardown`: its unchanged child alarm delivered
SIGALRM14 after20seconds. The full358-case suite executed355, failed1 and
retained3Pulse skips; CTest took180.46seconds. Prepared setup/inventory
verification succeeded. Both timing artifacts uploaded, and aggregation/cache
save correctly skipped because one suite failed. No blind CI rerun, increased
timeout, assertion change or skip was used to turn that observation green.
The exact artifact and test binary were exercised locally through bosn:
| Environment | Isolated portal | Eight-process portal stress | Complete OFF |
| --- | ---: | ---: | --- |
| Prepared runtime |30/30passed|200/200passed|358registered,355executed,0failed,3skipped;202.75s|
| Previous full-development-package image |—|200/200passed|358registered,355executed,0failed,3skipped;192.05s|
The control satisfies all224required runtime pins. All486shared package
versions match; it has203additional development packages. Every stress log
confirms one executed passing cmocka case and no inner skip, in addition to
exit0. Each worker stops on failure; child20-second and outer60-second limits
remain. These diagnostics do not reproduce or explain the hosted alarm and
are not a fixed claim or causal image comparison. Local kernel6.18.48 differs
from hosted7.0.0-1017-azure, complete-suite historical ordering differed, and
the stress runs eight copies of one fixture rather than a mixed suite.
The local full-package control image is not a published artifact; its locked
inventory is preserved, but an immutable apt snapshot is not supplied.
A separate Windows failure predates this rollout: pre-rollout
run39728526955/job119660751156 and post-rollout
run39730342498/job119666870978 both fail linking `test_video_output_plan`
with unresolved `cm_print_error`. Keep platform failures and their runner cost
visible without attributing them to Linux runtime execution.
Portable qualification records, locked control inventory, raw stress result
rows and hashes are in
[`2026-10-22-prepared-runtime-post-rollout.json`](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-prepared-runtime-post-rollout.json).
The original fixed24h protocol was superseded by the maintainer’s request to
use the completed runs available now. The final comparison below records that
amendment and retains the original protocol rather than presenting a partial
window as a full day.
## Batch decisions and retrospective
These implementation decisions precede the final population comparison. Phase
measurements below overlap and must not be summed into a gate saving.
| Area / owner | Decision | Evidence and limit |
| --- | --- | --- |
| Repeated setup / #1592 | Adopt shallow test checkout and reuse apt indexes (#1700) | Builder retains full source setup; initial checkout median10s is an opportunity, not an isolated measured saving. |
| Dependency scheduling / #930 | Adopt independent test readiness (#1701) | Tests may start after their builder without waiting for Fast Gate; Fast Gate remains required. Baseline median opportunity was0s, so benefit depends on the run. |
| Rust execution / #1286 | Adopt pinned nextest with separate Cargo doctests (#1706) | Same eight binaries and discovered cases; one local warm command96.34→64.89s. Hosted download, scope and overlap constrain gate benefit. |
| Rust compilation / #1286 | Retain conditional dependency cooking; reject linker changes in this batch | Diagnostic links totaled2.17s across overlapping calls; changing linker identity forced a rebuild. This does not establish a beneficial compiler/profile change. |
| Runtime closure / #1592 | Adopt exact runtime pins and batched ownership lookup (#1707) | Manifest unchanged; local lookup14.562→7.663s. Runtime fixture compiler and explicit dlopen providers remain installed. |
| Prepared transfer / #1592 | Adopt qualified immutable runtime (#1708, #1717); retain mixed gate outcome | Three fresh trials per variant gave accounted setup medians55.604→24.510s. Publication cost, stock-model differences and hosted failures remain visible. |
| Remaining CTest / #1694 | Reject deinterlace changes; preserve complete suites and isolation | Intended real-time pacing accounts for81.733s of observed82.60/82.88s. No substantial removable computation was established. |
| Measurement / #1694 | Adopt nextest-aware collection and preserve historical comparison bases (#1710) | Missing counters remain unknown. Collector stayed frozen; the maintainer explicitly shortened the observation window. |
The useful process improvements are to measure the dependency path before
optimizing a phase, include fresh-runner transfer and publication costs, and
separate source-added test cases from regressions in coverage. A successful
Linux qualification cannot stand in for a successful platform run. Preserve
failed and canceled runner cost alongside successful latency, and investigate
intermittent failures with exact artifacts and controls before assigning cause.
Per-PR file inventories for all seven changes show no new workflow files,
no C test source edits, no libobs header edits and no changes under
`plugins/obs-websocket/`. This audit uses each PR's changed files; an aggregate
master range also contains unrelated concurrent product work and cannot prove
ownership of changes. The final available-run conclusions follow; broader owning issues retain any
unproven targets.
## Final available-run comparison — October 22
The maintainer explicitly waived the24-hour wait and requested results from
the merged PRs already available. The replacement created-at window is
**October22,05:52:00–07:12:45UTC** (80minutes45seconds). Collection finished
at07:15:39UTC using the unchanged frozen collector from `ee148335`.
Both workflow listings cover the window:36runs listed,29terminal records
inspected,7queued/active runs retained in the listing but excluded from
terminal metrics. This is a short-window observational comparison, not a
full-day or controlled causal estimate. No CI run was restarted for measurement.
### Same selected Linux build lanes
Match successful code runs by the exact active build-job signature: Fast Gate,
Linux Tier2builder, complete OFFsuite and complete ONsuite. Exclude metadata,
CI-mode and the Linux aggregate from the signature. Keep PR and merge-group
events separate; exclude Qt and native platform lanes from this comparison.
The baseline is the same October21,22:22:41→October22,02:15UTC window,
now enriched to85terminal records without changing historical comparisons.
| Metric | Before | After | Observed change |
| --- | ---: | ---: | --- |
| PR sample size |5|3|Same selected build lanes |
| PR median gate |691s (11m31s)|555s (9m15s)|136s /19.7% faster |
| PR sample p95 gate |849s|633s|25.4% lower |
| PR median runner-minutes |19.783|18.417|6.9% lower |
| Merge-group sample size |5|2|Same selected build lanes |
| Merge-group median gate |526s (8m46s)|560.5s (9m20.5s)|34.5s /6.6% slower |
| Merge-group sample p95 gate |709s|574s|19.0% lower |
| Merge-group median runner-minutes |18.167|16.367|9.9% lower |
Sample p95 uses nearest rank and is the maximum in these small groups; it is
not a stable population tail. Runner-minutes sum observed non-skipped job
start→finish time, including failed/canceled jobs in the outcome table below;
they are not billed minutes or CPU time. The raw run IDs, revisions, file
comparisons, job/step times and exact selection are preserved in the evidence.
The result supports lower PR latency and lower runner time in these cohorts.
**It does not establish faster merge-queue throughput.** Do not substitute the
broad code medians849→496s (PR) or709→352s (queue): the after groups also
contain Qt-only and Fast-Gate-only changes, which ran fewer/different lanes.
Native platform performance has no successful matched after cohort here and
cannot be inferred from Linux.
### Where the time went
| Matched successful-job median | PR before→after | Queue before→after |
| --- | ---: | ---: |
| Fast Gate total |154→297s|171→166s|
| Tier2builder total |381→222s|208→210.5s|
| Actual builder step |249→96s|78→85s|
| Complete OFF test job |251→213s|248→205.5s|
| Complete ON test job |248→240s|246→237s|
The OFF job saves38–42.5seconds in these samples, while the ON job saves only
8–9seconds. ON CTest itself grew from roughly168–169seconds to190–193seconds
as source/tests changed; setup savings must not be mistaken for faster tests.
The after prepared setup observations span14.78–27.59seconds, with inventory
verified in every matched mode. They complement the fresh transfer experiment’s
55.604→24.510second setup medians, rather than replacing it with resident-image
measurements. The routine builder still installs its full package environment.
Selected lanes do not imply identical work: the PR Fast Gate changed-crate test
step median was1second before and145seconds after. The latter includes broader
Rust work; builder compilation/cache state also differs. Thus the136-second PR
gate improvement is an observed batch-era delta, not153seconds of causal
compiler savings. The controlled warm Rust experiment and ownership-lookup
experiment above provide separate phase evidence. Do not sum their savings.
### Outcomes, coverage and cache limitations
These outcome counts/costs include every terminal code run in each event,
including Qt/native selections; they are not restricted to successful matched
Linux runs. Windows failures and a pre-window hosted portal alarm remain
visible in the qualification section. This sample does not establish unchanged
failure rates or explain the intermittent portal alarm.
| Terminal code outcomes | Before count / runner-minutes | After count / runner-minutes |
| --- | ---: | ---: |
| PR success |11 /346.483|5 /77.316|
| PR failure |2 /46.084|3 /75.001|
| PR cancellation |7 /64.950|8 /189.134|
| Merge-group success |11 /364.617|5 /58.550|
| Merge-group failure |0 /0|1 /19.117|
| Merge-group cancellation |0 /0|0 /0|
The periods differ in duration; do not compare these totals as equal-load daily
costs. Cancellation cost rose substantially and offsets savings elsewhere.
No canceled or failed work is removed from the evidence. Logs are unavailable
for17baseline and10after records, all canceled; their metadata/outcome costs
remain, and missing counters remain unknown.
All20baseline matched mode runs registered353cases, executed350and retained
the same3Pulse prerequisite skips. The10after matched modes registered358–360,
executed355–356, failed0, with3–4skips. New source adds the fourth software
Pulse prerequisite skip described above. Exact skipped identities and each
revision are recorded; increasing registrations are not evidence of identical
test work. The batch retains complete suites without adding a runner filter or sharding;
registration counts alone do not prove identical case contents.
Cache inventory at collection changed from10,726,575,303bytes/37entries to
9,302,540,076bytes/40entries. These are point-in-time inventories, not transfer
bytes or proof of equal warm-cache state. Per-run archive sizes, compiler and
Rust markers remain in the raw records; no uniform cache-hit-rate claim is made.
The published runtime asset is493,631,934compressed bytes; its producer’s
91.326seconds of explicit phases is amortized over reuse, not counted as free.
### Final decisions
Keep the deployed setup, scheduling, runtime-closure and Rust-runner changes:
they have focused regression coverage, normal PR/queue qualification and measured
phase or runner-cost benefits. Keep the existing cooking policy and reject an
unsupported linker/deinterlace rewrite. The batch is implemented and measured
under the maintainer’s amended scope. The broader under8-minute queue target
in #930 and cache backlog in #1286 remain open. #1592 retains its stronger
net-gate adoption criterion: this mixed queue result does not prove that target,
even though prepared setup and normal rollout are qualified.
Evidence:
[`2026-10-22-speed-batch-comparison.json`](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-speed-batch-comparison.json)
contains selection, samples, phases, coverage, outcomes and limitations;
[`2026-10-22-speed-batch-short-window.json.gz`](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-speed-batch-short-window.json.gz)
contains all85baseline and29after normalized records, summaries and complete
listings, including the7unresolved runs at capture. Decompress with
`gzip -dc docs/ci-evidence/2026-10-22-speed-batch-short-window.json.gz`.
# Flatpak performance: CEF debug processing
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Tracked in [#1760](https://github.com/obs-rust/obs-studio/issues/1760).
This is the first candidate, not completion of the issue's full-job target.
## Measured bottleneck
[Full build 39721238636](https://github.com/obs-rust/obs-studio/actions/runs/39721238636/job/119635024523)
took 15m11s. Its logs place 162.4 seconds between CEF's debug-compression
message and stripping. Compilation, setup and export remain separate costs.
The manual extra rebuild in #1715 is not routine production work and is not
counted as a saving here.
Flatpak Builder compresses changed ELF debug sections before splitting them.
The OBS install copies CEF from its cached dependency into the final plugin
directory, so it receives that processing again. The dependency's existing
`no-debuginfo` setting alone does not suppress processing of the installed copy
by the later OBS module.
## Local ELF experiment
The exact pinned CEF archive was verified against SHA256
`8ffc64d06ea74da613eeda7f2aa5d4e98661af6fa3ed8c68724c9a6e4e89ea8e`.
Both local tasks ran through bosn with four CPUs. Each variant starts with the
same 2,031,350,672-byte ELF. Timings exclude extraction and copying inputs.
| Variant, one observation each | Compression | Splitting | Total | Separate debug bytes |
| --- | ---: | ---: | ---: | ---: |
| Current zlib-gnu |128.894s|2.057s|130.951s|420,562,136|
| No compression |0s|9.115s|9.115s|1,751,810,960|
| Zstandard |8.705s|1.961s|10.666s|394,021,568|
All allocated ELF sections and the build ID remain identical. GDB resolves
the same source line for `cef_version_info` in all three variants. All variants
also report the same 41,344 unavailable DWO references already present in the
input; this does not establish complete Chromium source-level debug coverage.
Tool versions, identities, GDB log hashes and observations are retained in the
[portable experiment](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cef-debug-experiment.json).
The uncompressed CEF option adds about 1.33 GB of debug data and could move
cost into exports or caches. It is not the selected CEF payload. Fast
compression is 120.3 seconds shorter in this local phase and produces a smaller
debug file, but that is not a demonstrated hosted Flatpak saving.
## Candidate and remaining qualification
Compress CEF's debug sections with `eu-elfcompress -t zstd` inside its immutable
dependency module, so that work can be reused from the dependency cache. Keep
that module's existing `no-debuginfo` setting: the final OBS installation still
extracts debug files at the correct installed path. Set the OBS module's
`no-debuginfo-compression` option to prevent conversion back to zlib. Its
first-party debug information remains available for normal splitting/export;
the candidate does not disable debug extraction or enable destructive stripping.
This follows the distinct compression and extraction flags in
[Flatpak Builder's post-processing implementation](https://github.com/flatpak/flatpak-builder/blob/bd35975d1b089960251809a5bec738ded3cd6f46/src/builder-module.c).
The exact production SDK (elfutils 0.195) processes the pinned CEF with the
same allocated sections/build ID and source-line lookup. Full export
[39754042722](https://github.com/obs-rust/obs-studio/actions/runs/39754042722)
passes existing Flatpak validators. Its complete Flatpak job takes 12m04s,
including optional runtime-export upload; that is one observation with changed
source/dependency cache state, not a comparable warm-job speedup.
Installed-package qualification
[39763463067](https://github.com/obs-rust/obs-studio/actions/runs/39763463067)
reuses that immutable export and passes app/Debug build IDs, GDB source lookup,
authenticated unchanged WebSocket v5, all four saved sources, clean shutdown
and module loading. The 12.033-second recording passes screen/camera motion and
continuous 440 Hz microphone tone checks. All 302 checked browser frames render
the green HTML patch. Browser software rendering is explicit; the preceding
default-hardware fixture failed on a llvmpipe/no-DRM runner. Physical devices and
GPU rendering are not covered, and the upstream missing DWO limitation remains.
Portable identities, logs and the six qualification attempts are recorded in
[the runtime qualification PR](https://github.com/obs-rust/obs-studio/pull/1771).
These observations qualify this debug-processing change's installed artifact;
they do not establish warm application-cache reuse, production publication cost,
global retention, cold performance or the whole-issue speedup. The new combined
configuration has its own full qualification run before further adoption.
The full goal remains at least 50% lower comparable warm job time, with cold
and warm observations, required validators, complete application functionality,
safe incremental compilation and an honest cache budget. Compilation/PCH reuse
is a separate candidate; no Rust compiler-wrapper safeguard changes here.
# Flatpak PCH cache qualification (#1760)
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
This candidate activates the existing CMake ccache launcher so the existing PCH
helper supplies `-fpch-preprocess` and its bounded PCH settings. Explicit SDK
compiler paths avoid nesting the SDK's `/run/ccache/bin` masquerading wrappers.
It does not enable a Rust compiler wrapper or change cache transport.
Enabling the launcher alone is unsafe: a real fixture changing `#define VALUE
42` to `43` returned **42**, including with direct mode disabled. Ccache correctly
rejected the direct manifest, then reused an old preprocessor result while
creating the PCH. The macro does not appear in that preprocessor output until
used in the consuming translation unit. Dependency mode avoids this fallback;
compiler content checking also detects compiler replacement with preserved
size and modification time.
The manual diagnostic exercises the manifest's actual ccache settings and
unchanged OBS PCH helper. Run inside the production SDK, with this checkout
available, and retain the new output directory:
```sh
uv run --no-project ci/flatpak_pch_probe.py --output /path/to/new-evidence-directory
```
It compiles and executes a tiny C++ program, then requires correct output after
same-size, same-timestamp header, source and compiler changes, and after a
configuration change. Each following clean build must reuse both cached objects.
An isolated cache prevents inherited counters from being mistaken for this run's
hits. It intentionally preserves logs, counters and outputs for investigation.
This fixture is manual and is not a full application build or a timing gate.
Local GCC/ccache evidence: ten trials passed. The header, configuration and
compiler changes each caused two misses; a source-only change retained one PCH
hit and missed the source object. All five warm builds had two direct hits.
Baseline wrapper-only warm rebuild: 1.219 seconds with two PCH refusals; the
initial dependency-mode launcher fixture: 0.242 seconds with two direct hits.
These are single tiny-fixture observations, **not a claimed full-job speedup**.
## Production SDK toolchain check
The same ten trials pass with the production SDK's **GCC 16.2.0 and ccache
4.14**, using its native binaries, libraries and headers in an isolated chroot.
See [portable SDK evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-pch-sdk-freshness.json).
Every following warm build has two direct hits; header, configuration and
compiler changes each miss twice; the source-only change misses once and retains
the PCH hit. The fixture's compiler wrapper changes actual executable output;
this is stronger than checking cache counters alone.
The local Flatpak namespace launch was denied by the container. The fallback
initially timed out copying the whole SDK, then exposed the SDK's empty passwd
file: ccache could not resolve its user identity. A separate root with a real
passwd entry, as Flatpak normally supplies, fixes that setup failure. These
failures are recorded; they are not compiler freshness failures or full-job
observations. The diagnostic now retains failing command arguments and stderr.
## Restore newer compiler metadata last
The builder archive contains `.flatpak-builder/ccache`, including mutable
ccache direct-mode manifests. Restoring a newer standalone compiler snapshot
first, then extracting an older builder snapshot, discards newer manifest
mappings even though the content-addressed result objects remain present.
The production SDK fixture reproduced this using actual GNU tar archives:
| Restore order after header 42 → 43 | Output | Direct hits / misses | Build |
| --- | ---: | ---: | ---: |
| New compiler snapshot only | 43 | 2 / 0 | 0.977 s |
| New compiler, then old builder | 43 | 0 / 2 | 4.191 s |
| Old builder, then new compiler | 43 | 2 / 0 | 0.899 s |
Each trial uses a new cache directory, a clean build and zeroed statistics.
The header replacement preserves size and modification time; dependency mode
keeps every output correct. The snapshots are captured after the existing
fixture's cold and header-warm stages. Extract each ordering with `tar -xf`,
then rebuild that same fixture with `CCACHE_DIR` pointing at the extracted
cache. See [portable counters and timings](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cache-overlay.json).
An independent file-overlay experiment agrees. This demonstrates lost reuse,
not stale executable output or a whole-job speedup.
The workflow now extracts the builder archive before the standalone compiler
snapshot and disables the builder action's second restore. `cache: true` still
passes `--ccache`; master-only publication and architecture-specific fallbacks
are preserved. The explicit builder restore's exact-hit output prevents an
unnecessary save to an existing immutable key, since the action's internal
restore no longer supplies that information. No cache family, storage backend,
capacity allowance or pruning policy changes.
The workflow resets only compiler statistics after both cache restores, before
building, so the reported hits/misses belong to that build. Cached results and
manifests remain intact. Existing historical reports with cumulative counters
cannot establish a per-build hit rate. The reset runs inside the SDK already
supplied by the pinned build image and its cost remains within whole-job timing.
## Adoption hold
Real application freshness/reuse inside Flatpak, full-job warm/cold
measurements and the packaged screen/camera/microphone/browser/debugger scenario
are still required. Keep the PR draft until these are proven. This change alone
does not complete #1760's 50% whole-job target.
## Manual cold builder/compiler measurement
Retired by phase A of #1801: the Flatpak builder state left the Actions cache,
so every Flatpak build is cold and the `flatpak-cold-build` input is gone. The
text below records the earlier design.
The workflow accepted default-off `flatpak-cold-build=true` on an
explicit dispatch. It skips both current/legacy builder archives and the
standalone compiler restore, and suppresses both publications. A fresh hosted
runner therefore starts with no Flatpak builder/compiler state. The full app,
ccache enablement, counter reset, export and all validators still run. Ordinary
PR/push/release selection and caching are unaffected; no cache is deleted.
Use the same frozen source, manifest and container image for a corresponding
warm observation. Include the whole job and disclose every restore outcome.
This is cold **builder/compiler state**, not a claim that the internet, registry
or preinstalled SDK is cold: the pinned build image already contains the SDK,
and uv/tool input caches retain their existing policy. Other full-dispatch
lanes still run and their runner cost must be reported separately. The controlled hosted observation below has executed this control.
## Full application compiler reuse probe
The existing default-off `flatpak-pruned-build-probe` now also requests
`--compiler-reuse`. The first isolated rebuild still copies only dependency
OSTree state; original downloads, compiler results and transient state are not
retained. After that rebuild creates its own compiler results, the probe resets
only its isolated counters and changes a post-install marker to force another
application build with identical source, SDK and configuration. All dependency
modules must hit, while the application module must actually rebuild.
The second build must report at least 100 compiler hits and an 80% cacheable
hit fraction; a few CMake checks or a cached application module cannot pass.
Both output sets run the existing AppStream/build-directory/repository checks.
The source state stays read-only, and temporary state is removed on failure.
The report keeps cold/warm build phases and SDK counter data separate. These
extra manual rebuilds are diagnostic cost, not routine full-job savings or a
substitute for cross-runner transport/retention and invalidation evidence.
The hosted observation below has executed this compiler probe.
## Hosted full-application compiler reuse
[Run 39768771734 / job 119790889408](https://github.com/obs-rust/obs-studio/actions/runs/39768771734/job/119790889408)
uses qualification source `2b253bc0dace3c35478d3a46664edc49f0db023f`.
All three builder/compiler restore steps were skipped and the statistics reset
passed. The initial full builder action took **790 seconds**, with zero hits,
330 misses and 16 uncacheable calls; all output validators passed.
The isolated probe then copied dependency OSTree state only. All six dependency
modules reused their cached stage while the application actually rebuilt:
| Isolated application rebuild | Build seconds | Cacheable hits / misses |
| --- | ---: | ---: |
| No inherited compiler state | 728.798 | Not used as a warm observation |
| Compiler state generated by the preceding build | 326.785 | 328 / 2 |
Both output sets passed the existing validators. The second build uses ccache
4.14.1 and has no PCH refusal or preprocessor-cache fallback. Its 99.39% hit
fraction demonstrates substantial real application reuse. The 55.16% reduction
is for these paired **build phases**, excluding copy, fsck, SDK queries and
validators; it is not the issue's median whole-job target.
The resulting compiler cache occupies 625,812 KiB (640,831,488 bytes). This
is larger than the current 200 MB compiler-family allocation, but is not an
Actions archive measurement. Retention and global capacity must be qualified
with #1269 rather than silently raising the budget.
Canonical tar/zstd proxies were 3,247,992,418 bytes full, 2,225,845,035 without
downloads and 1,589,558,859 without downloads/compiler state. They do not prove
actual Actions transfer or authorize pruning. One warm/fresh source-fetch pair
was 0.048/10.065 seconds, not a representative performance cohort.
The overall workflow has a retained macOS C-reference seek failure, reported
on #1765. Fresh-runner installed-runtime job 119806132310 passed the exported app with
a saved screen/camera/microphone/browser profile and debugger checks. It uses
synthetic devices and software rendering, not physical devices or hardware GPU.
The whole diagnostic Flatpak job took 2,111 seconds, including both extra
rebuilds and capacity probes. Buffered probe subprocess output means CI line
timestamps cannot attribute internal phases; use its monotonic build timers.
Keep the
adoption hold: this proof does not establish a retained cross-runner compiler
consumer, comparable warm whole-job measurements or the 50% whole-job target.
Portable raw probe results and exact input/limit metadata are recorded in
[the full-app compiler evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-full-app-compiler.json).
## Explicit fresh-runner compiler transfer experiment
Default-off `flatpak-compiler-transfer-probe` packages the completed producer's
compiler cache as an explicit Actions artifact retained for one day. The cache
results are already compressed, so the tar and artifact avoid another compression
pass. It records actual archive bytes, digest, payload occupancy and pack time.
The experimental bound is 2 GiB payload and 100,000 ordinary files; it is not a
production-family allocation increase. The caller forwards this input only for
an explicit manual dispatch.
A separate fresh-runner job restores dependency state first, then downloads and
overlays the compiler artifact. Before changing its cache, it checks the complete
archive digest/inventory, rejects links and unsafe paths, and requires an exact
source SHA, manifest digest, SDK commit, compiler hashes/cache version and
architecture match. It resets statistics, builds the full application, requires
at least 100 hits and 80% cacheable reuse, and runs all three output validators.
The builder action cannot restore over the artifact or publish either cache.
Consumer restoration/counters and producer metadata are retained separately.
This uses a visible same-run Actions artifact, not a new production transport or
cache family. Report artifact storage/transfer, both full job durations and all
selected workflow costs. It does not establish production retention, changed-source
freshness or representative medians. No hosted run has yet executed this route;
the adoption hold remains. The independently qualified runtime scenario and SDK
freshness trials remain required evidence alongside it.
### First transfer trial: builder passed, wrapper scaffolding rejected
[Run 39776059128 / producer 119815324383](https://github.com/obs-rust/obs-studio/actions/runs/39776059128/job/119815324383)
built and validated the full application, then failed during artifact packing.
No compiler artifact was published and neither fresh consumer nor runtime
qualification ran. The failure and all selected job costs remain part of the
experiment; this is not cross-runner reuse proof.
The source cache includes `bin/cc`, `bin/c++`, `bin/gcc` and `bin/g++` symlinks to
`/usr/bin/ccache`, created by
[flatpak-builder 1.4.9](https://github.com/flatpak/flatpak-builder/blob/1.4.9/src/builder-context.c)
in `builder_context_set_enable_ccache`. Its hosted inventory reports 60 bytes
under `ccache/bin`, matching those four launcher links. The ordinary-file-only
packer rejected this generated scaffolding. The initial fixture omitted these
links; the new RED regression reproduces the real source and destination layout.
The corrected experiment omits only these exact wrapper paths with the exact
upstream target, records their omission, and preserves matching destination
wrappers. It rejects every archive entry under `bin`, all archive links, and
unexpected source/destination links. This prevents a regular archive entry from
being copied through an existing compiler wrapper. Profile/digest checks,
substantial-hit requirements and production adoption holds remain intact.
A changed-source trial is required; no unchanged rerun was requested.
### Second transfer trial: packed cache omitted from upload
[Run 39779603900](https://github.com/obs-rust/obs-studio/actions/runs/39779603900)
uses source `030daf8b0e2e218109a55eb32e5fcff7b3bf3a16`. The producer built and
validated the app, and the wrapper fix packed 1,300 ordinary files into a
699,105,280-byte tar (698,094,555 payload bytes; 2.014 seconds). However, the
published artifact was only 1,488 bytes: it contained metadata at
`__w/_temp/flatpak-compiler-transfer/manifest.json` and no compiler tar. The
upload log reports a least common root of `/` and one file. Packing success
therefore did not establish transport success.
The fresh consumer separately failed before artifact download: its combined
bootstrap/vendor step could not find `soldr`. The bootstrap writes `GITHUB_PATH`,
which Actions applies to subsequent steps. The established producer already
separates those commands. The installed saved-profile runtime job passed, but
neither cache download nor cross-runner compiler reuse was proven.
The next revision uploads a single controlled producer directory. Consumer JSON
reports are staged into a separate single directory, avoiding another upload of
the large compiler archive. Bootstrap and vendoring are separate steps. Focused
RED regressions reproduce the missing upload/step boundaries; the corrected
configuration still requires a changed-source hosted trial. Production transport,
budgets and adoption holds remain unchanged. See
[the second transfer evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v5.json).
### Cross-runner trial v6: download passes, profile guard rejects
Run [39784005854](https://github.com/obs-rust/obs-studio/actions/runs/39784005854)
at `c907b9ef1` is terminal failure. Producer119842391321 passed all validators
and uploaded two files: the actual compiler artifact is698,963,464 bytes
(tar698,961,920 bytes;697,941,503 payload bytes;1,300 files;2.378s packing).
Whole producer975s includes optional transport/runtime export; both builder
restores missed and isolated compiler counters were0hits/330misses. This is
not a warm performance sample.
Consumer119850594734 downloaded the artifact successfully and matched its
published digest, then rejected the profile before overlay or application
build. Both jobs pulled image digest`6ed6921bb5a9e1a916989971844f159b854b7b225880c381fa34f7a158863039`.
The producer builder explicitly updated SDK/runtime before compiling, whereas
consumer profile validation ran before equivalent dependency preparation.
The correction uses bounded dependency-only builder preparation before
profile validation; remaining drift still fails. A mismatch report now retains
both identities and differing fields. Focused RED/GREEN checks cover the
preparation order and rejection before destination mutation.
Installed saved-profile runtime119850594274 passed separately. The full trial
cost135.9333 runner-minutes across22successful and2failed active jobs, with
no cancellations; skipped jobs excluded and no billing multipliers. See
[portable evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v6.json).
Actual compiler reuse, retained capacity, and routine whole-job savings remain
unproven. The runtime fixture uses synthetic devices/software rendering.
### Optional actual OSTree cache transport qualification
`flatpak-dependency-transfer-probe` defaults to false and requires the compiler
transfer probe. It adds an actual tar/zstd archive of `.flatpak-builder/cache`
to the same-run experiment, with one-day artifact retention. This is a cache-only
projection; application stage objects can remain. It is not a minimal dependency
graph or a production writer/allocation change.
The helper accepts only the observed `bare-user-only` repository mode, preserves
checksum-shaped symlink objects as opaque payloads, rejects structural links,
and runs real OSTree fsck before packing and after staged restoration. Inventory,
profile and digest checks precede destination publication. Bounds are8GiB logical
payload,2GiB compressed archive,100,000members and bounded subprocesses; these are
experimental limits, not approved cache allocations. Packing/fsck/archive bytes
and restore time are recorded. Local roundtrip fixtures exercise real tar/zstd
but mock fsck; actual hosted OSTree preservation is still unproven.
The fresh consumer skips ordinary builder-cache restoration for this experiment.
It prepares SDK state separately, restores the transferred cache first and compiler
results last, and forces application work without changing compiler inputs. A
PATH wrapper records the existing pinned builder action while preserving argument
and failure status. Require all dependency module hits, an actual application
rebuild, substantial compiler reuse and unchanged three validators. Measurement
uploads retain JSON and builder log without reuploading either large input archive.
The producer export's runtime test does not prove the separately rebuilt consumer
artifact; installed-profile qualification of that artifact remains necessary before
any shipping decision. Actual transport/reuse/retention and whole-job savings
must be established before adoption.
When both dependency transfer and runtime qualification are selected, only the
rebuilt consumer publishes `flatpak-runtime-repo`, after its validators pass.
The saved-profile job explicitly waits for that consumer and runs the unchanged
installed-artifact harness on its export. Ordinary runtime-only qualification
continues to use the producer export; an unselected compiler consumer must not
skip that job. Runtime reuse of the same run ID also selects this unique artifact.
This wiring closes the planned consumer-output coverage gap; actual hosted
saved-profile execution of that output remains unproven until the combined trial.
### V7: actual compiler reuse, package-setup timeouts retained
[Compiler consumer119865322923](https://github.com/obs-rust/obs-studio/actions/runs/39788434414/job/119865322923)
passed327hits/3misses, all6dependencyhits, a full application rebuild and all3
validators. Whole consumer418s; builder214s; compiler download11s; helper restore
1.158s; normal builder seed2,715,273,348B restored in42s. This establishes one
same-run artifact fresh-runner compiler reuse result, not retained production
cache transport or the routine warm cohort. Production cache publication and
runtime-export packaging were not part of that consumer clock.
The workflow ended cancelled: Qt exceeded30minutes and runtime infrastructure
installation exceeded25minutes, both during Ubuntu package downloads. The runtime
application/profile test never ran. All selected active jobs total194.6833
runner-minutes:21success,1failure,2automatic timeout cancellations; skipped jobs
excluded and no billing multipliers. No manual cancellation or unchanged retry.
See[portable v7 evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v7.json).
### Actual OSTree preservation and v8 producer evidence
The local bounded container fixture passed real OSTree2025.7 commit/fsck before
and after archive restoration, same commit/ref, checkout data, symlink payload
and executable mode. This is a small real repository, not the hosted SDK/cache.
The first setup was rejected for a nested-manifest Dockerfile context before the
fixture ran; corrected setup501 and fixture502 passed. Raw identities and exact
fixture source are in[local evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-ostree-local.json).
Live[v8](https://github.com/obs-rust/obs-studio/actions/runs/39792586176) producer
119872197788 succeeded in899s, including optional experimental work. Actual
producer fsck passed10commits/19,089objects. Its cache-only archive retained70
opaque object links,19,367members and3,375,738,776 logical bytes; tar/zstd size
1,626,857,574B, published artifact1,626,859,156B. Packing including fsck took29.008s.
Compiler tar700,098,560B/published700,100,104B took3.045s to pack. Combined published
input artifacts total2,326,959,260B. These actual archives are not a minimal
dependency graph, production Actions-cache size measurement or retention proof.
Consumer119879152813 was queued at capture; restoration/reuse, consumer runtime
and full trial cost remain pending. See[producer snapshot](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v8-producer.json).
The prior section's statement that local fixtures mock fsck describes the unit
fixtures; the separate native fixture here now supplies additional real evidence.
### Qualified v8 consumer and projected production cache
Completed consumer119879152813 logs and its measurement artifacts prove restored
OSTree fsck, all6dependencyhits, real application rebuild,327compilerhits/3misses
and all3validators. Dependency helper restore25.902s; compiler restore1.411s.
Installed consumer runtime119883556478 passed saved screen/camera/microphone/browser
recording with310verifiedbrowserframes, modules, unchanged C++WebSocket and debugger
checks. App commit`dcec8109ee89db6fa5affbf9556d290ad39a2632e8fc879c1132bec1abaaa9a6`
and Debug commit`1efed457995d1935bd3b52e79aa1dfd6b4e658a9b318fa6935c3aeb3ed871e9c`
match the consumer export log. Synthetic/software coverage limits remain. Status
API lagged completed logs/artifacts; full selected-job cost is still pending.
See[qualified evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v8-qualified.json).
The production change uses one existing Actions builder-family archive containing
only `.flatpak-builder/cache` and `.flatpak-builder/ccache`, with a versioned
architecture/manifest/source-generation key. All legacy restores are suppressed
on any new-state hit. A miss retains the old builder-then-compiler migration order.
The pinned action keeps ccache enabled and disables its automatic restore/save;
explicit master-only publication follows existing one-build ccache pruning and
all validators. The standalone compiler family becomes a migration input without
a new writer. Cold mode disables every production restore/publication.
Backend, family/global allocations and janitor policy stay unchanged. The actual
experimental pair2,326,959,260B supports this bounded projection; it does not prove
the exact future Actions archive size or retention. Inspect the first trusted
production publication and retained consumers after normal merge, then collect
the required routine warm before/after cohort. Neither the418s v7 consumer nor
v8's diagnostic consumer proves the parent's50%median target by itself.
## Production result and next compiler attribution (#1760)
Merged #1767 published a trusted 2,266,246,245-byte projected Actions cache
(id9351848007) after validators. The compiler-cold seed job119934657726 in
run39810319992 succeeded in651s with six dependency hits and0/331compiler
hits. Its enclosing workflow later cancelled the remaining macOS job under
existing master-dispatch concurrency; all selected work cost112.1runner-min.
Actual retained consumer119942032116 in run39812201578 restored that exact
cache and genuinely rebuilt OBS with329directhits/2misses. All validators
passed; the whole job took480s. This single observation is about47% below
the historical905s median, but exceeds450s and is not the required three-job
comparison. Exact-key publication was skipped; different source generations
must include publication costs. The issue remains open.
The default-off `flatpak-compiler-diagnostics` dispatch input attributes the
remaining compiler work. It adds only `CCACHE_LOGFILE` to the generated OBS
module environment and retains build directories for that diagnostic job.
The pinned action supports `keep-build-dirs`; those directories are excluded
from the existing projected publisher. Compiler flags, freshness settings,
Rust wrapper bypass, shipped outputs and validators are preserved.
The report artifact `flatpak-compiler-diagnostics-` contains only bounded
repository-relative source labels, result codes, unsupported option names
(with option values omitted), and observed log spans. Raw commands and
environment logs stay in the runner's transient build directory. At most
16MiB across eight module logs are read; oversized or missing observations
fail the requested diagnostic. Interleaved invocations and PID reuse are
handled separately. Spans are wall intervals, not CPU time, and uncacheable
calls can exec the compiler after logging ends. Concurrent spans must not be
summed into job time. This diagnostic does not itself establish savings.
### Actual compiler-rejection attribution
Corrected diagnostic run39820372855/job119969902046 at9cbb3247e passed
in472s. Artifact12443864404 reports347calls:327directhits,4misses and
16unsupported-option calls. Every rejection is an obs-browser source with
`-fmodules-ts`; sources and sanitized option names are now attributed.
CMake's automatic C++20 module scanning enables that flag, while the project
currently declares no `CXX_MODULES` file sets. This identifies a separate
configuration opportunity; no scan setting changes in this diagnostic PR.
Portable evidence: `docs/ci-evidence/2026-10-22-flatpak-compiler-reasons.json`.
The first report's missing attribution is retained as a limitation and was
fixed with RED92c06356d/GREEN9cbb3247e. Fallback log spans exclude actual
compiler execution; they are not the duration of the rejected compile.
### C++20 browser cache rejection
Corrected hosted diagnostic39820372855 attributes all16 uncacheable compiler
calls to obs-browser sources rejected for `-fmodules-ts`. CMake automatically
scans C++20 targets under CMP0155; the repository declares no named-module file
sets. The Flatpak OBS config disables automatic module scanning while keeping
C++20, PCH and normal header dependency tracking. This is a recipe-only setting.
The real Freedesktop26.08 SDK fixture reproduces the rejection before the change:
cold output42, then warm output42 with1 direct hit and1 unsupported option,
failing the required2-hit assertion. With scanning disabled, all10 trials pass:
source/header/compiler changes with preserved size and mtime, configuration
change, and the subsequent2-hit warm build after each. No unsupported options
remain. See [portable SDK evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cpp20-cache.json).
These isolated fixture timings are not whole-job savings. Full application cache
consumer and installed saved-profile qualification remain required before adoption.
### Full C++20 cache and installed-package qualification
Run39824614077 at frozen d511b0a84 passed the full producer, fresh compiler/
dependency consumer and installed saved-profile runtime jobs. Consumer119988550402
verified10OSTree commits/19,088objects, all6dependency hits, a genuine OBS rebuild,
343direct compiler hits/3misses and0unsupported options. All3validators passed.
The producer's first browser rebuild had327hits/19misses; the subsequent consumer
therefore demonstrates the16newly cacheable browser calls rather than only a
fixture assertion. These experimental transport jobs are not routine timing samples.
Runtime119993180570 passed the actual consumer App/Debug refs, saved screen,
camera, microphone and browser recording (303verifiedbrowserframes), CEF debugger
checks and unchanged C++WebSocket v5. Synthetic/software coverage limits remain.
The rebased recipe/fixture/tests are byte-identical to the qualified source;
only adjacent documentation needed conflict resolution with merged diagnostics.
See [full qualification](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cpp20-qualified.json).
The enclosing workflow also had the known Windows callback declaration parity
failure tracked in #1549/#1541 (664pass/1fail). Its seed/log and cost are retained;
no unchanged rerun or test exclusion was used. Normal PR CI passed separately.
The parent50%/450s median target still needs a new production cohort after merge.
# Flatpak performance retrospective (#1760)
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
## Measured performance result
| Metric | Historical baseline | Final configuration |
| --- | ---: | ---: |
| Warm whole-job samples | 702s, 905s, 911s | 437s, 434s, 447s |
| Median | 905s (15m05s) | **437s (7m17s), 51.71% lower** |
| Nearest-rank sample p95 | 911s | 447s |
| Sample size | 3 | 3 |
| Matched current cold | — | 846s |
The final three warm full-job observations are **437s, 434s and447s**.
Their median is **437s (7m17s),51.71% lower** than the historical905s
(15m05s) baseline median. This meets the >=50% and <=450s performance target.
Nearest-rank sample p95 is447s versus911s before; with n=3 these are sample
maxima, not stable population-tail estimates. Matched cold is846s.
All selected final workflows failed independently on #1816; successful Flatpak
jobs do not establish healthy whole-workflow CI. At this report revision, final retention, reporting,
review/merge and owned cleanup remain. The closing report on #1760 records
those terminal verification results after normal queue maintenance.
Implementation PRs #1763 (CEF), #1771 (installed saved-profile validation),
and #1767 (safe compiler reuse and projected cache) merged through the normal
queue. #1803 adds default-off compiler attribution and has merged normally.
#1806 restores browser C++20 cacheability and merged normally after SDK, full
consumer and installed saved-profile qualification passed.
No new workflow files were introduced. The original three-sample cohort and
matched cold measurement are complete, as is the final C++20 production cohort.
The issue remains open for settled retention, reports, review/merge and owned cleanup.
The completed table below describes the intermediate configuration before #1806.
The final-configuration result is reported above and below.
| Metric | Before | Interim measurement (before #1806) |
| --- | --- | --- |
| Warm full-job observations |702s,905s,911s|480s,421s,475s |
| Median |905s (15m05s)|475s (7m55s),47.51% lower; misses target |
| Nearest-rank sample p95 |911s (n=3 maximum)|480s (n=3 maximum), not a stable population tail |
| Warm compiler result |Old reports were restored cumulative counters|Cacheable calls:329/331,327/330,328/330 direct hits after reset;16unsupported calls excluded in each |
| Actual projected archive |Legacy builder2,715,273,348B plus59,423,648B compiler in production seed|2,266,246,245B seed;2,266,212,985B next generation |
| Current cold whole job |Historical explicit cold builder790s;2111s diagnostic whole job included extra probes|Matched090c8ad cold-only39820593708:921s,SDKpreinstalled |
First warm run39812201578/job119942032116 genuinely rebuilt OBS, passed all
validators in480s and its complete selected workflow passed with112.75
runner-minutes. Second run39816841905/job119958260969 genuinely rebuilt and
published a new source generation in421s; its complete workflow passed,118.65runner-minutes.
Third run39821239168/job119973699055 passed475s and115runner-minutes.
All three selected workflows passed without failure/cancellation,346.4runner-minutes
total. Matched cold39820593708 passed921s/120.55selectedrunner-minutes,
with0compilerhits/330misses/16unsupported; SDKimage inputs remain preinstalled.
Its source090c8ad includes the portal shortcut-set port #1800 relative to
2bc7b591 in the first sample. Manifest/browser/CEF profile is unchanged;
compile call counts and source differences remain disclosed. These are
observed before/after cohorts, not a matched-source causal estimate.
## Final configuration seed and measurement routing
Trusted manual master seed [39831165145](https://github.com/obs-rust/obs-studio/actions/runs/39831165145)
used source `e1b649910c0d082b482bd3adfe58c67436b3e82a`.
The full Flatpak job passed in **455s**, with six dependency hits, a genuine
application rebuild, 315 direct compiler hits, 30 misses and zero unsupported
calls. It published archive `9358763488`, **2,274,967,809 bytes**, after the
required validators. This producer seeds newly cacheable browser objects and
is excluded from the final warm cohort.
The complete workflow failed in Fast Gate on the shader sampler C oracle's
strict sign-conversion compilation ([#1816](https://github.com/obs-rust/obs-studio/issues/1816)).
All selected jobs consumed **81.47 runner-minutes**; the failure is retained,
with no unchanged retry. A successful Flatpak job does not imply a successful
whole workflow.
Actual merged path scope did not select a full Flatpak job on master push;
the manual seed corrects the original automatic-seed assumption. Before any
final warm sample, the [amended sampling plan](https://github.com/obs-rust/obs-studio/issues/1760#issuecomment-6348807912)
proposes the default-off manual routing mode in #1817. That mode keeps the
complete Flatpak job and Fast Gate while omitting unrelated native matrices.
Its branch qualification passed the complete Flatpak job in392s, with342direct
hits/3misses, all six dependencies reused and all three artifact validators
passing. Fast Gate reproduced #1816 and the final gate correctly failed;
whole workflow cost14.033runner-minutes, no cancellations or retries.
[Portable routing evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-measurement-routing.json)
records the source and skipped native matrices. The branch retains existing
trusted-master publication restrictions and is excluded from the production cohort. Routing
savings cannot count toward the Flatpak job's performance target.
## Final production cohort
Normal routing PR #1817 merged as `9b6f1f74835cfb852d70dd10abfb0c070058d8d5`.
The [first final warm run](https://github.com/obs-rust/obs-studio/actions/runs/39837821816)
passed its complete Flatpak job in **437s (7m17s)**, including required new
cache publication. All six dependencies were reused, OBS genuinely rebuilt,
and the compiler reported342directhits/3misses. All three artifact validators
passed. Restored archive9358763488 was2,274,967,809B; new archive9360891151
is2,274,822,651B. The complete workflow failed on known #1816 and consumed
14.967runner-minutes. No cancellation or retry was used.
Warm2 passed434s with343directhits/2misses, all six dependency hits and all
three artifact validators. It restored archive9360891151 and skipped immutable
exact-key publication. Its whole workflow failed on #1816,17.45runner-minutes.
Exact-source cold passed846s with0hits/345misses, all artifact validators,
and all four builder/compiler restore steps skipped. Publication was disabled;
the SDK image remained preinstalled. The cold workflow failed on #1816 and
consumed20.567runner-minutes. Third warm39840480759 passed447s,331directhits/14misses,
all six dependency hits and all validators, including new-generation publication.
It includes #1815 scene-audio extraction relative to the first two samples;
recipe/browser/CEF are unchanged. Its workflow failed #1816,17.017runner-minutes.
The final median437s meets the target; selected warm workflows cost49.433runner-minutes
with three failures, no cancellations or unchanged retries.
[Portable cohort evidence](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-final-cohort.json)
retains all three observations and their whole-workflow outcomes.
## Where the time went
Observed nonoverlapping log intervals for reference39721238636/job119635024523
and production warm 2, run39816841905/job119958260969:
| Phase | Reference: 911s | Warm 2: 421s |
| --- | ---: | ---: |
| Setup/restores/dependencies through OBS module start |207s|174.34s |
| OBS checkout/configure/compile/install |340s|116.97s |
| Debug processing through build-stage commit |210s|10.39s |
| Stage commits/cleanup/export through counter report |121s|77.89s |
| Stats/validators/publication/final cleanup |33s|41.41s |
For the final configuration, [three completed warm phase observations](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-final-phases.json)
show167–192s setup/restores,81–89s configure/compile/install, about14s debug
processing,117–120s commits/export and28–50s counters/validators/publication/cleanup.
These sum to the complete437s/434s/447s jobs; setup and export dominate remaining
wall time. First stripping messages mark the observed debug phase.
These are buffered-log wall intervals, not CPU profiles. In the interim table above, the final phase
includes required new-generation publication on warm2; warm1 had an exact
key hit and skipped immutable-key publication. Do not add independent
fixture/probe percentage savings together.
## Changes adopted
- CEF keeps usable build IDs/debug source lines, with zstd-compressed ELF
debug data and first-party no-debuginfo-compression. The isolated pinned
CEF comparison was130.951s to10.666s; real export/runtime checks preserve
browser loading, the unchanged C++ WebSocket v5 and required modules.
- Compiler caching uses real compiler paths, PCH-aware CMake launchers,
dependency mode and compiler-content validation. Ten SDK trials cover
preserved-size/mtime source/header changes, compiler/config changes and
following warm hits. Rust compiler wrappers stay disabled; Rust targets
are not retained in the projected archive and actual rebuild logs show
the Rust crates compiling.
- One trusted master publisher saves only dependency OSTree and compiler
state after validators and successful existing pruning. New-state hits
suppress legacy overlays. The pinned action and standalone compiler
writers are disabled. Existing backend, budgets and janitor policy stay.
## Techniques measured and deferred
| Technique | Evidence | Disposition |
| --- | --- | --- |
| Disable transient cache fsync |Upstream builder already disables per-file cache fsync|No change |
| Lower archive zlib level6 to1 |Full real payload, four ABBA trials:6=[25.08,50.41]s;1=[21.40,23.76]s;all five refs/17,914objects verified;49,173,191B larger|Defer: noisy local15.17s median difference, no demonstrated whole-job gain |
| Custom production transport |Actual combined experimental consumer/runtime succeeded, but existing Actions projection fits declared family|Existing backend preserved |
The first full-export experiment correctly rejected a screenshots ref mismatch:
the source summary referenced an older commit than the source loose ref.
Corrected experiment535 imports exact immutable commit IDs and retains all-ref
identity/fsck guards. It verifies the original artifact SHA256 before unpacking.
No packaging setting changed from this local experiment.
## Runtime and invariants
V8 consumer export App dcec8109... /Debug1efed457... matched the installed refs.
The saved screen/camera/microphone/browser profile passed actual recording,
310browser frames, tone/motion checks, authenticated unchanged C++WebSocket v5,
23module inventory, CEF build ID/GDB source line and clean shutdown. Synthetic
devices and software rendering do not establish physical-device/GPU coverage.
Existing C tests and public headers were not changed for these units. Default
release bundles and debug artifacts remain intact.
## Capacity and transfer accounting
Pinned ci-lint interprets GB as1024^3: global10,737,418,240B;
builder2,684,354,560B. Each real2.266GB archive fits the unchanged builder
allocation. Two retained production consumers prove useful reuse. The later complete snapshot9,186,986,336B contains one projected generation
and fits the existing global limit. Janitor119982543166 succeeded and reports
one builder entry; it deleted three superseded non-Flatpak entries. Ownership
remains with #1269; the earlier seed eviction actor is not established. Normal janitor LRU overflow/newest-entry
protection is preserved; no manual cache deletion or invented capacity.
Archive sizes are actual cache/artifact payload observations. They are not
complete NIC/TLS transfer totals. Excluding downloads means source archives
are fetched again: warm2 logs seven source downloads and1,026,740,380B apparent
download-directory inventory. That inventory is not wire bytes, and reduced
cache archive size alone is not a claim of lower total network traffic.
## Cost and failure accounting
All measurement workflow job intervals (all attempts) are retained in
cost-ledger/summary.json, with raw responses per run. The three baseline
selected workflows cost374.033runner-minutes; their Flatpak jobs alone
cost41.967runner-minutes. Completed nonbaseline workflows currently account
for2199.017runner-minutes, excluding a cancelled seed workflow whose
112.117known runner-minutes have one inconsistent cancelled placeholder. This is runner-interval
accounting, not an invoice. PR/merge-group CI and local bosn work are explicitly
outside this ledger scope.
The production seed Flatpak passed651s with0hits/331misses, but its remaining
macOS job was automatically cancelled when the next master dispatch took the
same workflow concurrency slot. The raw all-attempt API also contains one
unexpanded cancelled matrix placeholder with a reversed1s interval; report
this inconsistency rather than silently adding negative time. Later master
measurements wait for their entire predecessor to become terminal.
Failures are preserved: wrapper-link packing, incomplete container upload,
bootstrap PATH, SDK-profile mismatch, harness readiness/profile/recording
checks, and native media-seek/package-acquisition failures. V7 Qt/runtime
package setup timed out automatically. No unchanged workflow was retried to
obtain a passing result. Changed-code trials and their extra native/transport/
runtime costs remain separate from routine Flatpak improvements.
## Post-cohort cache observation
The [post-cohort inventory](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-post-cohort-retention.json)
contains39entries/11,139,864,070B, above the10GiB global budget. Its two projected
archives total4,549,850,337B, above the2.5GiB family budget. This is a transitional
snapshot, not settled capacity proof. The newest archive9361847609 is2,275,027,686B
and fits individually; final warm2/3 actually consumed9360891151. No claim is made
that the newest archive has a later consumer. Existing janitor maintenance at
normal merge-group/master events must demonstrate settled retention; its terminal
log/inventory and final reporting are recorded in #1760's closing report. Backend,
budgets and age protection are unchanged; no cache was manually deleted.
## Handoff checkpoints at this report revision
1. Finish the final portable evidence review against raw records; all three
final warm observations and exact-source cold are complete.
2. Preserve the historical and interim cohorts, source/toolchain differences
and the distinction between Flatpak success and failed whole workflows.
3. Verify retained production consumer reuse and current family/global capacity;
preserve all run costs, failures, cancellations, bytes and source differences.
4. Commit portable final evidence and publish final1760/1667reports, including
the measured target result and remaining CI failure; audit all original criteria.
5. Finish only owned branch/worktree cleanup. The original checkout now holds
another active release change; preserve that work and its branch.
## Current browser compiler follow-up
Corrected diagnostic39820372855 attributes all16unsupported calls to obs-browser
`-fmodules-ts`. Recipe-only CMAKE_CXX_SCAN_FOR_MODULES=OFF retains C++20 and
header dependency tracking. RealSDKRED545warm1hit/1unsupported fails; GREEN549
passes all10source/header/compiler/configuration freshness trials and warm2hits.
The original production cohort median475s misses the450s/50% target; preserve
allthree samples and measure the new configuration separately after qualification.
After normal1803queue merge, cache snapshot records36entries/9,186,986,336B,
below the binary10GB global limit; one projected generation9354045170 remains
at2,266,212,985B, below the binary2.5GB family limit. Do not infer which actor
evicted older generations solely from this inventory; inspect janitor logs.
## C++20 full qualification outcome
Producer119984644801 passed470s with327hits/19misses. Fresh consumer119988550402
passed558s with343hits/3misses/0unsupported, all6dependencies, genuine OBS rebuild,
fsck10commits/19,088objects and all validators. Dependency and compiler restore
helpers took18.905s and2.285s; these exclude download time. Actual input artifacts
were1,627,039,061B dependency and648,930,822B compiler; exported repository artifact
was1,095,997,602B. Installed saved-profile runtime119993180570 passed133s, with
303verifiedbrowserframes and exact consumer App/Debug identities, CEF debugger
and unchanged C++WebSocket checks. Synthetic/software limitations remain.
The enclosing qualification39824614077 cost133.3667runner-minutes and failed
only the known Windows callback parity test (664pass/1fail, #1549/#1541); its seed
and log were preserved without rerunning or changing tests. Normal1806PRCI and
merge-result CI passed independently. The PR has merged through the normal queue. The later production cohort establishes the final performance target, with
whole-workflow failures and source differences retained.
## Process improvements for the next CI batch
- Manual full-matrix experiments spend most runner time on unrelated native jobs.
#1817 adopted a tested manual lane selector in the existing workflow, retaining
the full Flatpak job and Fast Gate while preserving routine PR/release gates.
These routing savings are separate from the measured Flatpak job speedup.
- Freeze qualification source identity and fetch completed artifacts alongside
lagging status APIs. A timeout observing a run is not a build failure or retry.
- Record all compiler calls, including unsupported calls; reporting only cacheable
hits hid16expensive browser compiles behind a99%hit figure.
- Inspect GitHub mergeability early when PR checks are absent. This unit had an
adjacent documentation conflict after the diagnostic PR merged; resolving it
preserved byte-identical recipe/fixture/test code and allowed normal PR checks.
- Keep one primary reviewer through follow-ups and one RED/GREEN unit per PR;
preserve failed full-workflow costs separately from successful Flatpak scope.
Historical media-seek failures in v2/v3 were tracked by #1765/#1774 and fixed
independently in #1775 (b39a4e0a8). Those qualification branches predated the fix;
retain their actual failed outcomes/costs rather than attributing them to Flatpak
configuration. The later Windows callback-parity failure remains a separate
known issue. No C test was modified by the Flatpak performance units.
## Evidence index
- [Completed interim production cohort](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-interim-cohort.json):
all three observations, cold run, identities, costs and failed target.
- [C++20 SDK RED/GREEN](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cpp20-cache.json):
all ten invalidation/reuse trials.
- [Full C++20 qualification](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-cpp20-qualified.json):
actual fresh consumer and installed App/Debug/profile identities.
- [Earlier transport qualification](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-transfer-v8-qualified.json):
original combined transport/runtime evidence and limits.
## Final cohort status
#1806 merged normally as e1b649910c0d082b482bd3adfe58c67436b3e82a.
The trusted manual master seed [39831165145](https://github.com/obs-rust/obs-studio/actions/runs/39831165145)
passed455s with all optional inputs off. It is excluded from the warm cohort.
Actual merged ci/ci_scope.py returns full=False for path-based master pushes,
so no automatic full Flatpak seed is selected; earlier scheduling assumptions
were corrected before observing any final warm timings. The first three routine
warm jobs and matched cold are now complete:437/434/447s and846s respectively.
- [Workflow cost ledger](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-workflow-costs.json):
all completed measurement runs, including final seed/cohort observations,
and the cancelled seed metadata anomaly.
# Flatpak packaged runtime qualification (#1760)
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
The existing `ci.yml` manual entry point accepts `flatpak-runtime-test=true`.
It preserves the full build, AppStream/build-directory/repository validators
and release bundle policy. After validation, the opt-in path transfers the
exported OSTree repository to a fresh Ubuntu 26.04 job. Neither routine PRs nor
routine full builds run this additional qualification by default.
The test installs the actual application and matching Debug extension from that
repository into an isolated XDG data directory. It verifies their commits and
CEF build IDs, and resolves `cef_version_info` source lines through GDB using
the installed Debug extension. It then runs `flatpak run` with a saved profile,
not the builder's staging directory or an empty first launch.
The profile includes PipeWire screen and camera capture, a PulseAudio microphone,
and an actual CEF browser source. The unchanged AppImage testkit supplies a
ScreenCast/Camera portal and microphone tone. Screen/camera producers supply
moving images. The unchanged C++ WebSocket plugin must authenticate over v5,
report the saved sources, start a recording and stop it successfully.
The recording passes the existing AppImage verifier: moving screen and camera,
continuous 440 Hz microphone audio, sufficient frames and clean decoding. An
additional pixel check requires the browser's green HTML rectangle throughout
the decoded recording. The app must load every packaged OBS module, except the
hardware-only decklink/NVENC exceptions and explicitly diagnosed absent AJA devices, and exit cleanly. These are
synthetic devices with software rendering; physical hardware is not covered.
## Cost and evidence
This is additional qualification work. The build logs the uncompressed export
archive size; Actions records upload/download, setup and runtime-test durations.
The test retains installed app/debug commits, module inventory, logs, recording
and elapsed time in the seven-day runtime evidence artifact. The temporary
repository artifact expires after one day. There is no new cache family,
registry publication or external storage.
Count archive/upload and the separate job's setup, download, runtime and cleanup
when reporting qualification runner cost. Keep the routine no-probe build table
separate, and do not count removing this opt-in test as a routine speedup. Runtime
qualification does not establish #1760's warm/cold full-job performance target.
## Local feedback
`uv run --no-project python -m unittest ci.test_flatpak_runtime` checks negative
capture/plugin evidence, absent/insufficient/wrong browser frames, matching Debug refs,
and saved-profile construction. It does not replace the live packaged run.
The local gate cannot attest this hosted opt-in job; ordinary PR CI remains the
merge gate. Keep performance PRs draft until a real qualification run succeeds.
A local FFV1/YUV420p video round trip confirms the browser pixel check accepts
180 green-patch frames and rejects 180 frames without the browser patch. The
first local encoder fixture could not run because the SDK's FFmpeg lacks
libx264; that failure is retained. The FFV1 fixture validates decoding/crop/color
checks, not CEF rendering or the actual packaged H.264 recording.
## Recheck an existing export
For harness-only fixes, `ci.yml` accepts `flatpak-runtime-reuse-run=`.
It skips the build-project invocation, downloads the same-repository run's
immutable export, and runs the current harness against it. CI format/data checks
and the final gate still run. The final gate includes this consumer's result.
The read-only Actions token downloads the artifact; no cache is published.
The result records the package source SHA from the producer run, the harness
SHA and producer run ID separately. An old artifact cannot qualify a later
packaging change: build a new export whenever shipped inputs change. The archive
expires after one day; retain the downloaded evidence for the retrospective.
This mode saves a repeated full build, not the fresh runtime session setup.
The first hosted attempt built/exported successfully but stopped before install:
`remote-ls` returned `app/` and `runtime/` kind prefixes, unlike the installed-ref
listing used during local investigation. The exact hosted output now has a
regression. Only valid app/Debug kinds are normalized; branch/architecture and
Debug-extension matching remain strict. No live capture pass is claimed yet.
## Hosted qualification failures retained
The first exported repository qualified in run `39754042722`; its runtime
harness stopped before installation on typed remote refs. Run `39758270223`
reused that immutable export with the corrected parser, installed the app and
Debug extension, confirmed the CEF build ID and resolved `cef_version_info`
source lines with GDB. It then failed to connect to WebSocket: OBS had opened a
default profile. Flatpak resets protected XDG variables after `--env`, so that
option did not select the saved fixture. The harness now uses the installed
runtime's `env` command inside the sandbox to set the fixture config root before
executing the same packaged `/app/bin/obs`. It grants only the existing fixture
directory, and neither changes HOME nor modifies the packaged executable.
See [Flatpak XDG conventions](https://docs.flatpak.org/en/latest/conventions.html).
These failures are retained; no saved capture/browser runtime pass is claimed yet.
Run `39759412764` confirms the saved-profile launch correction: the unchanged
WebSocket plugin loads its saved authenticated configuration, and OBS creates
all four saved sources. The initial GetVersion request arrived before scene
loading completed and received the plugin's explicit `207 NotReady` status.
The harness now waits up to 60 seconds for that read-only readiness check;
other errors and all recording commands fail immediately. Existing failed-run
capture warnings occurred during cleanup and do not prove capture failure.
That package also includes AJA modules. The hosted runner has no AJA hardware,
and the real log explicitly reports both the absent devices and module
initialization failures. The harness records these as unavailable hardware only
when both exact diagnostics are present; a missing library or unexplained
plugin failure still fails. Browser and unchanged WebSocket loading remain
mandatory. This does not claim physical AJA, camera or microphone coverage.
Run `39760870691` passed readiness, authenticated GetVersion and the exact saved
input inventory; microphone capture opened `obs-test-mic`. The harness then
queried recording status immediately after successful StartRecord, observed
inactive and shut down before the queued recording transition completed.
It now sends StartRecord once and polls only GetRecordStatus for up to 20 seconds.
A never-active recording still fails; no mutation is retried. Full recording,
screen/camera streaming and browser-pixel verification remain outstanding.
Run `39762495293` completes a 12.166-second, 365-frame recording and clean app
shutdown. Screen and camera motion, continuous 440 Hz microphone tone, portal
streaming, plugin inventory and installed CEF debug checks pass. Browser pixels
fail: the decoded frame contains the underlying screen bars where the green
HTML should appear. This failure is retained; module loading is not treated as
proof of browser rendering.
That runner reports llvmpipe and no DRM render node, while the frontend's browser
hardware setting defaults to true. The next fixture explicitly selects the
user-visible `BrowserHWAccel=false` setting in its saved global configuration,
matching the declared software-only environment. The green-pixel threshold
remains unchanged. This is a hypothesis to validate, not a confirmed cause or a
browser pass; hardware browser rendering is outside this synthetic coverage.
## Successful installed-package qualification
[Run 39763463067](https://github.com/obs-rust/obs-studio/actions/runs/39763463067)
passes the complete installed-package scenario with the unchanged export from
producer `39754042722`, package source `8ff154c45`, and harness `eb36fc7b5`.
The app records 361 frames over 12.033 seconds; screen/camera motion and the
continuous 440 Hz tone pass the unchanged recording verifier. All 302 decoded
browser frames after the two-second startup allowance meet the original green
pixel assertion. Authenticated unchanged WebSocket v5, module inventory,
clean shutdown, installed CEF build IDs and GDB source lookup pass.
See [portable runtime evidence and attempt costs](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-installed-runtime.json).
Five failed attempts are retained; no cancellation or unchanged retry was used.
This proves software browser rendering on the synthetic runner, not the failed
default hardware setting or physical device/GPU behavior. Upstream missing DWO
warnings remain; source-line lookup is not complete Chromium symbol coverage.
The earlier failed-run entries above are historical evidence, not current holds.
This runtime hold is satisfied for the recorded package. Normal PR CI and the
merge queue still apply. The next full build must qualify the combined cache
restore/reset controls, and the issue's three warm observations, cold measurement
and 50% whole-job target remain unproven. Do not close #1760 on this runtime pass.
# Tier 2 runner capacity on the merge queue (2026-11-07)
The queue keeps both complete Linux Tier 2 backends, but schedules one runner
per backend on PRs and merge groups. Background/main/nightly/release runs keep
the six partitions. This reduces test-runner requests by 67% without removing
assertions, changing the aggregate gate, or extending the 60-minute deadline.
## Measurement
Fetched with `gh api` on 2026-11-07, using
`repos/obs-rust/obs-studio/actions/runs?event=merge_group&created=>=2026-11-06T16:20:00Z&per_page=100`
and each run's `/jobs?per_page=100` endpoint. The response contained 90 runs
(all master queue refs), from November 6 19:01:41Z through November 7 16:27:07Z.
No additional page was needed (90 total runs; at most 41 jobs per run).
The local CSV `docs/ci-evidence/2026-11-07-merge-group-jobs.csv` contains
1,056 non-skipped job records with timestamps and computed seconds. It stays
untracked under the repository's measurement-output policy (#2686). Skipped jobs consumed no runner. For allocated
jobs, queue seconds = `started_at - created_at`; runtime seconds =
`completed_at - started_at`. Never subtract workflow creation: that would
count dependency wait. Unassigned/pending/cancelled jobs have blank durations;
they are not zero-second successes. Collection is a non-atomic snapshot: run
metadata and job status can differ when a run finishes between API calls.
Summary below includes only allocated jobs with both timestamps, including
failed/cancelled jobs. It is descriptive, not a controlled benchmark.
| Job | Completed allocated jobs | Queue median / max (s) | Runtime median / max (s) |
|---|---:|---:|---:|
| CI Mode 🛂 | 89 | 90 / 882 | 24 / 29 |
| Event Data 🔎 | 88 | 85 / 1268 | 16 / 24 |
| Rust Tier 2 Linux 🐧 (build) | 53 | 57 / 1046 | 307 / 653 |
| Fast Gate ⚡ | 85 | 17 / 1089 | 313 / 482 |
| Rust Tier 2 Linux 🐧 (tests ON) | 48 | 125.5 / 1381 | 217 / 242 |
| Rust Tier 2 Linux 🐧 (tests ON, serial-1-of-2) | 48 | 55.5 / 1922 | 148 / 182 |
| Rust Tier 2 Linux 🐧 (tests OFF, serial-1-of-2) | 48 | 108 / 2093 | 149.5 / 168 |
| Rust Tier 2 Linux 🐧 (tests OFF, serial-2-of-2) | 48 | 183 / 1698 | 142.5 / 171 |
| Rust Tier 2 Linux 🐧 (tests ON, serial-2-of-2) | 48 | 173 / 1976 | 142 / 157 |
| Rust Tier 2 Linux 🐧 (tests OFF) | 48 | 91 / 1531 | 215 / 275 |
| CI Gate ✅ | 86 | 16 / 928 | 14 / 23 |
| Cache Janitor 🧹 | 81 | 5 / 1699 | 13 / 33 |
| Qt Frontend Linux 🐧 | 9 | 19 / 1037 | 205 / 308 |
| Cross Compile 🧰 (mac-arm64,win-x64) | 17 | 3 / 150 | 180 / 209 |
| Rust Cross Lint 🦀 (aarch64-apple-darwin) | 8 | 3 / 518 | 293 / 331 |
| Rust Cross Lint 🦀 (x86_64-pc-windows-msvc) | 8 | 3 / 663 | 324.5 / 356 |
| Rust Cross Lane Proof 🧾 | 2 | 38.5 / 75 | 4 / 5 |
### Coordinator's example: run 42386260200
All eight quoted queue/runtime pairs are independently confirmed, plus the
remaining Tier 2 partition:
| Job | Queue seconds | Runtime seconds |
|---|---:|---:|
| Tier 2 OFF serial-1-of-2 | 2093 | 158 |
| Tier 2 ON serial-2-of-2 | 1976 | 144 |
| Tier 2 OFF serial-2-of-2 | 1698 | 149 |
| Tier 2 OFF suite | 1531 | 235 |
| Tier 2 build | 417 | 293 |
| Fast Gate | 152 | 411 |
| Tier 2 ON suite | 48 | 223 |
| Tier 2 ON serial-1-of-2 | 215 | 139 |
| CI Gate | 177 | 11 |
The six test jobs are the dominant fan-out (six of seven Tier 2 runners).
This confirms severe recent runner waits, but **not** that every entry over
the whole day was close to ejection: many earlier jobs waited 2–5 seconds.
The aggregate maximums above also show other Linux orchestration jobs waiting.
Neither runtime nor fan-out alone guarantees a future hosted allocation time.
## Decision and expected effect
- **Choose compact execution, not omitted tests.** `ci/tier2_matrix.py` emits
OFF/ON × `all` on PRs and merge groups; elsewhere it keeps OFF/ON × suite,
serial-1-of-2, serial-2-of-2. An explicitly full caller also keeps partitions.
Applying the compact layout on PRs both reduces the shared runner demand
and exercises the same execution path before queue admission.
- `all` explicitly clears every CTest part/shard/CPU partition selector.
The existing harness executes the entire registry and CTest still honors
`RUN_SERIAL`. Both C reference (OFF) and hybrid Rust (ON), export parity,
unchanged C assertions, Fast Gate and Rust differential tests remain required
whenever selected. No tests are deferred: only the six-runner scheduling
layout stays on background events. A full backend takes longer on its own
runner; it avoids four allocations, setups and tree downloads per entry.
- **Before/after expectation:** six test allocations become two; including
the unchanged build, seven Tier 2 allocations become three. At queue depth
five, test allocations fall from 30 to 10 (35 to 15 including builds).
Current partition runtimes in the example total 1048 runner-seconds;
the longest partition takes 235 seconds. Complete execution can add serial
runtime to that critical path. Savings in hosted wait cannot be predicted
from the recorded queue delays; measure after rollout rather than promising
a 35-minute reduction or a hard upper bound.
- **Do not add same-head attestation.** A PR head SHA does not identify the
synthetic merge tree. Existing input-keyed lane proofs already cover safe
reuse; exact-input and trusted-run checks remain unchanged.
- **Do not increase the timeout.** Long runner waits are the demonstrated
bottleneck, and reducing four allocations per entry addresses the demand.
The measured low-wait jobs do not justify declaring a larger merge budget.
## Gate and background proof
Ruleset 25065309 was read, never written: active, sole required context
`CI Gate ✅` (integration 15368), ALLGREEN/SQUASH, max build/merge entries 5/5,
check timeout 60 minutes. No ruleset payload or migration is needed.
The aggregate gate and `ci/gate_jobs.py` are unchanged. Real merge-group
[run 42382595386](https://github.com/obs-rust/obs-studio/actions/runs/42382595386)
shows Tier 2 ON job 128435760394 failing and `CI Gate ✅` job 128436702367
**failing**, both the direct needs check and the run-jobs check. This is real
failure propagation evidence for the preserved gate, not a synthetic passing
check. Any future change to that gate requires observing its new version fail.
All six background test partitions actually **ran and passed** on master push
[run 42383307878](https://github.com/obs-rust/obs-studio/actions/runs/42383307878):
OFF suite 128440506750, OFF serial-1 128440506732, OFF serial-2 128440506729;
ON suite 128440506686, ON serial-1 128440506722, ON serial-2 128440506662.
The same matrix is retained for push, schedule and full release callers;
regression tests exercise event selection. These historical runs prove current
execution, not post-merge execution of this unmerged proposal. The coordinator
should compare first post-merge main/nightly runs and queue waits before
claiming a measured speedup.
# CI and build tooling: how not to drown the machines
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Many agents and people work on this repo at once, on shared machines and a
shared pool of GitHub runners. Every unnecessary cold build, raw Docker run or
"just re-run CI" multiplies across all of them. This repo uses a set of
purpose-built tools so that work is cached, shared, run locally where possible,
and skipped in CI when it has already been proven. This document says what
each tool is for and what you should do.
## A proto-tool, still evolving
These tools are not separate utilities that happen to coexist. Together they
form one tool that isn't finished yet:
- soldr caches the build;
- setup-soldr brings that cache to CI;
- bosn bounds the local Docker load;
- act2 replays CI jobs locally;
- zackees/ci.yml sets the protocol;
- ci.toml (or, here, `local-gate.toml` and `ci/ci_scope.py`) decides what
runs for which change;
- attestation lets CI skip what was already proven.
They are still changing. Interfaces move, gaps exist, and this repo doesn't use
every piece yet.
The goal is to evolve how OBS-Studio-Rust is built until its CI is fast, by
following that general protocol rather than inventing repo-specific shortcuts.
When something here is slow or awkward, prefer the fix that moves the repo
closer to the protocol: adopt the next piece, or report the gap upstream in the
tool's repo (zackees/soldr, zackees/setup-soldr, zackees/bosn, zackees/act2,
zackees/ci.yml). One-off workarounds in this repo are a last resort. Treat this
document as a snapshot. When a tool changes, update the guide in the same PR
that adopts the change.
Read it before you build, test or push. It complements
[AGENTS.md](../AGENTS.md), [testing-policy.md](rust-port/testing-policy.md)
and [coordination.md](rust-port/coordination.md); where they set a rule, they
win.
## The rules in one screen
1. **Build Rust only through `soldr`.** `soldr cargo …`, never bare `cargo`,
`rustc`, `rustup` or `rustfmt`. Run it from the repository root (the cargo
workspace), not from `rust/`. Python goes through `uv run` / `uvx`, never
bare `python`.
2. **The local gate is optional.** If you run it, push the stamped commit
with a valid signature on final HEAD. Only complete selected client gates
plus verified-member identity grant fast admission; otherwise real PR checks run.
3. **Don't use GitHub as your test runner.** Don't push to "see if CI passes",
don't re-run whole workflows to debug, and don't look for a label to
force more CI: no label changes what runs, only the changed paths do.
4. **Don't hit Docker directly for long or parallel work.** Docker on the shared
machines is meant to be managed by `bosn`; never `docker system prune`.
5. **The gate lock is shared per clone.** If the gate says another gate is
running, wait and retry; don't kill other people's gates.
6. **Expensive work belongs to the release gate**, not to every PR: full OBS
app builds, Flatpak, and macOS/Windows packaging run nightly and on release.
## The tools
### soldr: the Rust build front end
[zackees/soldr](https://github.com/zackees/soldr) wraps cargo and rustup behind
the toolchain pinned in `rust-toolchain.toml`. It bundles **zccache**, a
content-addressed compiler cache shared across branches and worktrees, so the
same crate is not rebuilt for every checkout. It also manages the
cross-compilation SDKs that let a Linux host check and link the Windows and
macOS targets.
What to do:
- `soldr cargo build|test|clippy|fmt …`, always from the repo root.
- `soldr rustup target add ` for an extra target. Don't add targets to
`rust-toolchain.toml`.
- `soldr status`, `soldr doctor` when something looks wrong; `soldr gc` when it
warns about disk space. The local gate wants 10 GiB free.
What not to do:
- Bare `cargo` / `rustc`. A hook (`ci/hooks/tool_guard.py`) denies them, and
`ci/test_tool_guard.py` fails scripts that use them.
- Bump `rust-toolchain.toml` past what the CI soldr supports natively.
`ci/test_toolchain.py` enforces this; bump soldr first.
- Running cargo inside `rust/`. The workspace is the repo root, and cargo then
fails to load the workspace (`failed to load manifest for workspace member
rust/target`).
Known pitfall: zccache has replayed stale Rust compiler output. Both the build
and release workflows set `SOLDR_RUSTC_WRAPPER=none` for setup/cook and native
Rust consumers; the local gate sets it too (`OBS_GATE_ZCCACHE=1` opts back in
locally). Pinned soldr 0.9.54 defaults to the managed wrapper without this
override, and [zccache#1943](https://github.com/zackees/zccache/issues/1943)
remains unresolved. This safeguard preserves standalone C/C++ compiler
caching and soldr cook/target archives. All seven setup-soldr callsites also
set `build-cache: false`: the full-run audit observed no embedded session
across all eight expanded build lanes, despite transferring compiler-store
archives (42.9 MB and 1.1–2.2 s in the inspected Linux host jobs). This input
removes embedded compiler-store transport; it preserves cook, registry and
toolchain layers (the Tier 2 builds set `prebuild-deps: none`: Linux compiles Rust only in
Corrosion's own target dir, #3027, and macOS/Windows only there and in
`--target ` build trees, #3034). The unused `setup-soldr:build-cache` retention family is
also retired, allowing the janitor to reclaim legacy archives rather than
protecting them as a family's newest entry. The October 18 inventory held
three such archives totaling 183,330,575 bytes. This is reclaimable storage,
not proof of repository-wide headroom or a measured CI speedup. Reconsider
the layer and declare its family again only when the compiler correctness probe
passes and a consumer demonstrates useful reuse. The release callsite follows
the same bypass policy; no release runtime comparison is claimed.
Soldr 0.9.38 fixes source mtime truncation during archive replay (#1359).
Regenerated local `obs-util` full and base plus delta archives preserve the
exact nanosecond timestamp and report Fresh with the wrapper disabled. The
pinned setup action's cook keys include the Soldr version, so archives of an
older Soldr cannot match the new base key or delta restore prefixes.
The pinned setup-soldr action defaults to Soldr 0.9.52; the workflows name the
version explicitly. See the [probe and limits](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-20-soldr-source-mtime.md).
For opt-in Rust compiler-cache qualification, run
`uv run ci/cache_source_probe.py --directory build_ci_audit/source-probe --soldr /absolute/path/to/soldr --expected-version X.Y.Z --timeout 120`.
Use a new directory for each run. The probe records the selected executable,
requires an unchanged cache hit, then checks that a same-size/same-mtime
`compile_error!` fails through both the cache and an independent uncached
control. It disables porcelain output so diagnostics remain visible and keeps
partial logs and `safe: false` results on timeouts. A passing Rust probe alone
does not qualify the native GCC rapid-edit case required by #3437; keep the
compiler-cache bypass until every required freshness check passes.
Soldr 0.9.41+ keeps a **verdict ledger** (soldr#3894): a `clippy`,
`fmt --check`, `dylint` or doctest run whose exact inputs (git blob ids, or
content hashes for uncommitted files, plus toolchain, argv and environment)
already passed is replayed instead of re-run, narrowed per workspace member.
setup-soldr carries it between CI runs (`verdicts: auto`, the default): master
publishes, PRs restore. Every setup-soldr step in `build-project.yaml` sets
`verdict-scope: build-project`: the manifest scope otherwise hashes the
calling workflow (`push.yaml` on master, `ci.yml` on PRs), so PRs never found
master's verdicts (forge-ci/setup-soldr#604, `ci/test_verdict_scope.py`).
In CI the first master run with it (40159829966) published 8 verdicts under
scope `b88ba65d043f3f19`, the scope PR and merge-queue Fast Gate runs read.
It is content-keyed, so it does not depend on the
wrapper bypass above. `SOLDR_VERDICTS=off` forces a run; Build and Format set it for merge groups. The gate's source
probe sets it, because before forge-ci/soldr#3913 a scratch crate in an ignored
directory (`target/`) keyed on none of its files and replayed a stale pass.
The lint lane runs the Dylints through `soldr dylint` with soldr's managed
driver (`SOLDR_FORCE_MANAGED_CARGO_SUBCOMMANDS=1`) in `target-dylint/`, beside
the stable Clippy steps (#2293).
This does not solve the separate
restored-target fingerprint hazard documented in the cache audit. If a
build behaves impossibly, retry with that variable set before debugging the
code.
#### Linux C/C++ and PCH caching
Ubuntu app compiler snapshots restore only within the same runner, architecture,
Rust mode and build configuration. An observed opposite-mode fallback yielded
only 43 cached compilations out of 361 calls and accumulated 9,526 MiB, exceeding
the 8,192 MiB save guard and preventing an OFF seed. A missing compatible seed
starts cold; publication remains subject to the post-build size guard and
retention policy. This restriction does not establish that both modes fit the
current pooled nightly retention allowance.
The Ubuntu build, AppImage, sanitizers and Tier 2 use the standalone zccache
pinned in `rust/tools/linux-validate/install_zccache.py`, with SHA-256 checks
for both Linux architectures. Version 1.15.5 restores a byte-identical PCH
input header's recorded mtime before clang loads it; real content changes
remain subject to clang's validation. This fixes `#pragma once` redefinitions
after touches or checkouts without relaxing PCH validation.
The pinned soldr 0.9.54 embeds zccache 1.15.14, including the wrapper
selected by the optional `ENABLE_ZCCACHE` CMake module. Updating the standalone
installer alone does not update that embedded wrapper. Matching the versions
does not establish Rust compiler-cache correctness: the Rust wrapper bypass
above remains enabled.
Hosted Linux Tier 2 wraps its build in `ci/tier2_front_cache.py` (#4988).
A checksum-pinned ccache 4.14.3 binary provides a fresh, job-local 512M front
cache with `CCACHE_PREFIX=zccache`. This shares identical private-fixture C
compiles with different output paths while retaining zccache for misses. The
pinned zccache salts user depfile keys with output/target arguments; a local
24-output probe reported 24 cold calls versus 1 cold call and 23 front hits.
Both caches still validate headers and compiler flags. No sloppiness is enabled;
the front cache has its own empty configuration and is never uploaded. The
Dell's explicit empty launcher bypasses the helper. Rust caching, all test
assertions, sanitizer flags and OFF/ON suites retain their existing policy.
The expected hosted saving is an estimate until a completed job measures it.
#### Qt compiler snapshot publication
Qt compiler snapshots use `qt-ccache-linux-inputs-v2-` rather than a
new key for every commit. On the clean CI checkout, the digest includes staged
file identities except `docs/`, Markdown, `.github/`, `ci/`, and `ci.toml`;
the build workflow and `ci/linux_qt_frontend.py` are explicitly included again.
Thus CI policy/test metadata does not cause an upload, while workflow settings,
dependency installation and the Qt build commands remain publication inputs.
The digest also includes the runner image, pinned Qt/FFmpeg
archives, and installed C, C++, CMake, ccache and Ninja versions. An exact restore
skips the upload; changed inputs can restore the existing `qt-ccache-linux-`
fallback and publish a new snapshot on master. Older archives are not purged.
This is a publication identity, not a build or test attestation. Compilation
and Qt tests still run, and ccache validates current compiler inputs. Generated
commit-version objects can still miss after docs-only commits; avoiding another
~1.16 GB archive for those objects is intentional. It does not make deeper Rust
test archives safe or solve repository-wide retention by itself. Runtime
publication/reuse measurements remain required after deployment.
After the Qt build/tests, the runner's compiler cache evicts entries unused
since preparation began, with a one-minute margin, then applies its existing
650M size limit. The measured pruned warm working store is 508,489,050 bytes;
650M leaves over 25% working headroom, with a 750MB retention allowance in
`ci.toml` (ci-lint interprets MB as MiB). Hits refresh ccache entry timestamps, so current-build hits
and misses remain eligible for the next snapshot while stale objects can be
removed. Missing preparation timestamps skip age eviction. Before/after byte
counts are logged on PRs as well as master; remote uploads remain master-only.
These filesystem counts are not compressed archive sizes or proof of the next
consumer's hit rate. Required builds/tests always run and failed jobs do not
publish a cache.
#### Cross-compile check: Windows and macOS C from any host
`cmake/cross/` compiles libobs for another OS on this machine, with no Windows or macOS runner.
- **Toolchain:** soldr's LLVM and the SDK soldr provisions for that OS (the Apple SDK, or the xwin MSVC CRT + Windows SDK).
- **Dependencies:** the same prebuilt Windows/macOS dependencies the real build uses (pinned in `CMakePresets.json`, unpacked into `.deps/`).
- **Sources:** the same file lists as the real build (`libobs/cmake/sources.cmake`), including both the C build's ported files and the Rust build's C halves.
- **Output:** objects only by default; it compiles and links nothing. `-DOBS_CROSS_LINK=ON` adds a shared libobs (`obs.dll` / `obs.dylib`) per alias, from the same sources the shipped hybrid links (including the `libobs-rust` staticlib, `deps/libcaption` and the generated version/core-module objects), against the prebuilt `.deps` import libraries. It stays opt-in because the link needs those inputs and a working cross linker, which not every host has.
```sh
cmake -S cmake/cross -B build_cross_win-x64 -G Ninja -DOBS_CROSS_TARGET=win-x64
cmake --build build_cross_win-x64
# link a real libobs (DLL/dylib) for the alias:
cmake -S cmake/cross -B build_cross_win-x64 -DOBS_CROSS_LINK=ON
cmake --build build_cross_win-x64 --target libobs-cross-shared
# or from a configured OBS build:
cmake --build build --target cross-win-x64 # cross-mac-arm64, cross-mac-x64, cross-all
```
- **Only Docker on the host:** `uv run --script cmake/cross/docker.py mac-arm64 win-x64` runs the same check in a container (through `uv run --script ci/docker_task.py`).
- The checkout is a copy-on-write overlay at `/src`.
- Writable caches are named volumes the next run reattaches: `/build` per checkout; soldr's LLVM and SDKs and the prebuilt deps shared.
- `--clean` starts the build volume over.
- **Warnings** are reported; `-DOBS_CROSS_WERROR=ON` makes them errors.
The [dependency warning boundary](../BUILD.md#dependency-warning-boundary-decision-of-2026-11-06-2625)
exempts third-party headers through SYSTEM includes while keeping OBS headers
and source strict. `ci/test_cross_conversion_ratchet.py` enforces it in
`ci.yml`'s required `Format 🔍 / checks` job (`ci/ Self-Tests 🧪`), not in the
external `zackees/ci.yml` repository. No additional workflow step is needed.
- **Getting soldr:** `cmake/common/soldr.cmake` uses soldr from `PATH`, or downloads the version CI pins and checks its SHA256 (`ci/test_soldr_pin.py` keeps that pin equal to the workflows').
- **Finding the toolchain:** `cmake/common/soldr.cmake` asks soldr for it (`soldr cc --target --print-cc/--print-cxx/--print-linker/--print-sysroot/--print-ar/--print-rc`), so a soldr layout change no longer breaks the check (`ci/test_soldr_cross_toolchain.py`).
- **In PR CI:** the `Cross Compile 🧰` job in `build-project.yaml` runs it, compile-only, for the aliases `ci/ci_scope.py` selects (`cross_targets`).
It runs when a change touches a Windows or macOS file in libobs or a component the cross `CMakeLists.txt` names by `DIR`, or the check itself (`cmake/cross/`, `cmake/common/soldr.cmake`); full runs build both (#1294).
The frontend's Windows and macOS Qt groups are in it (#2408): the target's prebuilt Qt6 headers, with `ui_*.h` from the pinned Linux `uic`; moc is skipped, since nothing links.
- **No `win-arm64`:** `util/threading-windows.h` uses MSVC-only ARM64 intrinsics that clang lacks.
- **Cost, measured 2026-10-31:** a cold cross build *with* the link — a fresh build tree, `ZCCACHE_DISABLE=1`, including that alias's `libobs-rust` staticlib — took `win-x64` 32 s / 41 s, `mac-arm64` 117 s / 32 s and `mac-x64` 134 s / 26 s (two samples each, `-j 4` on a 16-thread host shared with other worker checkouts; the slower sample in each pair is the one that also rebuilt 14–18 workspace crates, and the rest of the spread is co-tenant load). The native `Build OBS-Studio-Rust` steps it stands in for are 12m25 (Windows x64), 8m01 (macOS arm64) and 7m50 (macOS x86_64) in release run 41007587429; signing and packaging stay native.
#### Tier 2 pre-queue links (#5189)
The Linux-hosted Tier 2 Link Check matrix links hybrid libobs and every
configured Rust-static cmocka executable independently for Windows MSVC x86_64 and Darwin arm64
when `LANES["cmocka_link"]` selects the
change. This includes libobs, its linked crates, obs-build registration/support,
cmocka, Cargo inputs and the check's own implementation. Unrelated changes keep
the eight Rust category links in the independent Windows Link Check. The same check runs on PRs and merge groups;
selected cmocka links also run on fully attested member PRs because existing
client proofs do not attest this CMake pass. Category-only work keeps its
existing admission policy.
```sh
uv run --no-project --with cmake==3.31.10 --with ninja==1.13.0 ci/cmocka_link_check.py
uv run --no-project --with cmake==3.31.10 --with ninja==1.13.0 ci/cmocka_link_check.py --alias mac-arm64
```
The root CMake cross-link mode includes the unchanged cmocka graph and deferred
support fragments. CMake's file-api discovers executable targets after host
conditions have been evaluated, including consumers without a `_rust` suffix.
Imported Corrosion archives are discovered through generated link arguments as
well as target dependencies; an empty Rust inventory fails. The check uses
`RelWithDebInfo`, matching native Tier 2. Windows static consumers retain the
core's headers and demand-linked real C support without its full DLL import
library. The check rejects that import/static mix even if LLD accepts a link
that native MSVC LINK would reject (#5246). The check builds
against real target cmocka and SDK libraries, never executes target programs,
and saves `link-targets.json` in its build tree. It always refreshes the Rust
archive through soldr so source-only edits cannot reuse the cross project's
manifest-only custom-command result. Ninja uses the process CPU budget, capped at
four workers. Each alias uses a fresh 512M ccache from the checksum-pinned
`ci/tier2_front_cache.py` installer to share identical support-file compiles
within that pass. No cache is uploaded, no relaxed policy is inherited, and
the cache never stores link results. The matrix disables fail-fast so one failing alias cannot
cancel the other. Both aliases are independently required by `ci/gate_jobs.py`,
including attested PRs; CI Gate waits for the entire reusable build workflow.
The jobs retain the 30-minute deadline and existing Linux heavy-pool routing.
The local `ci/windows_link_check.py` default still runs categories and both
cmocka aliases; CI sets `OBS_CMOCKA_LINK=false` only on the category job.
Pinned CMake 3.31.10/Ninja 1.13.0 uv wheels avoid apt setup on this path
(#5224). CMake 3.31 uses clang-cl `/showIncludes`; CMake 4.3
forwards dependency flags that the pinned ccache rejects as uncacheable.
Darwin uses the production hidden-symbol list and the Rust crate's existing SDK
framework imports. Library discovery stays in the Apple SDK and target deps;
host Linux libraries cannot satisfy Darwin probes. A successful link does not
prove runtime recording/allocator behavior or every binding/order error whose
final link succeeds.
Earlier Release measurements before #5246's complete inventory and static-only
Windows support (four Ninja jobs on a shared Linux worker, 2026-11-19):
| Target | Fresh CMake/Corrosion tree | Warm tree |
|---|---:|---:|
| Windows MSVC x86_64 | 367.80 s | 82.49 s |
| Darwin arm64 | 418.54 s | 73.69 s |
SDKs, prebuilt target dependencies and the Cargo registry were already installed;
these are build-tree cold timings, excluding first-host downloads. The original
eight Windows category binaries also linked (128.53 s with partial Cargo reuse).
These local timings are not a hosted critical-path guarantee.
Standalone Rust-static support is selected for every consumer, including tests
that also link shared libobs or inherit Rust through an interface target.
`test/cmocka/build/rust-static-support.json` owns the real private adapter members
for both CMake and Cargo-native fixtures. Linux resolves Rust and support as a
rescan group so newly selected members can call back in either direction.
Fixture-owned adapters keep their compile definitions and take precedence over
the shared fallback members.
Add new shared adapters there as separate
lazy archive members; fixture-owned definitions retain precedence. CMake inherits
the native owner (`libobs-objects`) link interface rather than maintaining host
libraries per test. Cargo's production Rust-archive dependency carries its native
package interface. Both paths put Rust before MSVC import providers so allocator
and parser symbols are selected consistently; ELF/Darwin retain the fixture's
declared DSO binding order. Link checks prove linking only;
native runtime checks still own recording callbacks and allocator behavior.
#### macOS Rust execution artifacts (#5008)
The maintainer chose **STRICT** on 2026-11-17: nothing compiles on hosted
macOS runners. The Rust-test producer runs on Linux with soldr's LLVM and Apple
SDK targeting `aarch64-apple-darwin`; macOS loads and runs its artifacts. This
also applies to obs-build's native-build and Qt integration contracts. Compiler
discovery assertions apply to the Linux-hosted cross toolchain targeting Darwin;
their load and execution assertions still run on macOS. Keep every assertion,
including profile switches, source/flag mutations and unity/PCH rebuild decisions.
The Rust-test bundle is prepared by `ci/macos_test_artifact.py`:
```sh
uv run --no-project ci/macos_test_artifact.py build --output build_macos_tests
# PR selection, identical to local_gate.test_diff's affected-crate selection:
uv run --no-project ci/macos_test_artifact.py build --output build_macos_tests --base BASE
# Extract the complete bundle into the consumer checkout root first:
uv run --no-project ci/macos_test_artifact.py run --manifest manifest.json
```
The producer links the category tests and helpers with `soldr cargo test
--no-run`, verifies arm64 Mach-O executable headers and every ad-hoc SHA256
CodeDirectory page, and retains build-script output. It then compiles the same
selected crates' doctests with `soldr cargo test --doc --target
aarch64-apple-darwin`. Stable rustdoc `--test-runtool` copies each temporary
executable before cleanup. The SDK-aware linker comes from `soldr cc --target
aarch64-apple-darwin --print-linker`: Cargo's target rustflags alone do not
configure rustdoc's test linker. No nightly flags or `RUSTC_BOOTSTRAP` are needed.
The producer disables verdict replay so a previous doctest verdict cannot hide
missing runtime artifacts.
Rustdoc checks `compile_fail` and `no_run` cases on Linux. The retained 2024
merged harness checks runnable cases, including `should_panic`, on macOS. A
standalone `should_panic` case that rustdoc cannot merge fails preparation rather
than silently passing without execution. The manifest marks doctests complete
only after the entire compilation command succeeds. A producer success proves
compilation and compile-fail assertions; execution is proven only by the consumer.
Build and execution require **the same absolute, real checkout root**, including
the target directory. `ci/macos_test_workspace.py place` moves both real checkouts
to `/opt/obs-ci--/src` before setup or execution, leaving the
original Actions workspace as an alias. `/opt` resolves identically on both hosts;
Darwin's `/tmp` resolves through `/private/tmp`. Placement supports separate runner
mounts and rejects a symlinked destination parent. The always-run restore step
returns the checkout before action post steps, retaining caches without leaving
large relocated trees on the Dell. Rust embeds `CARGO_MANIFEST_DIR` and `CARGO_BIN_EXE_*`;
changing environment variables after compilation cannot relocate them. The runner
rejects a mismatched root. The manifest retains package cwd, Cargo package/build
environment, test arguments and helper permissions, and hashes all transported
files. Missing artifacts, corrupt files, incomplete doctests and failed test
exits fail the consumer. Preparation requires an empty output directory.
The native-fixture slice adds `ci/macos_native_fixtures.py`. The producer calls
it whenever the Application category is selected; it uses that category's existing
Linux executable to prepare 17 Darwin fixture contracts. It covers profile and
assertion switches, shared-core/plugin dependencies, static archives and executable
links, explicit groups, independent C/C++ flags, Objective-C/Objective-C++ ARC and
manual groups, all unity/PCH combinations, transitive headers, source/flag changes,
Swift bridge/modules/headers and the independent CMake graph consumers. The
Windows resource/MSVC contracts and Linux-only runtime modules keep their existing
platform gates. Configuration-only fixtures use `project(... NONE)` or explicitly
disable compiler probing; they still run on macOS. Qt integration contracts use
the preparation helper below.
Independent native fixtures use a thread pool on the Linux producer, with at most
two workers by default (one on a single-CPU host). Set
`OBS_NATIVE_FIXTURE_WORKERS` to a positive integer to override this budget; it is
capped by `os.cpu_count()` and the fixture count. Use `1` for serial measurements.
Each fixture's ordered rebuild/mutation sequence stays in one subprocess. The
first observed failure reports that fixture's captured output, cancels pending
work and prevents a completed index; already running fixtures finish before exit.
The test inventory retains its existing order and signed-image paths are sorted
in fixture order, then by path, regardless of worker completion order.
For serial/parallel comparisons, reuse the same absolute bundle/work paths.
Existing toolchain nondeterminism affects snapshot blobs for `prefix.pch`
(serialized header metadata/order), `CMakeDetermineCompilerABI_C.bin` and
`CMakeDetermineCompilerABI_CXX.bin` (random `cmTC_*` probe names),
`CMakeConfigureLog.yaml` (random probe paths), `.ninja_deps`, `.ninja_log` and
`LastTest.log` (timestamps/timings), and `NativeSwiftFixture.swiftmodule`,
`NativeSwiftFixture.swiftsourceinfo` and `libfixture-swift.dylib` (temporary
Swift/PCH paths and derived debug data/UUID/signature). Those files' snapshot
`file`/`sha256` fields and corresponding `index.json` signed-image references
may differ. Compiler-command stdout also records CMake's elapsed configure time.
Normalize only these fields when comparing evidence; retain requests, inputs,
recipes, rebuild decisions, event order, destinations and all other file hashes.
Transport and replay always verify the original hashes and signatures, without
normalization.
Preparation discovers soldr's Darwin C/C++ drivers, archiver, LLVM linker and Apple
SDK on Linux. Swift uses an explicit `SWIFTC` override or the SHA256-pinned Linux
Swift 6.1.2 distribution, with soldr's LLVM tools for linking. Its Darwin bridge
still uses the same Apple SDK. A private tools directory also supplies `dsymutil`,
which Swift needs for debug builds and soldr's primary LLVM bundle omits. It uses
`DSYMUTIL`, an existing LLVM/host tool, or the checksum-pinned dsymutil from soldr's
LLVM-tools 20.1.7 payload. The fallback reuses soldr's verified installed tool or
downloads the pinned 474,401,547-byte archive and extracts only dsymutil; this is
producer setup cost, not consumer payload. Python 3.14 supplies zstd extraction.
Missing tools or invalid checksums fail preparation; no Swift assertion is skipped.
The dsymutil fallback persists under
`$RUNNER_TOOL_CACHE/obs-darwin-dsymutil/` (locally,
`target/macos-native-toolchains/obs-darwin-dsymutil/`).
Both archive and executable checksums must pass before atomic publication;
every reuse verifies the executable again. The archive is discarded, and
interrupted extraction cannot expose a cache hit. Separate log timings cover
the soldr driver/SDK queries, Swift version probe and dsymutil provisioning,
including its download, to distinguish network/setup cost from compilation.
The pinned Swift installation is reused across clean checkouts under
`$RUNNER_TOOL_CACHE/obs-darwin-swift/` when Actions supplies its
tool cache; local runs fall back to `target/macos-native-toolchains/` with the
same content key. Download and extraction happen in a private staging directory;
only a checksum-verified extraction containing the compiler is atomically
published. Interrupted installs cannot become cache hits. The archive is discarded
after installation. This caches only the immutable compiler distribution: every
fixture, mutation and snapshot is still prepared on every run. Logs distinguish
Swift installation/cache hits and time toolchain preparation, the host Application
category build, and fixture contracts with snapshots separately.
Compiler-discovery assertions therefore describe
the Linux-hosted Darwin toolchain. Every successful test writes a completed
manifest with `BUILD_HOST` (Linux), `BUILD_TARGET` (`aarch64-apple-darwin`), the
compiler recipes, input hashes, target-specific rebuild decisions, checksummed
snapshots of every intermediate variant and deferred runtime expectations.
Snapshot blobs are deduplicated by SHA256. A failed preparation never writes a
completed manifest or bundle index.
`OBS_NATIVE_FIXTURES` selects replay. The same test bodies assert the recorded
compiler results, restore the corresponding variant and really load or execute it
on macOS, including fresh-process loader probes and CTest's environment/working
directory checks. They reject missing/corrupt files, changed recipes, incompatible
host/target evidence and unconsumed events. Only compiler commands are replayed;
load/run assertions remain pending until the consumer succeeds. With neither
fixture environment variable set, local and Linux tests retain their native
compilation path. `OBS_NATIVE_FIXTURES_PREPARE` is the producer-only counterpart;
do not set both variables. Native manifests and signed arm64 dylibs, bundles and
executables are included in slice (a)'s final checksummed bundle.
`rust-tests-macos-build` in the existing build workflow prepares the full bundle
on Linux. It uses the existing per-job `mq-heavy-labels` routing with
`ubuntu-26.04` fallback. Both hosted and Dell producers upload the same gzip
archive and SHA256 sidecar; the job outputs its immutable artifact ID and real
checkout parent, so a macOS-only rerun retains the producer's original attempt; neither uses local runner handoff. The archive keeps
hidden build-script files and permissions. The consumer verifies the archive
before extracting, then verifies all manifest file checksums before any test.
PRs retain `rust_scope.affected` selection through `--base`; merge groups and
nondeferred events build the workspace. Qt preparation and `--require-qt` replay
share the existing `qt_sdk` scope. A missing Qt payload fails before execution.
The existing `Rust Tests 🦀 (macos-26)` check needs a successful producer and only
runs the bundle. Its setup consists of checkout for source/fixture assertions
and uv's prebuilt Python 3.14 for verification/helpers. CMake and CTest from the
runner image configure language-free projects and run existing tests. There is
no soldr setup, dependency cook, Qt SDK installation, compiler discovery or
compilation on this consumer. The published-SDK resolver and the four original
Qt graph/CMake contracts run on Linux against the Darwin SDK, recording their
target executions for macOS. Analysis outside #4999's queue replacement runs on
the Linux producer against the Darwin target. CI Gate requires the selected
producer and the unchanged macOS check; failed/missing/corrupt artifacts or failed
entries cannot satisfy it. Graph self-tests enforce these dependencies and the
absence of compile steps. Tier 2 macOS remains separate work in #5009.
The supplied hosted baseline spent 288–294 seconds compiling/linking Rust tests
and 42–61 seconds setting up soldr: **5.5–5.9 macOS minutes avoided per selected
job before transport overhead**, without double-counting #4999's analysis saving.
This excludes unmeasured native-fixture/Qt compilation savings. The 2026-11-17
integration run on shared Linux took 520.71 seconds for Rust/doctests/native
fixtures and 154.95 seconds for Qt preparation, **11.26 Linux minutes total**
before archive/upload/setup overhead. That run used existing caches but rebuilt
changed test harnesses and downloaded Qt SDKs; earlier slice timings (8.66 seconds
for warm Rust/doctests and 58.59 seconds for warm Qt contracts) describe different
cache states. These are local costs, not a hosted speedup or critical-path claim.
Only this PR's CI can prove the real common-root handoff, hosted macOS execution,
runner-image dependencies and net runner time on hosted and Dell routes.
The Qt infrastructure slice adds `ci/macos_qt_artifact.py`: matching published
Darwin Qt libraries and Linux moc/uic/rcc tools, both original native/CMake
contract consumers, signed arm64 output, and runtime entries in the same bundle.
See [the Qt contract inventory and producer command](ci-macos-qt-artifacts.md).
Preparation success leaves runtime pending; macOS must execute those entries.
### setup-soldr: soldr in GitHub Actions
[zackees/setup-soldr](https://github.com/zackees/setup-soldr) is the action
the workflows use to install soldr, the pinned toolchain and its caches. Its
cache layers:
- the toolchain;
- the cargo registry;
- a "cook" layer of prebuilt dependencies, keyed on `Cargo.lock`, the rustc
release and the soldr version;
- the zccache compiler cache, which lets a branch reuse its parent's artifacts.
Remote caches are saved only when the run ref is `refs/heads/master`,
including master pushes and nightly/manual runs on master. PRs, merge groups
and feature-branch release verification restore but do not save. Every
setup-soldr call sets `save-cache-remote` explicitly: its upstream `auto`
default excludes PRs but still permits queue and feature-branch uploads.
Local act/act2 cache saves stay enabled. A PR's first build depends on
master's cache being warm.
What to do: keep the pinned action SHA and the `version:` input in
`.github/workflows/build-project.yaml` in step with your local soldr and
`rust-toolchain.toml`. Change them together, in one PR.
### bosn: Docker under supervision
[zackees/bosn](https://github.com/zackees/bosn) is a machine-wide daemon that
owns Docker on a shared host. It keeps a registry of containers, volumes and
leases, runs jobs in a bounded pool of runner slots (each capped in CPU), and
tears down what a job leaves behind. It exists so that many agents on one
machine don't each start unbounded Docker work.
What to do:
- `bosn jobs` to see what is running before starting heavy work.
- `bosn ci run --workflow --job --trigger pr --wait`, then
`bosn ci report `, to run a CI job locally (through act2, below) instead
of on GitHub.
- `bosn ci doctor` when the local runner looks unhealthy.
What not to do:
- `docker system prune`. It destroys everyone's warm caches.
- Install bosn unasked, or add stacks to `bosn.toml` without a reason. It's
manifest-driven, and the machine owner decides what runs.
The repo's `bosn.toml` declares the AppImage stack `appimage-228`, the
glibc 2.28 image (`build-aux/appimage/manylinux/Dockerfile`) the workflow
builds on.
`bosn run --task appimage` builds the AppImage locally on the 2.28 image by
running `build-aux/appimage/build.py`, the same script the AppImage workflow
calls, with no act and no GitHub involved. The source is bind-mounted, the zccache
and cargo caches live in bosn volumes, and the AppImage lands in
`build_appimage/` (#899). (`bosn ci run` can't run that job through act: its
`ubuntu-26.04` label isn't supported there.)
Tier 2 Linux in CI builds once in `rust-linux-tier2-build`, using the pinned
stock Ubuntu job container and full `apt-packages.txt` development inputs.
It transfers both implementations' compiled tree and an exact runtime-package
manifest. `rust-linux-tier2` runs one complete suite per OFF/ON matrix mode,
with no shards. Its host invokes `rust/tools/linux-validate/ci-runtime.py`:
the helper downloads and verifies the immutable prepared runtime pinned in
`prepared-runtime.json`, then runs `validate.sh` in a four-CPU container with
the original source/build paths and writable CTest timing history. Source is
read-only. Each suite retains eight CTest workers and existing serial isolation.
A changed package closure or unavailable release asset selects installation
in the same pinned stock base. Archive size/checksum, image identity or inventory
errors fail the job. The existing apt cache remains available for fallback;
test jobs never publish it. Runtime assets use the existing public
`obs-rust/obs-studio-libs` release/catalogue route without additional CI
credentials. Producer and cold-transfer measurements are recorded in
[the speed report](ci-speed-2026-10-22.md#fresh-prepared-runtime-experiment-and-production-candidate-1717).
The intended local equivalent is bosn running the job through act2:
```sh
bosn ci run --workflow build-project.yaml --job rust-linux-tier2 --trigger pr --wait
```
It does not run yet: bosn accepts only the `ubuntu-latest`, `-24.04` and
`-22.04` labels (zackees/bosn#642), so it marks the
job's `check-event` and `ci-mode` dependencies unsupported and skips Tier 2
("some jobs need runners bosn cannot supervise"). Until it does, use
`./unittest` (the Docker lane below) locally.
The local gate's Tier 2 lane (`./unittest`) uses
`rust/tools/linux-validate/run.py` and `ci/docker_task.py` (through
`uv run --script`), the current stand-in
for zackees/bosn#666. It has per-checkout build volumes and container ownership,
shared compiler/crate caches, and explicit storage budgets. Run local Docker
work through bosn as described below; the prepared CI consumer does not change
the local build harness or its development-package inputs.
### act2: GitHub Actions, locally
[zackees/act2](https://github.com/zackees/act2) is a fork of nektos/act that
runs workflow jobs on your own machine, with fixes for soldr's and
setup-soldr's caching. bosn drives it; you don't call it directly. Use it, via
`bosn ci run`, when you need to know whether a real workflow job passes:
don't push a commit just to find out. A cold run is slow (tens of minutes),
so it's an on-demand check, not part of every push. Remote-only jobs (for
example macOS) are reported as such, not faked.
### zackees/ci.yml: the CI policy and its checker
[zackees/ci.yml](https://github.com/zackees/ci.yml) is the set of rules this
repo's CI follows, plus `ci-lint`, its checker and local-gate runner. The core
ideas:
- **Two cycles.** The dev cycle (every PR and push) runs a quick, mostly-Linux
gate. The release gate (nightly and on release) runs everything: every
platform, full app builds, Flatpak, packaging. Expensive jobs live in the
release gate.
- **Local first.** The quick remote gate must be something you can run locally
with one command, so a green local run predicts a green PR.
- **Attest instead of repeat.** A local run stamps the commit; CI trusts the
stamp and skips what it already proved (below).
Always use the pinned version from [AGENTS.md](../AGENTS.md):
```
uvx --from git+https://github.com/zackees/ci.yml@a1917ce76598904ce515cd7eec83450c317ea6f2 ci-lint local-gate run
```
### ci.toml and local-gate.toml: what runs for which change
In ci.yml, `ci.toml` (schema 3) declares a repo's platforms, test suites and
the paths that select them, so a change only triggers the tests it can affect.
**This repo has no `ci.toml`.** It uses two pieces that do the same job:
- **`local-gate.toml`** declares the local lanes and what they attest:
- `lint`: formatters, clippy, dylints, the `ci/` Python tests;
- `rust-test`: Rust Tiers 1-3;
- `cross`: clippy, dylint, and a link of every test binary
(`test --no-run`) for the Windows and macOS targets, cross-compiled from
Linux with soldr;
- `tier2-linux`: the cmocka suite against libobs and libobs-c-reference, in
Docker. It declares `group = "docker"`, its own heavy chain, so it runs
beside the host lanes instead of after them (#2769); the gate's wall time
is the longer chain, not the sum.
- `macos-native` / `windows-native`: what the macOS and Windows Rust test
and Tier 2 jobs run (tests, clippy, formatting, then the host's Tier 2
validation, `rust/tools/tier2-validate/validate.sh|ps1`). Each is
`optional` and exits 75 (`EX_TEMPFAIL`) on any other host, which `ci-lint`
reports as "not applicable on this host": a Linux gate passes without
attesting them, and only a Mac or Windows host can. Windows needs
`vcpkg install cmocka:x64-windows` and `CMOCKA_PREFIX` (or
`VCPKG_INSTALLATION_ROOT`), macOS needs `brew install cmocka`.
- **`ci/ci_scope.py`** maps changed paths to jobs, by path alone (#897). The
Fast Gate always runs; Linux Tier 2 runs for the paths in its `LANES` row
(table below). A changed file that belongs to a platform
(`ci/platform_paths.py`: path tokens such as `win-capture/`,
`platform-osx.mm`, `rust/*/src/platform/windows/`, or extensions such as
`.m`, `.rc`) starts that platform's Rust tests and Tier 2. POSIX/Unix files
(`*-posix.c`, `unix/`, and `libobs/util/platform-nix.c`) belong to Linux
and macOS, so changing one starts macOS too. Core files carry no platform
defines or OS headers (`ci/platform_ifdef_ratchet.py` enforces it, and
fails a platform file that names another OS), so a core PR runs on
Linux and Windows (#3637 step 2); file contents are never read. Windows runs
the existing native Rust tests and Tier 2, including both C reference and
hybrid libobs. macOS core PR coverage remains a separate rollout. A module
whose name doesn't say its OSes
(`coreaudio-encoder`, `obs-text`, ...) is listed in `ci/platform_paths.py`
with its `PLATFORMS` from `plugins/CMakeLists.txt`; upstream paths are
never renamed for this (#1051). `libobs/cmake/os-.cmake` starts only
its OS. Shared and so every platform:
`.github/`, `cmake/common/`, `cmake/finders/`, the rest of `libobs/cmake/`, the root
CMake files, crate-root `rust//build.rs`, `platform/mod.rs`,
`test/cmocka/CMakeLists.txt` and the C++
cmocka tests with their `tests.d` registrations (#610). A master push adds the lanes a PR
defers (Linux Tier 2, Qt, the workspace tests) and runs macOS/Windows
Rust tests and Tier 2 for paths that select them **and for core code**
(`libobs/`, `rust/`, Cargo files). This retains coverage for native core
regressions (#2916, #2910). Merge groups execute selected heavy checks on the cumulative diff
from the target branch's merge-base to the event head,
including both native Rust/Tier 2 hosts for core/shared changes, selected
platform paths, Linux Tier 2 OFF/ON, Qt and C/C++ cross work. Every non-docs
group also runs Windows MSVC test linking and all-six-target clippy/Dylint:
host, the two linked cross targets and three lint-only targets. Native app
builds remain on nightly/manual/release events.
CI Gate resolves the queue's full scope directly from the merge-group
event's target-branch merge-base/head git diff, independently of reusable-workflow outputs.
Missing event fields, unavailable commits and failed scope selection fail
closed with named diagnostics. Cancelled jobs with no assigned runner and
no steps are reported as runner-capacity conditions and still fail the gate;
they are never converted to success. The existing AI rebase maintenance
workflow runs `ci/mq_acquire_retry.py` in a separate `capacity-recovery` job
on completed **Pull** `workflow_run` failures/cancellations, plus master push,
dispatch and the :17/:47 schedule as a three-hour backstop. Recovery does not
wait behind conflict resolution. It uses only default-branch code and API
evidence, never the triggering head or its artifacts. Each event also scans
recent completions, covering bursts where GitHub replaces a pending recovery
job; the schedule remains the backstop for delayed or missing events.
A PR run gets **one failed-jobs rerun** (attempt 1 only). A capacity-failed
group that is still present at the exact tested SHA also gets one failed-jobs
rerun, with fresh membership/PR-head checks. GitHub may mark that entry
`UNMERGEABLE` even though the PR has no conflict: capacity classification uses
exact annotations and CI Gate diagnostics, never that queue state. Run
44351072142 (#5111, cancelled macOS job 134968894019, gate 134992644660) is
the recorded example; it stayed queued until a manual removal/re-addition.
A real PR conflict still blocks recovery. An ejected merge
group gets a **fresh queue execution**, not a rerun of its departed synthetic
head: the tool checks the latest removal belongs to that exact group, proves
prior queue intent and an unchanged PR head, refuses conflicts, manual
removals/disarms, holds and new queue transitions, and re-arms with
`--match-head-commit`. A comment reserves one automatic retry per PR head
before enqueueing; it shares the older ejection handler's retry marker.
Each recovery still requires every selected job and CI Gate to pass.
Both paths require exact hosted acquisition annotations and CI Gate capacity
diagnostics for every unsuccessful job. Missing/unknown/incomplete evidence,
independent gate failures and real test failures never authorize recovery.
`github.token` (`actions: write`, `checks: read`, `contents: read`) suffices
for PR and still-live group reruns. Re-arming ejected groups requires the
token minted each run from the **obs-rust-ai-rebase** GitHub App
(`vars.AI_REBASE_APP_ID`, `secrets.AI_REBASE_APP_PRIVATE_KEY`): enqueues
with GITHUB_TOKEN do not trigger merge-group workflows. Without the App, PR
and still-live group reruns still work; ejected-group re-arming emits a
warning and leaves the PR alone. (Until 2026-11-22 this was a stored
`AI_REBASE_TOKEN` secret, which was saved blank, so nothing was re-armed.)
The older `ci/ai_rebase.py --requeue-ejected` remains a scheduled/push/dispatch
backstop for broader proven infrastructure failures, now also guarded by
the ai-rebase App. It inspects recent latest removals (three hours), binds the
PR head via its timeline, classifies all associated workflow failures, and
spends one per-head comment marker before re-arming. It skips armed, active,
held or conflicting PRs. Runnerless cancellations are reserved exclusively
for the strict capacity tool; the broader handler cannot bypass its refusal.
Its broader policy does not run on `workflow_run`.
The old capacity tool only scanned live queue heads at :17/:47/master pushes:
once CI Gate ejected a group it was invisible, and PR runs were never scanned
(#5115; merge-group runs 44306825758, 44318842478, 44323352759, 44329655339,
44341056238; PR run 44318137015). A running CI workflow cannot rerun itself;
external completed-run recovery keeps CI Gate's fail-closed behavior intact.
Scope-policy edits (`ci/ci_scope.py`) also select Windows on PRs to exercise
the routing on hosted CI. A failed or runnerless selected Windows job still
blocks that PR. Selected queue jobs must also execute successfully; missing,
skipped or unfinished expected matrix legs fail the gate. No required check
is exempted and native master coverage remains in place.
Evidence and the tradeoff are recorded in
[the queue decision](ci-merge-group-scope.md).
A master push builds no OBS app. Every platform and every app build runs on schedule,
workflow_dispatch, tags, release branches and in the release gate; no PR
path selects the full builds.
Packaging and submodule moves are still compiled on Linux (touched targets)
on the PR. `.github/` edits start no platform job.
### Path to lane table (fast gate)
A trusted complete ordinary member PR allocates Event Data, CI Mode and
CI Gate for compile/test admission. Independent governance/pre-work retains its
own event policy. Format, Swift, Validate Data and compile/test jobs skip before
runner allocation when their selected contract is satisfied. Fallback PRs run
Format/self-tests, Fast Gate and selected native/link/Qt/Tier 2 work. Every
non-docs fallback also runs all-six-target clippy/Dylint, including the three
extra lint-only targets. Fast Gate still compiles touched Linux targets on
fallback PRs; the complete member path defers those builds to the queue and
never claims a lint stamp proves a native target build.
`LANES` in `ci/ci_scope.py` selects the rest by path:
| Paths | Lane |
|---|---|
| everything | Fast Gate: 1) fmt, clippy, Dylint; 2) unit tests of the touched crates; 3) Linux build of touched `plugins/`/`shared/` targets (ENABLE_FRONTEND=OFF, no Qt) |
| `libobs/` (not platform-only files), crates linked into libobs, `test/cmocka/`, `deps/`, `rust/tools/linux-validate/`, Cargo files | Tier 2 Linux: compilation overlaps Fast Gate; OFF/ON tests wait for the Tier 2 build, with one complete suite per mode |
| core (`libobs/`, `rust/`, Cargo files), `ci/ci_scope.py` | Windows Rust tests and Tier 2 on PRs; both native platforms on master pushes and merge groups |
| `frontend/`, Qt-linked tests, `shared/qt`, the Qt job's own files | Qt Frontend Linux (the only Qt). Frontend platform files start no Windows/macOS Rust or Tier 2 job; Windows/macOS Qt lanes are a follow-up |
| files matching `/platform[/-](windows, macos, linux, posix)[/.]` (posix = linux+macos), legacy OS names, shared build files (`cmake/common`, `cmake/finders`, `libobs/cmake`, root CMake, crate-root `build.rs`, `platform/mod.rs`, C++ cmocka tests) | macOS / Windows Rust tests, Tier 2, cross lint |
| `build-aux/`, `.gitmodules`, submodules | compiled on Linux only; no full build from a PR |
| `docs/`, `.github/`, `ci/` | lint and the ci/ self-tests |
No path selects a sanitizer lane. ASan (and TSan, valgrind) run only in
`sanitizers.yaml` on its nightly schedule and on `workflow_dispatch`, never on a
pull request or in the merge queue (maintainer directive 2026-11-09; the
ratchet-PR `Sanitize 🧪` job of #2923 is gone). A diagnostic only asan reports
now surfaces in the nightly run; dispatch `sanitizers.yaml -f tools=asan` on a
separate ref to check a risky PR first.
The macOS, Windows and cross jobs wait for Fast Gate. Qt starts on an
independent runner after successful scope detection; its compilation and tests
can overlap Fast Gate (#1581). Tier 2 Linux compilation also overlaps on an
independent runner after scope/proof checks. OFF/ON execution requires a
successful Tier 2 build and a non-canceled workflow; it can overlap remaining
Fast Gate work. A failed or skipped build starts neither suite. Fast Gate
remains independently required by the final gate, so its failure prevents
merging even if both suites pass. This trades possible wasted compilation,
Tier 2 and Qt tests on a red PR for a shorter successful queue path;
independent work can finish after Fast Gate fails.
Measure runner cost and actual gate time rather than treating the theoretical
overlap as a proven speedup (#930, #1286).
Tier 2 uses one complete suite per mode on PRs and merge groups, each in its
own runner environment: two test jobs rather than six. Queue groups always use
these two complete suites, including when a caller requests full coverage.
Main pushes, nightly and release runs retain the suite plus two serial partitions
per backend.
The [runner-capacity measurement](ci-tier2-queue-capacity.md) explains the
earlier tradeoff: fewer allocations while retaining every test in that lane.
Deinterlacing retains
`RUN_SERIAL` because CI still dropped fields with bounded software-renderer
workers. The other nine former barriers
are removed: eight tests already own their resources, and XSHM now uses a
private Xvfb (serial fallback when unavailable). Linux tests pin
`LP_NUM_THREADS=1`; see the [concurrency audit](ci-serial-audit-2026-10-21.md).
The build job produces one tree for both backends. PR/queue test jobs run the
entire CTest registry without a shard selector, with up to eight binaries
concurrent within each suite; CTest honors `RUN_SERIAL`. Background partitions
together cover that same registry. A failed or canceled backend cannot publish a passing lane
proof. Timings have unique per-mode artifacts and merge on master; recorded
costs still order the longest tests first. Optional local sharding tools remain
available, including their complete-partition checks.
The change removes two repeated runner setups and artifact downloads. A full
suite can take longer than an individual shard, so fewer jobs alone do not
prove a shorter CI gate. Compare actual gate time, queue delay, coverage and
runner cost in the broader #1581 study before claiming a workflow speedup.
Unchanged lanes are cached by the gate, so a re-run after a small fix is fast.
Queue formatting starts after runner selection, alongside the Build reusable
workflow, rather than waiting for every heavy lane to finish (#4983). Queue
checks accept no client skips. Swift selection uses the whole group's diff
from its target-branch merge-base, including earlier entries; scope errors fail
the formatting job. The mutually exclusive PR call still waits for Build's
immutable-base admission outputs, preserving skips before runner allocation.
Both calls retain the executed `Format 🔍 / checks` and Swift check names,
and CI Gate waits for formatting as well as every selected build lane.
The measured baseline added 103–286 seconds of formatting execution after
heavy work in successful queue samples. Overlap can remove that tail, subject
to runner contention; hosted after-change timing remains to be measured.
### Lane proofs: historical diagnostics
Hosted input-key lane proofs and old `Local-Gate:` trailers remain readable
historical diagnostics. Neither suppresses real selected PR fallback or queue
execution. Publication jobs allocate only when an executed lane supplies a
nonempty new proof name; an attested skip cannot publish a fresh execution pass.
Compiler and dependency caches remain enabled. Command verdict replay is off on
PR and queue events so fallback analysis actually executes.
### CI attestation: skipping what's already proven
`./push` resolves the CI-pinned soldr wheel through `uv run --no-project --no-build --with soldr==`
(cached by uv), using `cmake/common/soldr.cmake`'s version, which self-tests keep equal
to every setup-soldr workflow input. Its directory leads PATH only during attestation;
your installed tools stay unchanged. Proof commands clear inherited `SOLDR_*`,
`RUSTUP_TOOLCHAIN`, Rust executable/wrapper selectors and their `CARGO_BUILD_*` equivalents,
so the repository toolchain and lane settings apply. To use an already installed copy,
set `PUSH_SOLDR=/absolute/path/to/soldr` (or `soldr.exe`); it must report the exact CI version.
Bootstrap/version failures use ordinary PR CI, or refuse with `PUSH_REQUIRE_ATTESTATION=1`.
CI Mode extracts `ci/pr_attestation.py` from the immutable PR BASE and runs it
through uv in isolation from head code. That executable loads its prooft source
pin, gate declarations and freshness/input policy from the same base git objects.
The untrusted head commit/tree/message is data. Workflow-call outputs carry that
one decision to Format/Swift and Validate Data before runners allocate. Event
Data selects Swift from immutable base/head names, so a skipped Format checks
job cannot hide Swift work. CI Gate independently reruns the base verifier and
requires every expected fallback job to have executed successfully. Missing CI
Mode or unexpectedly skipped/missing/cancelled/runnerless work fails admission.
The fast path requires a same-repository PR whose author AND authenticated
final HEAD signer are active obs-rust org members. GitHub must report that exact
commit signature valid. Authenticated public-membership checks require no extra organization permissions
for public resources ([GitHub API contract](https://docs.github.com/en/rest/orgs/members#check-public-organization-membership-for-a-user));
private membership uses the authenticated active-state endpoint when permitted; denial, unknown identities, API errors or verifier
errors mean real selected PR checks, without expanding token permissions.
`author_association` and collaborator write access are insufficient.
Evidence is self-reported, not signed execution proof: a trusted member can lie
about running a command. prooft checks freshness (24 hours), tree/parents or
base-declared input keys, provenance and each gate. Stamping amends the message:
**stamp first, then sign the final commit**. An old signature is never credit for
the amended object. Rebase, content edits, stale/wrong-tree/malformed records,
missing gates and edits to trust surfaces (`push`, `ci/**`, `.github/**`,
`local-gate.toml`, `ci-attestations.yml`, manifests/toolchain/config) run real CI.
Legacy-only and partial legacy evidence never earns complete admission.
Trust-surface rejection and the admission fallback scope selector use the same
merge-base-relative PR path set (`git diff BASE...HEAD`, with renames disabled).
Changes made only on master after the branch point, including changes brought
into the PR by merging master, are not attributed to the PR. The PR's own trust
edits still force fallback. Missing merge bases (including shallow or unrelated
history) and diff errors run real checks; an unknown scope selects every
admission check. This changes only path attribution: policy and verifier pins
still come from the exact immutable BASE, and evidence still binds HEAD. The
merge queue always builds and tests the actual combined result with its selected
heavy lanes, so interactions with newer master changes remain covered there.
The complete client contract includes full self-tests, Flatpak and Qt XML
validators, general lint, Linux x64 host unit/differential tests, and clippy AND
Dylint for exactly these targets (all through soldr):
- Linux x64: `x86_64-unknown-linux-gnu`
- Linux arm64: `aarch64-unknown-linux-gnu`
- Windows x64 MSVC: `x86_64-pc-windows-msvc`
- Windows arm64 MSVC: `aarch64-pc-windows-msvc`
- macOS x64: `x86_64-apple-darwin`
- macOS arm64: `aarch64-apple-darwin`
Swift formatting and compatibility/services JSON gates are additionally required
when the base-owned selector finds those files. A complete check can use its own
trusted gates; heavy native/link/Qt/Tier 2 work only defers under the full selected
contract and the base-owned `heavy-v1` queue placement policy. The existing Fast
Gate and main cross jobs also own native compilation/linking, so partial client
evidence conservatively runs them in full. Cross lint never proves native tests,
Tier 2 runtime or ABI/hardware/package behavior.
On merge groups with explicit cumulative `cross_lint` scope, the macOS Rust
Tests job leaves formatting to Fast Gate and Clippy to the required macOS
arm64 cross leg (#4999). That linked cross leg lints `--workspace --all-targets`,
including the category tests and C oracle; its Dylint scope stays unchanged.
CI Gate requires both replacement jobs to execute successfully on the merge
result. Missing/false scope, measurement-only modes and other events keep Darwin
analysis on the Linux artifact producer (#5008). Rust tests, runnable doctests and every Tier 2
pass still execute on macOS. The two inspected jobs spent 155–162 seconds in
native Clippy plus 8–11 seconds in formatting; this is the expected native
runner saving, pending hosted validation, with extra test/oracle analysis on
the existing Linux cross runner.
Outsiders need no client tools. `./push` warns and falls back if local tools or
signing are unavailable; `PUSH_REQUIRE_ATTESTATION=1` is the opt-in strict mode.
A complete stamp is required for this fast path, never for contributing RED PRs.
The implementation's own trust-surface PR must run real checks. A later ordinary
source PR is needed to observe verification-only allocation after this base policy
lands. Record actual job IDs/execution and runner wait separately for the member,
fallback and queue examples; fixtures prove routing, not measured speed gains.
## Before you push
`./push` runs prooft through `uv run --no-project --with` using the immutable
`PROOFT_SOURCE` pin in `ci/pr_attestation.py`, shared with the base-owned
verifier. The pin includes upstream commit `d08d58be`, which adds the `data`
and `swift` ecosystems declared in `ci-attestations.yml`. Released prooft
0.1.0 and 0.2.0 reject those gates before running a proof command; an older
prooft on `PATH` is therefore ignored. uv caches the pinned environment
without replacing the installed tool. A pin download or proof failure still
uses ordinary PR CI, or refuses publication with `PUSH_REQUIRE_ATTESTATION=1`.
For a focused CI/configuration bug fix, keep the RED and GREEN commits and
record the local failing and passing commands, but push them together when
the fix is ready. A separate remote RED run is not required. This avoids
spending runner time on an already-fixed failure; see
[coordination.md](rust-port/coordination.md#4-pull-requests).
`./push` uses gh's configured default repository as the PR base and resolves
Git's actual `origin` push URL, including a separate `pushurl`. Fork heads use
the destination owner's name; new PRs target `master`. An existing open PR for
the same destination and branch is reused, including a stacked PR. Configure
exactly one push destination on the same GitHub host as the base; ambiguous
destinations and repository-resolution errors stop before the push.
If the selected base is a fork, explicitly choose it with
`gh repo set-default OWNER/REPO` or `GH_REPO`; captured repository queries cannot
ask gh's interactive fork-selection question.
When stamping amends an already-published HEAD, `./push` uses an exact
`--force-with-lease=:` only if the push destination
still names that pre-stamp commit and the amended commit preserves its tree
and parents. A concurrent remote update rejects the lease. New branches and
ordinary fast-forward updates use a plain push; divergent history is refused
by default. The publication message reports which case applies.
To publish intentionally rewritten history (for example, a rebase or a stacked
draft reset onto master), use `./push --replace-remote-head `, naming
the exact full SHA of the remote commit you intend to replace. Review the
commits being replaced first. `./push` still runs its proofs and signs the final
HEAD, then checks the actual `origin` push destination, including `pushurl`.
It refuses if that branch is absent or its head differs from ``.
Only a match enables `--force-with-lease=refs/heads/:`;
Git also rejects a concurrent update after the check. Abbreviated SHAs and
symbolic refs are rejected. No unconditional force option is supported.
1. Claim the issue and check open PRs ([coordination.md](rust-port/coordination.md)).
2. Commit RED, then GREEN.
3. `./lint --fix`, then commit what it changed.
4. Check `git diff --cached` for an unintended `plugins/obs-websocket` pointer
change. A pointer that doesn't descend from master's is rejected, and stale
pointers have reverted merged fixes before.
5. Optional: run the local gate from a clean, committed tree. If it reports
another gate running for this clone, wait and retry.
6. If you ran it, push the stamped commit as-is: no amend, no rebase, no
"Update branch" afterwards. Rebase before stamping, not after. If you
didn't, just push; PR CI runs the Linux jobs itself.
7. There is no label to force CI. A `build-aux/` or submodule change is
compiled on Linux only; the full builds run on schedule,
workflow_dispatch, tags and the release gate.
## C++ lint report (frontend)
The Qt frontend has a C++ lint report (#5453), `ci/cpp_lint.py`:
- clang-tidy (`clang-tidy==22.1.8` through uvx) with the checks in
`frontend/.clang-tidy`, on the unity groups that the change touches. A
changed implementation file runs its group. A changed header runs the groups
that include it (see the gate below). A change to the config, the script or
the baseline runs every group.
- clazy (Ubuntu's `clazy` package, `clazy-standalone`): level 0 and 1 without
`connect-by-name` and `qproperty-without-notify` (upstream's Designer
patterns), on the same groups and in the same time budget as clang-tidy.
The Qt lane installs it with `apt-get` only when there are groups to lint
(about 80 MB with its LLVM); `./lint` uses it when it is on `PATH`.
- lizard (`lizard==1.26.1`): the cyclomatic complexity (CCN) and length (NLOC)
of every new or changed function in the changed frontend files, with the
values before the change.
**The gate** (#5453 step 3): `ci/cpp_lint_baseline.txt` holds the findings
master has, one sorted line per key with its count. A key has no line number,
no machine path and no number that moves with an edit, so moved code is not
new. In a PR or merge group the Qt lane fails when a key goes above its count
(`ci/cpp_lint.py --gate`, exit 3, the only exit code that fails the job); the
report names the baseline line. Fix the finding, or add its line only for a
finding you keep on purpose. A finding gone from a changed file is listed (lower
or delete its line) but does not fail. A tool that did not judge every group
(not available, a timeout, over the budget) or has another version than the
baseline records judges nothing. A change to the baseline, the config or the
script runs every group. `--update-baseline` rewrites the file from such a run.
In the Qt lane the build's own dependencies (`ninja -t deps`) map a changed
header to exactly the groups that include it. Without them (`./lint` with
another generator) the precompiled-header rule applies.
`./lint` stays report only.
- **Qt lane:** `ci/linux_qt_frontend.py` exports `compile_commands.json` and
runs the report after the tests. The changed files come from the GitHub
event: the PR's base, the merge group's base, or the push's `before`.
- **`./lint`:** runs the report when `OBS_CPP_LINT_BUILD` names a build dir
with `compile_commands.json` (configure with
`-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` and the Ninja or Makefile generator,
then build once). Otherwise it prints a skip line. The changed files are the
changes since the merge-base with `origin/master`, including uncommitted and
untracked files.
- **By hand:**
`uv run --no-project ci/cpp_lint.py --build [--base ]`.
## When CI fails
- Read the failing job's log first: `gh run view --job --log-failed`,
or the job log via the API while the run is still going.
- Reproduce locally (`./unittest`, the relevant gate lane, or `bosn ci run` for
a workflow job), fix, re-stamp, push once.
- Re-run a single job only for a clear infrastructure flake (a network
timeout, a runner image download): `gh run rerun --job `. Never re-run a
whole workflow to "see if it passes this time".
- Platform-only failures (macOS, Windows) can't be reproduced on Linux. The
Tier 2 harnesses print crash stacks (`cdb` on Windows, `lldb` on macOS) to
read in the log; use those before pushing guesses.
## Pre-work, cache maintenance and cancellation
`ci-pre.yml` is the general entry point for pre-work. Pull calls it for every
PR and merge-group run; Push calls it on master. Put each operation's event
condition on that operation's job. Do not skip the whole entry point merely
because one maintenance operation does not apply.
The cache janitor runs only for `merge_group` or a `push` to
`refs/heads/master`. `ci-pre.yml`'s janitor sweeps master pushes. The merge
queue sweeps at the end of the run, in `ci.yml`'s final `cache-janitor` job
(`needs` every other job, `if: always()`), never at the start (#1854). The
queue serializes master's cache writes, so that sweep has the cache to itself
and sees what the run saved. Pinned to zackees/ci.yml#405, it evicts the
least recently accessed entries until the repository total fits
`[cache].budget`, keeping each family's newest entry and anything younger
than 10 minutes, so GitHub's own LRU eviction never chooses what to drop.
Declared family maxima may add up to more than the budget; the end-of-queue
sweep is what keeps live usage under it. Fork PR tokens cannot delete
repository caches, so PR pushes must skip both janitor jobs. Keep cache deletion out of untrusted PR
events; do not switch to `pull_request_target` to obtain a write token.
The Tier 2 apt family has one master-push writer in `rust-linux-tier2-build`.
Its restore/save and the OFF/ON consumers use the same image/package-list key
and literal relative path `../../_temp/apt-archives/*.deb`. The default checkout
layout puts that directory under `RUNNER_TEMP` on host and container runners;
apt scratch stays outside the checkout. Actions also versions entries by
their input paths: an absolute `runner.temp` path changes between hosted and
Dell runners even with an identical visible key. The previous writer added a
trailing hyphen that the test consumers did not request. The first hosted master
build after this correction seeds the portable version; until then consumers
install normally. Only completed packages travel, and apt locks stay job-local.
Dell builds retain their marker-backed shared archive and skip remote saves.
The existing `tier2-apt` 400MB allowance and janitor policy are unchanged.
The app builds keep no Actions cache (phase A of #1801): the macOS Xcode
compilation cache, the Windows ccache, the Ubuntu zccache and the Flatpak
builder state held 5.71 GiB and served only nightly, dispatch and release
runs, while `deps`, `zccache-tier2` and `tier2-apt` serve every PR and queue
run. `ci/test_cache_family_budget.py` checks that the declared family maxima
fit in `[cache].budget`. The release-asset transport (#782) can bring the
app-build caches back outside the budget; its dispatch-only seed goes from
the app build to the transport job as a one-day artifact.
A branch dispatch of the `asan` pass restores only the archive master saved, so that archive has
its own family, `zccache-sanitize-asan`. `tsan` and `valgrind` keep no archive.
Master builds fresh and never restores: a restored archive kept the old entries
beside the new ones and outgrew the family. The nightly saves one, and a master
push calls `sanitizers.yaml` with `build_only` when `ci/asan_cache_state.py` finds
no archive or one older than 6 hours (#3501). A restored archive builds in about
4 minutes under 6 hours old and about 8 at 6-15 hours, against about 24 cold.
Cache cleanup is best-effort maintenance. It has no dependents in the Pull
or Push workflow and is excluded from `CI Gate ✅` (the end-of-queue sweep
runs after the gate, which never waits on it). Its own failures remain
visible for investigation, but cannot delay builds, queue cancellation or
merging. Keep the repo-wide `cache-janitor` concurrency group with
`cancel-in-progress: false`. A future pre-work job that is required for
correctness needs its own explicit dependency design; the janitor's policy
does not make all future pre-work optional.
Merge-queue throughput takes priority over housekeeping. Superseded-run
cancellation must start without waiting for cleanup. Let workflow
concurrency eagerly cancel obsolete PR runs; if a superseded run still
occupies the slot, request its cancellation rather than waiting for a known
obsolete result. GitHub cancellation is asynchronous, so confirm the old
run has stopped before calling it canceled. Cancel obsolete work, not a
current required check simply because it is red. A janitor failure is a
maintenance incident; a failure of the current required gate blocks normal
queueing and needs investigation.
Changes to this policy need corresponding updates in `ci/test_ci_pre.py`
and the workflow call sites. Decisions and evidence for the current behavior
are tracked in [#1269](https://github.com/obs-rust/obs-studio/issues/1269)
and [#1270](https://github.com/obs-rust/obs-studio/pull/1270).
`setup-uv` follows the same remote writer policy: each call sets
`save-cache: ${{ github.ref == 'refs/heads/master' }}` while keeping restores
enabled wherever caching was already enabled. The pinned action otherwise
saves on PR and queue refs, producing archives the janitor later reclaims.
The [retention snapshot and offline executor reproduction](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-cache-retention.md)
record that churn separately from the still-open whole-budget allocation and
durability work. A current inventory below the global budget does not prove
that useful seeds survive the next nightly writer burst.
The [24-hour PR and merge-group cohort](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-ci-cache-day-cohort.md)
records gate latency, failures, cancellations and incomplete timing proxies
separately for each event. Its companion and offline reproduction preserve
the API evidence; the mixed population does not establish code-only latency
or billed runner cost.
The [janitor report acceptance audit](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-janitor-report-disposition.md)
maps the original incident criteria to hosted evidence and continuing owners.
Global capacity and useful-seed durability remain tracked in #1801; the report
does not certify the broader CI backlog as complete.
## Where this is going (open gaps)
For a reproducible traffic/cache snapshot, run the read-only collector:
```sh
uv run ci/cache_metrics.py --output build_ci_audit/metrics \
--start 2026-10-16T17:00:00Z --end 2026-10-17T17:00:00Z
```
It retains raw API responses, actual changed-file cohorts, sample IDs,
listing coverage, per-lane job/setup medians, gate wall time and canceled
runner-minutes. Compare code PRs and merge groups separately from docs and
CI changes. Unknown source diffs remain unknown; sparse samples and changes
to source/configuration between windows need to be reported. Its cache
inventory describes collection time, not historical inventory at the end
of a past window. See the [2026-10-17 audit](ci-cache-audit-2026-10-17.md).
Each gap is a step toward the full protocol, and a good issue to pick up:
- **Docker through bosn.** The Tier 2 Linux harness
(`rust/tools/linux-validate/run.py`) drives Docker directly, so concurrent
local gates run unmanaged. Running it under bosn's bounded runner slots is
the biggest single relief for shared machines. (The AppImage build already
runs under bosn: `bosn run --task appimage`.)
- **A real `ci.toml`.** Path selection lives in `ci/ci_scope.py`, outside
ci.yml's checker. Moving it into a schema-3 `ci.toml` lets the protocol's
tooling validate and evolve it.
- **Native lane capacity.** The heavy queue requires selected native runtime
coverage, even with complete client cross-lint evidence. Runner shortages fail
admission; they do not grant queue proof credit.
- **Warm PR caches.** setup-soldr restores but doesn't save on PRs, so a
branch's first build depends on master's cache being warm.
- **Feed lessons back.** Problems found here, such as the stale zccache
replay or the gate lock contention, belong in the tool's own repo, so every
project using the protocol benefits.
## Cook profiles and post-job snapshots
All setup-soldr consumers declare their cook policy. Static-library and
release jobs cook release dependencies. Native test and cross-check jobs
use the dev profile; cross checks still install their target standard
libraries through the existing gate, and host cooking does not imply
that a cross-target dependency tree is prebuilt.
The Linux `cross-compile` job skips cooking (`prebuild-deps: none`) and keeps
`cargo-registry-cache: true` (#3767). Its default C/C++ compile-only check has
no Rust consumer; the optional `OBS_CROSS_LINK` path builds a cross-target
release staticlib, not host dev artifacts. Baseline PR run
[42310800738, job 128211841721](https://github.com/obs-rust/obs-studio/actions/runs/42310800738/job/128211841721)
restored an 18.7 MB host cook, loaded 714 files in about 13 seconds, then
cooked `--profile dev`; the subsequent compile-only check printed zero Rust
`Compiling` lines. Edits to `build-project.yaml` select both cross aliases so
PR CI validates this job's setup changes. The macOS/Windows app and release
jobs retain their existing cooks pending measured consumer evidence.
Fast Gate cooks the dev profile with `--tests`, on every event: its consumer
is `cargo test`, so a release cook there is never reused. Measured on ten Fast
Gate jobs on 2026-10-31 (#2661): the four jobs that still cooked `--release`
(push and merge-group core runs) then rebuilt the `test` profile from scratch,
1m09s-1m37s and 256-442 `Compiling` lines, while the six jobs cooking
`--profile dev -- --tests` finished that build warm with no profile line at
all (192 lines). The cook step cost the same either way, 11.3-15.6 s. The
older policy came from the local post-job benchmark (#1317), which timed the
cook step (57.259 s release, 36.170 s dev, 72.136 s without cook) and not the
consumer it feeds; core rebuild medians favored release but varied widely.
The action hashes profile flags into the cook cache key, so changing them
starts a new archive generation that master has to seed.
The action saves the cook snapshot after consumers run. Thus a release
archive can also carry dev artifacts. Keep dependency cooking enabled
unless setup plus consumer measurements demonstrate that removing it is
faster; do not decide from the profile name alone.
## Background master build concurrency
Merge-queue CI remains the required merge check. Full post-merge master
builds warm caches and validate deferred lanes, but overlapping generations
compete with the queue for runners. The Push workflow therefore applies
concurrency only to its `build-project` reusable-workflow call: one active
master build finishes, and GitHub retains only the newest pending build.
Tag/release-branch calls use unique run IDs and remain independent.
Keep `cancel-in-progress: false`: continuous merges must not repeatedly
interrupt active cache saves and prevent warming. Intermediate pending
master build calls can be cancelled as superseded; all required PR and
merge-group checks still run under their own policy. This trades per-commit
background coverage for latest-snapshot validation and less runner
contention. A plugin change in a superseded pending generation may wait
for later work to warm that scoped plugin cache. Measure runner wait and
queue wall time before claiming a throughput gain.
Do not move this group to Push workflow scope. `ci-pre` remains an
independent general pre-work entry point, and its janitor keeps its own
non-cancelling repository-wide concurrency policy. A completed run's
`cancelled` pending janitor job is not evidence that its deletion script
failed: inspect whether it ever started before attributing the outcome.
GitHub documents [job concurrency on reusable-workflow calls](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations)
and [the default single-pending concurrency behavior](https://docs.github.com/en/actions/concepts/workflows-and-actions/concurrency).
### Compiler and cache log evidence
Add `--include-logs` to `ci/cache_metrics.py` to collect sampled terminal
runs' latest-attempt logs alongside the existing API responses. Raw logs
are cached per run/attempt, and each record/summary includes recognized
per-job archive byte observations, compiler reports, saved keys and CTest
counts. Missing logs or counters remain unknown.
Flatpak's pinned builder can restore cumulative ccache statistics along with
the build state. Those reports carry `counter_scope: restored-cumulative`
and `job_delta_available: false`; their raw counts are preserved, without
inventing a baseline after the action's final restore. Do not present them
as compiler hits from that job alone.
The existing full Ubuntu app lane captures a native zccache session journal
to diagnose misses such as the observed 137 cold OFF calls. Its IPC endpoint
and cache stay inside that job's workspace. Only a bounded, sanitized JSON
summary is uploaded as `native-cache-ubuntu--` for two days:
workspace-relative source candidates, outcomes, known miss categories, diff
field names and latency counters. Raw arguments, environment values, raw
journals and diff values are not uploaded. Missing, malformed or truncated
evidence is marked explicitly. Diagnostics are non-blocking; compilation and
integrity tests retain their normal failure behavior. This full-build lane
does not add work to PR or merge-group admission.
The summary retains numeric compiler `child_peak_rss_bytes`, sampled
`tree_peak_rss_bytes` and their source, exit codes and termination signals when
the journal supplies them. The child high-water mark can be just the compiler
driver; the sampled tree includes its compiler descendants. Neither measures
the cache daemon's RSS or the simultaneous host peak. Missing fields are unknown,
and requests lost before journaling have no completion measurement. It also
retains bounded, allowlisted lifecycle events from the job-owned cache, without
making daemon control requests. Missing death
events cannot distinguish SIGKILL, a crash, or a connection-handler failure.
In particular, run [41785304209](https://github.com/obs-rust/obs-studio/actions/runs/41785304209/job/126426654456)
retained only 34 completed misses and simultaneous client disconnects: it does
not establish OOM. Track the daemon investigation in
[zccache#2064](https://github.com/forge-ci/zccache/issues/2064); a retry succeeding
is not evidence that its cause was fixed.
A restored archive does not imply compiler hits: one observed zccache
rollout restored 278 MB but reported 772 cold compilations. Keep C/C++
build totals separate from soldr session counters and ccache reports;
their scopes differ. Archive messages can repeat and must not be summed
as network transfer totals. Stratify compiler-version rollouts and cold
cache seeds before comparing warm lane performance.
Master build coalescing retains changed paths since the latest successful
ancestor Push run, rather than only the latest push's parent. A replaced pending
master build therefore cannot drop plugin/platform cache warming. If no recent
successful ancestor can be established, scope all tracked paths conservatively;
API failure must not silently omit work. This changes master warming only;
PR and merge-group scope still use their own bases.
## Merge queue admission policy
The merge queue is the heavy gate (#4747, maintainer direction in #4743).
`ci/ci_scope.py` selects lanes from the merge-base of the event's target
`base_ref` and immutable `head_sha`, diffed against `head_sha`. The target is
fetched from origin, recovering full history for shallow checkouts. This includes
earlier queue entries even when `base_sha` names the preceding entry's head
(#4964). Unknown scope selects all work; CI Gate still rejects unresolved scope.
It runs Fast Gate merge-result Rust tests,
host formatting/clippy/Dylint and touched Linux targets, selected C/C++ cross
compilation, complete Linux Tier 2 OFF and ON suites, Qt, and selected native
Windows/macOS Rust tests and Tier 2. Shared/core changes select both native
hosts, matching core master-push coverage; platform paths retain their existing
selection. Every non-docs group runs Windows MSVC test linking and all six
clippy/Dylint targets. Main Windows x64/macOS arm64 cross legs retain test
`--no-run`; the extra three targets lint only. GNU-oracle linking remains in
Fast Gate when its inputs select it. Docs-only groups retain their Fast Gate skip.
Client trailers, hosted lane proofs and command verdict caches cannot suppress
selected queue execution. `SOLDR_VERDICTS=off` disables soldr verdict replay;
restored compiler/dependency artifacts remain allowed. PR coverage is retained
for fallback contributors; complete verified-member PRs now use base-owned admission.
`ci/gate_jobs.py` recomputes an expected execution manifest from that same exact
diff, with full checkout metadata, independently of reusable outputs. Each
selected matrix leg and both complete Tier 2 modes must finish successfully.
Missing, unexpectedly skipped, unfinished, cancelled, failed or runnerless jobs
reject admission. True out-of-scope jobs may skip. API/scope errors fail closed;
runner-capacity diagnostics remain errors, including unavailable native runners.
`CI Gate ✅` remains the sole required context. Only cache-heavy Linux jobs use selected
`MQ_RUNNER_LABELS` with hosted fallback; other jobs retain hosted runners.
Concurrency cancellation and independent cache maintenance are preserved.
Sanitizers, security scans, full app builds, packaged/hardware qualification and
release work retain their existing nightly/manual/release placement.
Security analysis (CodeQL, vulnerability/dependency audits and static security
scanners), release packaging validation, signing, publishing and distribution
checks belong in the existing nightly workflows, with manual dispatch available
for diagnosis. They must not run on PR pushes or `merge_group`, even as optional
background jobs: they compete for runner capacity. Explicit release/tag actions
may still validate and publish releases outside the merge queue.
GitHub CodeQL **default setup must remain disabled** in repository settings;
it creates automatic PR/push scans outside the versioned workflow graph.
The existing `scheduled.yaml` owns nightly CodeQL for Actions, C/C++, Python
and Rust. Any new security integration must be reviewed for its event triggers,
required-check settings and runner use before enabling it. Do not add a security
scan to `CI Gate`, merge rules or queue cancellation dependencies. Nightly
failures are investigated through nightly reports rather than blocking the queue.
Packaged virtual-camera audio hardware qualification lives in the existing
`vcam-audio-hardware.yaml`: daily at `17 10 * * *` (10:17 UTC) and by manual
`workflow_dispatch`, with scheduled jobs restricted to `obs-rust/obs-studio`.
It never runs for PRs (including hardware harness/workflow edits) or
`merge_group`, and has no dependency on `CI Gate` or attestation shortcut.
Both Windows VB-Cable and macOS OBS Virtual Microphone jobs select the newest
successful scheduled master package, or the optional manual `build_run`.
Each summary records the package name and build run ID; this qualifies that
package, not the PR or merge-group tree. Package, driver and audio validation
failures remain visible, with bounded job timeouts and failure artifacts.
`ci/test_vcam_audio_hw_events.py` checks this routing and retained recording
checks without claiming an executed hardware pass.
### Opt-in merge-queue runner
Set the repository Actions variable `MQ_RUNNER_LABELS` to a JSON array such as
`["self-hosted","linux","x64","obs-mq"]` to route cache-heavy Linux jobs on `merge_group`
to online runners matching **all** those labels. The supported credential is the
GitHub App `obs-rust-mq-runner-probe`, installed on the `obs-rust` organization
with access to this repository. Give the App repository **Administration: read**
and organization **Self-hosted runners: read** permissions. Set the repository
Actions variable `MQ_PROBE_APP_ID` to its App ID (`5736334`) and the repository
Actions secret `MQ_PROBE_APP_PRIVATE_KEY` to its private key. The hosted selection
job creates a short-lived installation token only for `merge_group` when both
`MQ_RUNNER_LABELS` and `MQ_PROBE_APP_ID` are nonempty. Token creation is allowed
to fail; an absent App token falls back to the optional legacy
`MQ_RUNNER_STATUS_TOKEN` secret (a PAT with the same read permissions).
Both repository-level and organization-level runners are supported.
The `select-mq-runner` job calls `GET /repos/{repo}/actions/runners` and
`GET /orgs/{owner}/actions/runners` (owner is the repository prefix) before
selecting labels; matching capacity across the available lists qualifies according
to `MQ_RUNNER_MODE`. Its workflow token has **Actions: read** for the separate
run/job commitment probe; the runner-probe App needs no additional permission.
The `heavy-labels` output goes only to Build's `mq-heavy-labels` input. An organization API 403/404 (for example,
when the token lacks organization scope) emits a warning and keeps the repository
result. API failures in either scope warn without discarding a match in the other.
If App token creation fails and no legacy token is available, selection falls
back to hosted runners. Missing tokens, invalid label JSON, or no matching online
runner in either available list emit a warning and keep each job's original hosted label. The probe
checks at most five pages of 100 entries per list, with a ten-second timeout per
request and **210 attempts total**, shared by runner, run and job probes including
retries. This covers two runner scopes, two run statuses and ten active runs
(the ruleset's five build entries times two for regroups), each with up to five
pages and three attempts per page. Timeouts, connection failures, HTTP 5xx and 429 get at most two retries
with short jittered backoff; Retry-After (seconds or HTTP date) is capped at five
seconds. Other HTTP 4xx responses are never retried. A shared 45-second deadline
caps requests and backoff across the selection, well inside the job's two-minute
timeout; an expired deadline discards even an earlier matching scope.
Active-run pagination ends at a short page, rather than trusting a changing
`total_count` to end a full page. A count mismatch or duplicate ID retries the
traversal from page one, at most twice within the same request budget/deadline.
A traversal with consistent counts, or two consecutive short-ended traversals
with identical unique run IDs, completes the collection even if the count is
stale. Collections that keep changing or exceed the page limit select hosted;
incomplete job lists still select hosted. If the jobs budget runs out
after active runs are listed, each unprobed active run instead reserves the
required runner capacity (or its larger observed queued-job count) and one run slot.
Warnings name the failed probe step
and include validation reasons, including incomplete collections and limits.
An unset or empty variable skips the
probe steps. Outside `merge_group` the selection is empty unless member PR
routing is explicitly enabled below. Master pushes, manual/release runs,
and macOS/Windows jobs keep their current hosted runners. Linux matrix entries
retain their matrix and hosted fallback. Required job/check names are unchanged.
Rust Tier 2 Linux build, its OFF/ON test jobs, Rust Cross Lint
(two main targets plus the release-target job), and the Linux macOS Rust artifact
producer and Windows Link Check use that selection.
Build and tests share the selected pool so local handoff remains valid.
Event Data, CI Mode, Format, Fast Gate, Cross Compile,
Qt, app builds, proof publication, queue cancellation and CI Gate use hosted
runners. Empty outputs and probe/setup errors keep every heavy job hosted.
On `merge_group` the selector job itself runs on the org's `forge-quick` admin
runners when the repository variable `FORGE_QUICK_LABELS` holds their labels
(`["self-hosted","forge-quick"]`), so a queue run's routing decision never waits
in the hosted queue (#5376). forge-quick runs one job per ephemeral container
with a 120-second wall clock, 256 MiB (its tmpfs workspace included), half a CPU,
no Docker and no LAN; the job therefore checks out `ci/` blobless and pins
`setup-uv` to the image's cached uv 0.13.7. PR, push and scheduled runs keep
`ubuntu-latest`. Kill switch: delete the variable
(`gh variable delete FORGE_QUICK_LABELS -R obs-rust/obs-studio`) and the next
run selects on hosted again.
#### Idle Dell capacity for member PRs (default off)
The maintainer approved same-repository member PR routing on 2026-11-19
(Refs #4839, #4896). Set the repository Actions variable `DELL_PR_ROUTING=on`
to opt in; unset, `off`, or any other value keeps PR jobs hosted. This change
does not set any repository variables. Forks, non-members, pending memberships,
API errors and `pull_request_target` events always stay hosted. Eligibility uses
the immutable `pull_request` event's head/base repository identities and author,
then the admission verifier's authenticated public/private active-membership
check against obs-rust. The hosted selector checks out the PR's BASE SHA and
extracts both `ci/select_mq_runner.py` and `ci/pr_attestation.py` with `git show`
into an isolated directory. It never imports the PR's routing code. The runner
probe App/token must be able to read membership; denied private membership uses
hosted without expanding permissions. Probe credentials remain on hosted runners.
`MQ_PR_RESERVE` keeps matching idle runners free for the queue, defaulting to
`MQ_RUNNER_DEMAND` (currently `6`). A PR must fit its entire required capacity
after queued commitments and this reserve are subtracted. Unset/empty uses the
default; a nonnegative integer overrides it, and invalid values select hosted.
PRs have a separate `MQ_PR_DEMAND`: unset/empty defaults to `13`, the complete
expanded PR job inventory, including both sequential Tier 2 phases. This count
is a **hard admission floor**, checked against every expanded job that can
receive Dell labels for `pull_request` in `build-project.yaml`. Selection does
not throttle or restrict jobs after admission: Fast Gate, Cross Compile, Qt,
link jobs and the existing heavy jobs can all receive those labels. A smaller
positive override is clamped to the full inventory (and logged); it cannot turn
that thirteen-job graph into a two-job allocation. Larger overrides reserve
more capacity. Invalid/nonpositive values use hosted. The effective PR demand
is the maximum of this inventory, `MQ_PR_DEMAND` and the MQ requirement, and is
also used for in-flight PR commitments. Update the inventory floor and its
regression whenever the workflow graph changes.
**Six-runner Dell:** keep `DELL_PR_ROUTING=off`, `MQ_PR_RESERVE=3` and
`MQ_PR_DEMAND=13`. There is no PR-demand setting that safely admits the current
thirteen-job graph with a three-runner queue reserve on six runners; at least
sixteen online/idle runners are needed. In particular, the reported
`MQ_PR_DEMAND=2`, `MQ_PR_RESERVE=3` configuration must select hosted. Useful PR
routing on six runners needs a separately bounded job subset or execution
limit before reducing the inventory floor. With reserve six, nineteen matching
idle runners are needed. `MQ_RUNNER_LABELS`, `MQ_RUNNER_MIN_IDLE`,
`MQ_RUNNER_DEMAND` and `MQ_RUNNER_MODE` retain their meanings.
No variable is changed by merging this default-off feature.
When enabled, both selectors account for live PR and queue job commitments.
Undecided queue runs have priority over every PR, regardless of creation time;
undecided PRs use oldest-first ordering. Commitments are weighted by each
event's required runner capacity, so a large PR cannot count as one small MQ
run. For MQ admission the budget is `MQ_RUNNER_MAX_RUNS * required`; PR admission
keeps the online-capacity limit and idle floor after subtracting the MQ reserve.
Queue admission does not subtract the PR reserve. This remains a bounded
snapshot, with the same API visibility and
simultaneous-selection limitations as queue admission, not a preemption system.
Already-running PR jobs finish normally. Turning the kill switch off stops new
PR routing; allow existing PR jobs to drain before relying on queue-only census.
Existing heavy Linux jobs accept the selected labels on PR events. Fast Gate,
Cross Compile and Qt Frontend Linux also accept them for PRs only; their queue
and other-event placement is unchanged. Event Data, CI Mode and lightweight
admission/gate jobs stay hosted, and macOS/Windows jobs keep their native hosts.
The reusable workflow caller passes empty repository secrets to Dell-routed PR
runs, and selected jobs also suppress credential inputs on that path. They retain
only the event's `GITHUB_TOKEN`, with `contents: read` and `actions: read`; no
permission increase or container-isolation change is introduced. Hosted/non-PR
secret handling stays unchanged. No new workflow files or required checks.
Both the default threshold mode and `MQ_RUNNER_MODE=prefer` use the same
bounded Dell queue admission. Prefer remains accepted for existing configurations;
unknown modes fall back to hosted.
Set the optional repository Actions variable `MQ_RUNNER_DEMAND` to tune the
per-run idle-capacity requirement without a workflow change. Unset or empty
uses the unchanged conservative default `6` (checked by `ci/test_ci_scope.py`).
In #4980's per-job routing, the Dell-routed heavy work in
`build-project.yaml` is one Tier 2 Linux build, two complete Tier 2 test jobs
(OFF/ON), two main Cross Lint legs, one release-target Cross Lint job, and the
Linux macOS Rust artifact producer (#5008). These are seven jobs in total, with
**a peak of six concurrent heavy jobs**: the two Tier 2 tests wait for their build
and can overlap all three Cross Lint jobs and the Darwin producer. The release
job runs its three targets within one job. The unchanged default demand `6`
covers that peak; an earlier override of `5` no longer covers it. A demand of `7`
is the conservative total-job bound. Before the Darwin producer, #4980's six-job
topology had a peak of five. These counts describe those topologies, not a fixed
admission constant.
**Revisit `MQ_RUNNER_DEMAND` whenever heavy jobs are added or their dependencies
change.** Inventory every job using `mq-heavy-labels` in
`.github/workflows/build-project.yaml`, expand its matrix, and account for
`needs` dependencies when estimating concurrent demand. A job count alone is
not the peak: Tier 2 build and tests run in successive stages. A demand above
the Dell's online capacity intentionally selects hosted. The selector uses the
configured demand and actual queued-job labels; it does not hard-code a five-job
peak or automatically infer future jobs before they appear in the API. The same
configured requirement applies when path scope skips some heavy jobs.
`MQ_RUNNER_MIN_IDLE` is an optional repository Actions variable (default `1`);
the idle fast case requires `max(MQ_RUNNER_MIN_IDLE, MQ_RUNNER_DEMAND)` runners
after subtracting queued Dell jobs. Online capacity must cover that requirement
even for busy admission, so offline or undersized pools still select hosted.
`MQ_RUNNER_MAX_RUNS` caps concurrent committed Dell merge-group runs, including
the new admission. Unset or empty defaults to **3**; nonpositive or noninteger
values select hosted. Below this cap, use the idle fast case when available,
otherwise queue on the busy Dell. At the cap, select hosted even if the runner
census is idle. This cap replaces `floor(online / required)`; busy runners and
queued jobs no longer force hosted fallback while a run slot remains.
The default comes from the six-runner Dell measurements on 2026-11-19 (reports
22/23, Refs #4896): 6 of 13 runs went hosted because 4–6 runners were busy with
required capacity 3. Dell completion had a 27.8-minute median against hosted's
46.3 minutes, while Dell job queue wait was p90 349 seconds and max 615 seconds.
Adding even that observed maximum wait to Dell's median gives 38.05 minutes,
8.25 minutes ahead of hosted's median. Three concurrent runs is a bounded first
step above the old two-run cap; tune the variable from subsequent completion
measurements rather than assuming this estimate is a measured overcommit result.
This queue policy does not authorize PRs to consume their reserved MQ capacity;
member-PR routing (#5279) retains its separate idle floor and queue reserve.
With PR routing enabled, retain capacity-weighted commitments and use a queue
budget of `MQ_RUNNER_MAX_RUNS * required` so a larger PR cannot count as one
smaller queue run. The cap does not relax PR admission, even with a zero reserve.
Runner IDs visible in both scopes count once (a busy observation wins). The job
summary records online/busy/idle counts, required capacity, queued Dell jobs,
committed runs, run limit, idle run slots and the idle/busy admission reason.
Queued/in-progress `ci.yml` merge-group runs and latest-attempt jobs establish
commitments:
- Live Dell-labelled jobs commit one run slot, including newer runs. Completed
heavy jobs establish the route but release capacity when no Dell jobs remain,
including runs waiting only for hosted macOS work.
- Older undecided runs reserve a slot, ordered by creation time then run ID.
Identical snapshots therefore admit the same oldest runs, including runs
created in the same second. A successful selector still has an unknown route
until heavy-job labels appear: its output is not exposed by the jobs API.
Keep its provisional reservation through that visibility gap (also when its
conclusion is missing), preferring brief under-use over overcommit. Hosted
choices, unsuccessful/skipped selectors with no live Dell jobs, and terminal
runs release reservations. Inspect jobs even for workflows reporting `queued`.
- A stable retried run listing may omit the current run (run `44586086466`). Without
its timestamp, count every undecided peer as older, and log the missing run ID
rather than raising `KeyError`. Missing run timestamps sort before known peers;
a missing current timestamp reserves every undecided peer. Missing run IDs
hold a slot without a jobs lookup. Missing event/status fields use the filtered
endpoint's values. Missing job fields similarly reserve that
peer's run and required demand, with the missing key named in the warning.
Run `44586086466` logged a bare `KeyError` after a snapshot retry; its API
response was not retained, so tests reconstruct both missing-current and
missing-field shapes rather than claiming an exact historical payload.
- Jobs-budget exhaustion reserves each unprobed run and at least its required
demand (or its larger observed queued-job count). API errors, missing Actions
identity/token and unresolved collections still select hosted.
Capacity-driven hosted routing is identified in the log and summary. This is a
bounded snapshot, not an atomic reservation: API visibility lag or runners going
offline after selection can still change capacity. Existing fixtures reproduce
the four-run burst, hosted backlog and collection races in `ci/fixtures/`.
Report 15 measured 168 idle Dell minutes (six idle runners, required three),
while 78 Dell-routable hosted jobs waited over five minutes (803 job-minutes),
and only 3 of 19 queue runs used the Dell. Read-only selector logs for
[44359171975](https://github.com/obs-rust/obs-studio/actions/runs/44359171975/job/134995483499)
and [44367435932](https://github.com/obs-rust/obs-studio/actions/runs/44367435932/job/135024874840)
show committed counts five and three despite six idle runners. Run
[44367448224](https://github.com/obs-rust/obs-studio/actions/runs/44367448224/job/135024915358)
instead fell back on a short queued-runs page with a mismatching count; bounded
snapshot retries now cover that race. The response-shape fixtures and peer job
timings in `ci/fixtures/mq-probe-races.json` reproduce #5181's collection failures
and the completed-selector visibility gap. Improved hosted timing and utilization still require
measurement after deployment.
The intended host is a NixOS netbooted Dell PowerEdge, which may be powered off.
Run the runner and its job processes inside its Ubuntu container image / FHS
environment with Ubuntu apt available: the existing jobs expect Ubuntu package
and toolchain prerequisites, not native NixOS commands. An offline PowerEdge
automatically falls back to hosted CI at selection time. This is a snapshot,
not a reservation: a host going offline after selection can still delay jobs.
The Tier 2 Linux build mounts `/var/cache/obs-runner` and selects a per-runner
persistent slot only when `.persistent-cache` exists and `RUNNER_NAME` is set.
On this Dell path, the build step sets `OBS_TIER2_LAUNCHER` to an empty value
to compile C/C++ without a launcher; hosted runners keep `zccache`. The
validation script uses `${OBS_TIER2_LAUNCHER-zccache}`: unset defaults to
zccache, a nonempty value selects another launcher, and empty omits both
launcher `-D` arguments and clears old launcher cache entries in a reused
CMake tree. zccache stats, daemon shutdown and recovery run only when zccache
is selected; the uncached path reports that stats were skipped.
This bypass follows the measured Dell daemon bottleneck (2.2 active compilers
with 65.8 waiting clients at 8.6 compiles/s; Refs #4954 and
[zccache#2209](https://github.com/forge-ci/zccache/issues/2209)). Dell A/B build
timing is pending while the host is offline for its hardware change. No
no-launcher speedup has been measured.
On the Linux x64 host chosen by the maintainer, open repository **Settings →
Actions → Runners → New self-hosted runner**, select Linux/x64, and follow the
shown download and verification commands. Use the temporary registration token
shown there to register the runner:
```sh
./config.sh --url https://github.com/obs-rust/obs-studio --token --labels obs-mq
```
The runner adds the `self-hosted`, `linux`, and `x64` default labels. Install/start it as a service
using the runner's documented service commands, then set `MQ_RUNNER_LABELS`
only after it is online and the App credential is configured. Container
jobs require Docker installed and usable
by the runner account; the Tier 2 build and Flatpak jobs use `container:`, though
they are not selected on the trimmed queue path. This change neither registers
nor configures a runner. Clear the variable to return to hosted Linux runners.
### Kept Tier 2 configure reuse
Only the marker-backed kept-tree path sets `OBS_TIER2_KEEP_CONFIGURE=1`.
It disables the libobs module cache, including its restore/save steps: Dell
measurements restored 0/7 modules in five jobs, while enabling the imported
module list required a second configure. Hosted runners keep the existing
configure and module-cache behavior.
`ci/tier2_configure.py` stores `.tier2-configure.json` inside `tree/`, so the
existing crash-safe kept-tree save/restore carries it with `CMakeCache.txt`.
The SHA-256 input fingerprint covers the complete argument vector (preserving
argument boundaries and order): source/build paths, generator, every `-D`/`-U`,
compilers and launchers, build type, test/reference switches, extra flags and
version/build-number overrides. It also covers the working directory; PATH,
HOME, compiler/linker flags, locale, DISPLAY and SDK variables; every CMAKE_,
PKG_CONFIG, OBS_, SOLDR_, RUST, CARGO_, CCACHE_, ZCCACHE_, UV_ and PYTHON environment input
(including `OBS_TIER2_LAUNCHER` and the existing shell toolchain-version result); resolved
CMake/Ninja/compiler/launcher/soldr/pkg-config/git/uv/Python/linker/archiver
executable paths and contents;
the Ubuntu installed-package/version inventory; explicit toolchain
file contents; and Rust toolchain/Cargo configuration files.
OBS embeds `git describe --always --tags --match '[0-9]*.[0-9]*.[0-9]*'
--dirty=-modified` during configure. Its output is hashed too unless an explicit
`OBS_VERSION_OVERRIDE` replaces it. A different commit/tag/dirty version must
configure to avoid reporting a stale version: the first configure saving is
therefore limited to unchanged-version retries. Removing the module-cache
configure also benefits changed revisions. The measured 128–133 second Dell
warm configure is an opportunity, not a guaranteed per-commit saving.
Preload scripts (`-C`, including their arbitrary includes), presets and
`--fresh` conservatively retain explicit configure.
Reuse additionally requires matching contents of the cache, Ninja graph and
rules, the cached compiler/toolchain binaries/files, and an enabled Ninja CMake
regeneration rule. Missing/invalid stamps, trees, probes or any mismatch run
configure. The stamp is invalidated before configure and written atomically
only after success. Module-cache use never permits reuse. CMakeLists/includes
and `CONFIGURE_DEPENDS` changes remain Ninja's responsibility through
`cmake --build`; no build or test result is cached by this decision.
### Prebaked Dell Tier 2 packages
The independent master-push `tier2-image` job publishes the content-addressed
public GHCR package described in
[`rust/tools/linux-validate/tier2-image/README.md`](../rust/tools/linux-validate/tier2-image/README.md).
The first master push after merge seeds it; Dell selection switches to its
immutable digest once the public manifest exists. Hosted runners keep their
current image paths. Probe errors fall back, and the required gate does not wait
for publication. Baked package versions are frozen until an image input changes;
stock installs resolve current Ubuntu archive versions. Tests continue checking
the exact runtime package closure from their build artifact.
Prepared-runtime delta installs use APT's native `Acquire::Retries=3` with
15-second HTTP/HTTPS connection and data timeouts. Each update/install runs
under `timeout --kill-after=10s 180s`, allowing four times the observed roughly
45-second normal setup. An unavailable pinned version triggers one index
refresh and one exact-version install retry. An install that the bound stops
(exit 124 or 137, for example on a slow mirror) runs `dpkg --configure -a` and
is retried once; the downloaded `.deb` files stay in the archive mount (#5504).
An update timeout and other errors fail at once. Persistent failures report the
delta packages and fail the job.
The Tier 2 containers fetch from one mirror at a time and change mirrors
between attempts (#5510): first the runner's own (the first plain-HTTP,
non-security entry of the host's `/etc/apt/apt-mirrors.txt`, which the build
container mounts read-only at `/run/host-apt`), then `archive.ubuntu.com` and
`mirrors.edge.kernel.org`, over HTTP because the stock container has no CA
certificates before `Install Git`. A mirror that accepts connections and never
answers keeps `apt-get update` past its bound on every index file, and apt's
`mirror+file:` method never drops it, so a mirror list alone does not help.
`ci/host_apt_mirrors.py` holds the list and the rule; the build step carries
the same rule as shell, and `ci/test_tier2_apt_cache.py` checks both against
the same cases. The runtime delta's timeout retry fetches the index from the
next mirror. So does each retry of the build's `Install Tier 2 Packages`
(#5518): `Install Git` keeps its mirror order in `/etc/apt/ci-tier2-mirrors`,
and a retry moves from the mirror `Install Git` ended on to the next one, since
a mirror can answer the bootstrap and then serve the ~400 packages too slowly
for the install's 300 s bound. The security pocket keeps `security.ubuntu.com`.
The separate prepared release runtime is refreshed manually. Its producer is
`ci/tier2_setup_probe.py produce`, invoked by the existing `ci.yml`
`tier2-setup-producer` job; it is not the GHCR `tier2-image` job. Request a
refresh when the consumer logs show more than four delta packages (the fallback
limit remains sixteen). A maintainer performs these steps:
1. Dispatch the existing `ci.yml` on `master` with `tier2-setup-probe=true`:
`gh workflow run ci.yml --repo obs-rust/obs-studio --ref master -f tier2-setup-probe=true`.
This runs normal validation and the setup experiment; do not replace the
current runtime until both succeed.
2. Before their one-day retention expires, download `tier2-setup-image` and
`tier2-setup-metadata` from that run. The producer installs the new build's
exact `runtime-packages.txt` plus bootstrap tools into the pinned stock base,
commits the container, and saves the image. `bundle.json` records its image
ID, complete inventory, base, archive checksum/size and producer revision.
3. Publish a **new, unique prerelease** via the existing `obs-studio-libs`
pack/add catalogue process, as in
[obs-studio-libs#7](https://github.com/obs-rust/obs-studio-libs/pull/7).
Package the Docker-save contents with flavor `ubuntu26.04-docker` and platform
`linux/x86_64`; this is an OCI archive, not a host library prefix. Never
overwrite the October asset. If repacking changes the compressed bytes,
compute the checksum and size of the final published archive.
4. Open a PR updating `rust/tools/linux-validate/prepared-runtime.json`: use the
new immutable release URL, final archive checksum/size, `bundle.json` image
ID/base/full inventory/revision/run ID and new catalogue version. Retain
`platform: linux/amd64`. Run the runtime selection/delivery self-tests, then
qualify both complete OFF/ON suites through ordinary PR/queue validation,
checking `inventory_verified` and the remaining delta. Promote the release
and catalogue only after qualification, following the original rollout.
The consumer cannot publish or dispatch a refresh. No repository variable
change is required. Hosted GHCR selection remains deferred while the package
is private; an anonymous manifest probe alone does not guarantee a subsequent
job-container pull will succeed.
Prepared release runtimes first inspect the descriptor's pinned Docker image ID
and reuse an exact match. Dell runners use `/var/cache/obs-runner/assets` only
when that directory and the `/var/cache/obs-runner/.persistent-cache` file both
exist. Environment variables cannot bypass this check. Hosted runners without
the persistent marker and directory retain cold delivery.
Archive filenames are their SHA256 (no extension). Reads copy into the job
directory, verify size and SHA256, then refresh the cache entry's access time for
host GC. A miss downloads directly into `...part`, verifies it,
sets mode `0644`, and atomically renames it into place. Existing entries remain
untouched for host GC, including corrupt files another uid may own. The job uses
a verified local copy. Any cache I/O error, including an access-time permission
error, falls back to downloading into the job directory. Downloaded bytes and
loaded image IDs retain their integrity checks. Image and asset cache hits/misses
appear in the setup log. The host owner reports all six Dell runners restarted
with the HDD-backed mount deployed on 2026-11-18.
### Host Ubuntu package acquisition (#1269)
The existing Fast Gate, Qt frontend, full Ubuntu app and both Flatpak
saved-profile runtime jobs run
`sudo -E "$(command -v uv)" run --no-project ci/host_apt_mirrors.py` before
package work (the jobs that reach it before any other uv step add a
`setup-uv` step first, since the helper is Python; CI logic lives in Python,
not shell -- GEN-005, #962). It recognizes the
runner-image mirror list with Azure HTTP priority 1 and Ubuntu archive HTTPS
priority 2, then swaps those priorities. All URLs and security fallback remain
present. Missing, linked, duplicate or unfamiliar layouts keep their original
configuration; an actual rewrite failure fails the step. The helper needs no
download of its own beyond the uv setup the step already has.
Fast Gate, Qt and both runtime jobs use command-line acquire bounds of one retry and 15-second
HTTP/HTTPS timeouts, on both update and installation. Package lists, trust
checks, job limits and required tests remain unchanged. The motivation is the
observed Qt setup in run 39788036193: 104 MB took 19m25s with 347 ignored fetch
records before successful fallback transfers. Hosted outcomes must still be
measured; this observation is not a controlled speedup estimate or proof of
the underlying network fault.
### Optional Windows cache budget experiment (#1269)
Manual `ci.yml` dispatches accept `native-cache-probe` (default `false`).
Enabling it preserves the full dispatch validation and adds four clean full
Windows rebuilds per architecture after the normal app build. Use it only for
a planned cache experiment; PRs, queue runs, schedules and releases do not run
these additional rebuilds. No production cache limit changes automatically.
`ci/native_cache_probe.py` copies the completed build's compiler cache into
four isolated directories and compares `2G`, `350M`, `350M`, `2G` in that order.
Each trial starts from the same seed, explicitly cleans its own cache to its
limit, resets counters and invokes the existing Windows build preset with
`--clean-first`. The original cache and its publication policy are unchanged.
Four copies plus 1 GiB of free disk are required; insufficient disk or a failed
rebuild fails the experiment and preserves a failure report. Only successful
rebuilds are timing samples.
Each `native-cache-budget--` artifact contains `report.json`
with source/image, commands, preparation and rebuild times, filesystem bytes,
and literal ccache statistics/version plus machine-readable counters. The
probe verifies the effective cache directory and rejects rebuilds with no
cacheable C/C++ calls. The pinned ccache supports these inspection commands
in its [manual](https://ccache.dev/manual/4.14.1.html). Artifacts expire after two days;
record the useful numbers in the PR or issue comment before expiry; run
metadata is not tracked on `master` (#2686). Filesystem bytes
are not compressed GitHub archive sizes. Two samples per size from one runner
do not establish representative-day latency, repository retention, or a
universal size recommendation. Compare compile time and actual hits/misses
before deciding whether to change the production limit.
### Optional native release-cache build qualification (#1269)
Manual `ci.yml` dispatches accept `native-cache-reuse-source` (default empty).
Set it to a complete producer SHA only for a planned master qualification.
It uses the existing four native app builds, with no extra compiler unit or
test executable. Normal full-dispatch coverage runs unless the explicit
measurement-only mode below is selected. Do not combine
it with native transport publication or the Windows budget rebuild probe.
Each native runner captures its own compiler/SDK/configuration identity and
requires an exact-source release-cache hit with that profile before building.
The restored directory replaces the Actions compiler cache for this run;
neither compiler-cache save path publishes experimental state. A missing or
mismatched profile fails qualification rather than becoming a hit. Tokens
remain read-only in the native app jobs.
`ci/native_cache_freshness.py` temporarily inserts a source/run-specific marker
into an existing frontend log literal, then checks for that marker in the
installed main executable after the real build. It records source and binary
hashes. The always-run cleanup restores the exact original source bytes and
refuses to overwrite an unrelated edit. Packaging is disabled for these builds.
The overlay is experimental evidence, not a shipped source change or an app
runtime test. `native-build-reuse---` artifacts
retain identity, restoration, overlay, binary verification and cleanup reports
for one day; preserve useful results before expiry.
Archive restoration plus a fresh binary still does not prove compiler reuse
or a net performance benefit. Retain the native compiler statistics, actual
build/restore/setup times, failures and cold conditions, and compare costs
against an appropriate control before adopting a backend. Routine PRs,
queue runs, pushes, schedules and releases leave this input empty.
#### Restricting a planned native measurement (#1801)
`native-cache-measurement-only` defaults to false. Set it only for a trusted
`obs-rust/obs-studio` master `workflow_dispatch`, together with exactly one
existing native protocol: `native-cache-transport-probe=true` or a complete
`native-cache-reuse-source` producer SHA. An explicit full/release gate,
Windows budget probe, Flatpak option, runtime-reuse request or Tier 2 setup
probe conflicts with this mode and fails input validation. Conflicting
standalone Flatpak/setup jobs cannot start while native-only mode is set.
The mode retains both Windows architectures and both macOS targets, their
existing identity/integrity checks, actual builds and reuse-source freshness
overlays, requested transport publication/consumers, formatting, Fast Gate,
data validation and required-result aggregation. It omits unrelated Ubuntu,
Flatpak, cross-lint, native Rust/Tier 2 and Qt matrices. No job or workflow is
added. The existing experimental publication permission and exact-source/profile
requirements remain unchanged.
This is a scoped performance experiment, **not full-platform validation** or
backend adoption. Routine PRs, merge groups, master pushes, schedules, releases
and ordinary dispatches retain their selection. Check for an existing manual
master run before dispatch: the shared concurrency group can cancel it. State
the missing evidence, expected runner/storage cost and sample scope first;
preserve failures and mismatches, and do not repeat a whole workflow merely to
get green. No native run is needed to test the routing fixtures themselves.
For a separately planned producer or consumer, respectively:
```sh
gh workflow run ci.yml --repo obs-rust/obs-studio --ref master -f native-cache-measurement-only=true -f native-cache-transport-probe=true
gh workflow run ci.yml --repo obs-rust/obs-studio --ref master -f native-cache-measurement-only=true -f native-cache-reuse-source=COMPLETE_PRODUCER_SHA
```
These commands remain opt-in. Changing routing alone demonstrates no cache
speedup, successful transfer, source freshness or global capacity solution.
The [first native build-reuse attempt](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-native-cache-build-reuse.md)
failed qualification: Windows profiles were cold, and successful macOS app
builds lacked installed-binary freshness proof. Its retained evidence includes
the final failed gate and successful compatibility and protocol checks.
## Cross lint and Fast Gate overlap
The debug cross-lint matrix starts after scope and immutable-base admission,
alongside Fast Gate, as the release cross-lint lane already does (#4990).
It consumes no Fast Gate output or artifact; PR admission, cumulative queue
scope, targets, commands and CI Gate's required execution manifest are unchanged.
A failed or cancelled Fast Gate still blocks merging even if cross lint passes.
The November 17 sample of 30 completed `ci.yml` runs had 22 successful,
four failed, two skipped and two cancelled Fast Gates. A fixed-duration replay
removes 4.52–5.28 minutes from four of eleven successful hosted PR runs;
other heavy jobs mask the saving in the remaining seven PR runs and all
three successful queue runs. This is an overlap estimate, not a hosted
after-change measurement, and earlier runner allocation can change contention.
Cross lint now also spends runner time when Fast Gate fails: the observed
median combined debug-matrix execution was 11.87 hosted or 9.21 Dell
runner-minutes. All four failed Fast Gates used Dell runners, so full matrix
execution at that median would add about 36.83 runner-minutes across the
sample (1.23 per run), before cancellation savings. Successful runs add no work.
## Tier 2 execution and Fast Gate overlap
The Windows and macOS validators opt into `OBS_BUILD_NATIVE_TIER2` and build
the single `tier2-native` target. Its dependencies are the unchanged native
core/reference, cmocka registry and platform graphics/capture targets. Asking
the Visual Studio generator to build those roots separately starts MSBuild
once per root and revisits their shared dependencies (Refs #4996). The
aggregate preserves each existing compile/link recipe and test pass. Separate
configure/build markers make subsequent native job logs easier to measure;
macOS still redirects their detailed output to `build_rust.*.log`.
The complete OFF/ON test jobs start after successful Tier 2 compilation and
scope/proof checks, without waiting for Fast Gate. No artifact from Fast Gate
is consumed by these jobs. Fast Gate remains a required job in the reusable
workflow, and its failure/cancellation still makes the caller's required gate
fail even when both CTest suites pass. A missing/failed build or workflow
cancellation does not start tests. Partial Rust-only evidence conservatively retains Fast Gate and selected
Tier 2 work; complete client admission defers both to mandatory queue execution.
This removes a measured dependency wait: in the October 22 baseline, four
of nine successful PR runs and four of nine successful queue runs with both
jobs finished Fast Gate after the build, by up to 133/127 seconds. The median
opportunity across all nine in each event was zero. These are upper bounds
on the affected Linux path, not universal gate savings; native platform work
can still determine the final gate. Independent tests can consume runner time
on a change whose Fast Gate later fails. Record that extra failed-run cost
alongside successful latency during the #1694 post-rollout day.
## Linux Rust execution
The local gate's Linux Rust test commands use a checksum-pinned nextest
0.9.143 binary to schedule the existing category tests globally, with at most
four concurrent tests. A host with more cores can raise that bound with
`OBS_GATE_TEST_THREADS` (a positive integer); CI sets nothing, so CI keeps
four. The tool is installed in a local cache only when scope
selects Rust tests; there is no new Actions-cache writer. Other hosts keep the
existing Cargo runner. All commands still go through `soldr cargo`, with the
existing Rust wrapper bypass.
Nextest executes the same eight category binaries, not another set of test
targets. Cargo still runs documentation tests separately, including after a
unit-suite failure; neither failure can produce a passing lane. Scope applies
to both commands, and no retries mask a failure. The explicit
`ci/nextest.toml` configuration and runner installer are attested inputs and
proof surfaces. Workspace execution must discover tests; a scoped crate with
no test target retains Cargo's successful empty-suite behavior.
See the [experiment and limits](ci-speed-2026-10-22.md#rust-execution-schedule-across-existing-binaries)
for exact coverage and local timings. Native Windows/macOS workflow commands,
C tests, OFF/ON execution, source assertions and Rust compiler/cache settings
are unchanged.
### Rust timing observations in CI reports
`ci/cache_metrics.py --include-logs` records nextest and Cargo doctests as
separate command observations. It retains Cargo build/link summaries, time to
the first execution marker, the observed output span and nextest's explicitly
reported execution duration. These are distinct from full setup or process
runtime; missing markers remain unknown. Nextest passed/failed/skipped/not-run
counts are kept as reported, without inventing absent zeros or adding skipped
tests to `tests_run`. Separate Cargo result summaries retain doctest coverage.
The regression evidence includes a parsed real hosted run in
the snapshot `docs/ci-evidence/2026-10-22-nextest-log-observations.json`
(retired; at `c2af3f9c3`).
When recollecting into the same output directory, unchanged run metadata retains
its recorded historical comparison base. Later PR rebases or base-branch updates
must not silently reclassify a cached run. Updated run metadata still invalidates
the cache and fetches current job/attempt details.
### Manual Flatpak measurement
Use the existing manual workflow to observe the complete Flatpak job without
launching unrelated native application, Qt, Tier 2 and cross-lint matrices:
```sh
gh workflow run ci.yml --repo obs-rust/obs-studio --ref master -f flatpak-measurement-only=true
```
`flatpak-measurement-only` defaults to false and is accepted only for
`workflow_dispatch`. Ordinary PR, merge-group, push, schedule and release
selection is preserved. Format/Fast Gate remain, and the entire Flatpak job
is unchanged: setup, compilation, debug processing, export, validators,
pruning and cleanup all stay in its clock. Every Flatpak build starts cold
(no Actions cache since #1801 phase A). Keep other probe inputs off for a
routine observation; optional Flatpak qualification probes remain separate
extra work when explicitly requested.
This mode saves measurement runner time and waiting on unrelated jobs. Do not
count those omissions as a Flatpak build speedup. Record full job/source/cache
identities, failures and costs; do not restart a live observation on API lag.
Manual master dispatches share their existing cancellation group, so wait for
the entire preceding manual master workflow to finish before starting another.
### Flatpak cache retention after migration (#1801)
The production build restores one projected Actions archive containing
`.flatpak-builder/cache` and `.flatpak-builder/ccache`. A miss builds cold;
the old whole-builder and standalone compiler migration restores are retired.
Current builds reset counters after restoration and still execute the full
build, export and validators before trusted publication.
The obsolete standalone compiler family no longer reserves 200 MiB. The
[saved policy replay](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-flatpak-legacy-retirement.md)
records the declaration reduction and unchanged deletion plans. This snapshot
has no standalone entries to reclaim; global overcommit and native architecture
retention remain open in #1801.
The [allocation and version-retention follow-up](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-22-cache-allocation-followup.md)
maps all 25 remaining families, records overlapping publications and an actual
registry deletion across different host/container Actions versions, and links
the existing upstream identity defect. Its portable replay separates observed
deletions from hypothetical plans; global allocation remains unresolved.
# Zackees draft PR handoff — OBS repository only
Tracking issue: [#1845](https://github.com/obs-rust/obs-studio/issues/1845).
Snapshot: **2026-10-22 23:32 UTC**, master `582a4c3ed`.
The maintainer requested a handoff of Zackees's draft PRs in
`obs-rust/obs-studio`. Work is limited to this repository. Do not resume earlier
FastLED, fbuild, template, toolchain or other cross-repository tasks. This
handoff does not transfer another worker's active implementation claim.
## Current drafts
### #1723 — independent native architecture cache retention
- [PR](https://github.com/obs-rust/obs-studio/pull/1723), branch
`infra/1269-native-architecture-retention`.
- Verified head: `1f7f7944854e35114fdf3b94c4c80bd8e48fdaed`.
- Tracks [#1801](https://github.com/obs-rust/obs-studio/issues/1801) and
[#782](https://github.com/obs-rust/obs-studio/issues/782), under #1667.
The original #1269 is closed.
- **Hold: revise; do not merge unchanged.** Splitting Windows/macOS architecture
families prevents one architecture replacing another's seed, but does not
supply global capacity. Preserve the recorded deletion/replay evidence.
- The candidate's original arithmetic was 16,433,912,216 declared bytes against
10,737,418,240 bytes. Its body also records conditional later reservation
retirement. These are historical configuration calculations; recompute against
the actual current configuration before proposing adoption.
- Next: reconcile all live writers, architecture variants, growth, overlap and
qualified transport under #1801. Do not shrink working compiler caches merely
to fit declarations, raise the budget or adopt unqualified release transport.
### #1838 — CI performance handoff and native measurement scope
- [PR](https://github.com/obs-rust/obs-studio/pull/1838), branch
`infra/1801-native-measurement-scope`.
- Verified head: `72131b3a519b725d1a7a5d184611b3183ac387ac`.
- **Maintainer-paused: do not queue or automatically launch experiments.**
- Its detailed [handoff document at the captured head](https://github.com/obs-rust/obs-studio/blob/72131b3a519b725d1a7a5d184611b3183ac387ac/docs/ci-evidence/2026-10-22-ci-performance-handoff.md)
and compressed companion retain evidence, hashes, limitations and commands.
Use those rather than reconstructing experiments from this summary.
- Scope is default-off routing for a future native-cache measurement. Its
reported local checks passed; the latest check query found no pending/failed
checks. That does not remove the explicit maintainer hold or qualify a backend.
- Remaining subjects include capacity/version retention, AppImage publication
and freshness, strict native compiler/SDK matching, and full measurement costs.
Preserve failures and distinguish transfer/cache hits from actual compiler reuse.
### #1844 — native C++ language standards in the shared test graph
- [PR](https://github.com/obs-rust/obs-studio/pull/1844), branch
`infra/1332-native-language-standards`.
- Verified head: `6b6ed3a0db97c76fb8ba936ff6e7d97721361348`.
- Tracks [#1332](https://github.com/obs-rust/obs-studio/issues/1332).
- RED contract: mixed C/C++20 executable in the existing application test binary;
preserve C compilation, require C++ `consteval`/`std::bit_width` and ISO mode,
exercise both CMake and Cargo consumers, reject invalid standards.
- Reported local RED rejects the absent `cpp_standard` field. Initial RED commit
`bafc7a9b3`; the captured head tightens the CMake extension-property assertion.
- [PR run 39871147510](https://github.com/obs-rust/obs-studio/actions/runs/39871147510)
has failed Fast Gate and required CI Gate. Inspect actual logs and current
implementation ownership before making changes; do not infer all failure
details from the local RED description.
- Next implementation: carry typed C++ standards through the shared target and
both consumers, then migrate applicable unchanged Qt-free C++ tests. Preserve
all assertions, source/header contracts and the existing executable budget.
CMake remains authoritative; this does not complete #1332.
## Completed items that must not be restarted
- [#1772](https://github.com/obs-rust/obs-studio/pull/1772) merged as
`5208e989a3311f4cb295ff78e813af32465c4477` after refreshed native CI passed.
Its earlier macOS media-seek failure was a baseline issue fixed by #1775.
- [#1805](https://github.com/obs-rust/obs-studio/pull/1805) is merged. Captured
final head: `f6b0c25127aac5bc835cb0fd45fc71823d7b26e2`. Earlier running jobs and
partial test-graph inventories are historical; inspect merged source for the
current graph before continuing #1844.
- A duplicate local #1772 merge was never pushed: another worker published the
identical tree first. The temporary worktree/branch was removed after equality
verification. No unique implementation remains in that scratch checkout.
## Resume procedure
1. Read `AGENTS.md`, `.claude/skills/obs-worker/SKILL.md`, coordination and testing
policy, `docs/ci-tooling.md`, and `BUILD.md` when native sources/builds apply.
Read current issue claims and PR descriptions before choosing a unit.
2. Start clean and fetch/rebase onto `origin/master`. Use an owned branch; do not
overwrite another worker's checkout or fresh claim.
3. Query the direct PR API as well as individual PR records. A previous draft
search returned an empty list while direct records proved drafts still open.
```sh
gh api 'repos/obs-rust/obs-studio/pulls?state=open&per_page=100' \
--jq '[.[] | select(.draft and ((.user.login | ascii_downcase) == "zackees")) | {number,title,head:.head.sha}]'
gh pr view 1844 --repo obs-rust/obs-studio --json body,headRefOid,statusCheckRollup
gh pr view 1838 --repo obs-rust/obs-studio --json body,headRefOid,statusCheckRollup
gh pr view 1723 --repo obs-rust/obs-studio --json body,headRefOid,statusCheckRollup
```
Follow pagination if there are more than 100 open PRs. Revalidate each exact
head and any newly opened drafts; this document is a snapshot, not live state.
4. For a failure, inspect the current run/job log first. Re-poll confirmed live
handles; an observation timeout or inconsistent summary is not a terminal
result. Do not restart unchanged workflows to seek a passing result.
5. Implement only the chosen authorized unit, RED then GREEN, with required
native/differential/protocol coverage. Use `soldr cargo` and `uv run`/`uvx`.
Do not edit existing C/C++ tests or public headers to accommodate a port.
6. Keep #1723/#1838 held until their documented conditions are resolved. Do not
add workflows, dispatch expensive experiments, alter paid storage or bypass
merge gates as part of this handoff. Queue ready changes normally after the
actual required CI Gate passes.
## Handoff validation and limits
This change is documentation only. PR states, immutable heads, issue states and
check results above were queried directly during handoff. No application code,
test assertion, workflow, cache policy or external repository was changed.
No new build or expensive experiment was launched. This handoff does not claim
the migration, global capacity work or remaining drafts are complete.
# Fallback warning
Some features of OBS-Studio-Rust have a safe mode and a less safe fallback
mode. When the safe mode cannot work, the feature uses the fallback, so that
the user does not lose the feature. Examples:
| Feature | Safe mode | Fallback |
|---|---|---|
| Browser source (#1092) | Chromium sandbox | No sandbox |
| Streaming (#2205) | RTMPS | RTMP |
The fallback must never be silent (decision on #1092). This document gives
the rules for every fallback, and the shared code that applies them
(obs-rust/obs-studio#2218).
## Rules
1. Log the fallback at error level, once for each time it occurs. The log
line also goes to stderr.
2. Warn the user in a dialog. The dialog shows what fell back and why, and a
countdown. When the countdown ends after 3 seconds, the dialog accepts the
fallback. The countdown pauses while another modal dialog is open, so the
dialog never accepts unseen.
3. The dialog has an "Accept anyway" button. It has a Cancel button only when
the caller can stop instead of using the fallback. Then Cancel is the
default button.
4. Each fallback shows its dialog once in an OBS session. The log line comes
every time.
5. Do not show a dialog when the user cannot see it: before the main window
has loaded, and while another modal dialog is open (for example the
first-run wizard), the warning waits; with a hidden main window (OBS
started to the tray), the warning accepts at once.
6. Each dialog says: "This may become an error in a future version of OBS."
A fallback is a temporary help, not a supported mode.
7. Do not fall back when a security check fails. For example, a certificate
that does not verify is an error, not a reason to use RTMP.
## Wording
Every fallback uses the same words, so the user knows the case at once:
- **Title:** what runs, and without what. For example "Browser source
without the sandbox", "Streaming unencrypted (RTMP)".
- **Message:** what failed, what OBS does instead, and what the user can do
about it, in this order. One or two short sentences each.
- **Terms:** "sandbox" for the Chromium sandbox, "unencrypted" for a
connection without TLS. Do not use "insecure" or "unsafe mode".
- **Buttons:** "Accept anyway" and "Cancel". The frontend supplies them.
- **Id:** `.`, for example `browser.sandbox`,
`rtmp.unencrypted`. It is in the log line.
A new fallback uses this helper, not a dialog of its own. Existing
warnings change to this wording case by case.
## How to use it
A plugin calls `obs_frontend_warn_fallback()` from `obs-frontend-api.h`:
```c
static void sandbox_answer(void *param, bool accepted)
{
/* accepted: continue in the fallback mode. */
}
obs_frontend_warn_fallback("browser.sandbox", obs_module_text("SandboxFallback.Title"),
obs_module_text("SandboxFallback.Message"), false, sandbox_answer, data);
```
- `id` is a stable name. Use `.`.
- The caller translates `title` and `message`.
- `cb` is called once. While OBS runs, it is called on the UI thread and
never inside the call. Keep `param` valid until then. `cb` can be NULL.
- Without the OBS frontend (another host of the plugin), and after OBS has
begun to shut down, the call logs and calls `cb` with `true` inside the
call.
The API reference is in
[reference-frontend-api.rst](sphinx/reference-frontend-api.rst).
## Code
| Part | Location |
|---|---|
| Decisions: show or accept, what each end means, the countdown, the log line | `rust/obs-fallback-warning` (Rust, tested in its crate) |
| C ABI of the decisions | `frontend/utility/obs-fallback-warning.h`, linked through `rust/obs-frontend` |
| Queue: log at once, wait for the main window, one dialog at a time | `frontend/utility/FallbackWarning` |
| Dialog | `frontend/dialogs/OBSFallbackWarning` |
| API | `obs_frontend_warn_fallback()` in `frontend/api` and `OBSStudioAPI` |
Without the frontend's Rust (the C rollback build), the frontend logs and
accepts, and shows no dialog.
Tests: `test_fallback_warning_dialog`, `test_fallback_warning_queue` and
`test_frontend_warn_fallback` in `test/cmocka` (Linux).
# Feature sources
Other projects we can borrow features, UX and code from. Before copying code,
check that its license is compatible with GPL-2.0-or-later and keep its
copyright notice; borrowing an idea or a design needs neither.
| Project | License | What to borrow |
|---|---|---|
| [omacom/monologue](https://github.com/omacom/monologue) | MIT | See below |
## omacom/monologue
A Qt 6 / C++17 webcam recorder for Omarchy (Linux). Its record-then-edit flow
is much simpler than OBS's for a single camera take. Features worth copying:
- **Take editor after recording:** stop a take and it opens in a built-in
editor: split it into clips on a filmstrip, trim each clip with handles,
remove clips, undo and redo. Edits never touch the original file.
- **Pause marks:** pausing and resuming a take is recorded on the timeline,
and split points and trim handles snap to those marks.
- **Device memory by ID:** the camera and microphone are remembered by device
ID, and a missing device is reported instead of silently switching to
another one.
- **Automatic capture format:** picks the camera's highest advertised
resolution, preferring 30 fps at that resolution.
- **Microphone meter:** live level with peak hold and clipping indication,
still running while paused, without monitoring through the speakers.
- **Explicit "No audio" option** for silent recordings.
- **Atomic save** of the H.264/AAC MP4, keeping the original recording.
- **Keyboard-first controls:** Space records, pauses and resumes; Enter stops
and opens the editor; editor keys for split, remove, jump to the previous or
next pause, zoom and save.
# Features ledger
Everything OBS-Studio-Rust does differently from upstream OBS Studio, for a
user: new features, changed behavior, and fixed upstream bugs. A pull
request announces a change once; this file keeps the list (#1250).
It covers every pull request merged up to 2026-10-17 (#1250): 698 merged
pull requests were sorted, and CI, test, build, port and refactoring work
was left out.
## How to add an entry
A pull request with a user-visible change adds its line here, in the same
pull request ([coordination.md](rust-port/coordination.md), section 4).
User-visible means: new or changed behavior, a setting, UI, log output, a
protocol field, a supported platform or package, or a fix for a bug a user
can notice. CI, tests, ports with no change in behavior and refactors do
not get a line.
- Put the line in the area that fits, or add an area.
- One line per feature, not per pull request. A follow-up pull request adds
its link to the existing line, and updates the text if the behavior
changed.
- Write what changes for the user, not how the code works.
- Format:
```markdown
- **Short name.** What changes for the user. *Platforms*, merge date.
Issue [#N](https://github.com/obs-rust/obs-studio/issues/N), PRs
[#N](https://github.com/obs-rust/obs-studio/pull/N).
```
*Platforms* is `All`, or a list of `Linux`, `Windows` and `macOS`. The
merge date is the date of the first pull request that shipped the
feature (`YYYY-MM-DD`, UTC).
- A fixed upstream bug goes in [Fixed upstream bugs](#fixed-upstream-bugs),
in its area and in merge order. It has no bold name: the line starts with
the symptom that is gone, and ends with the upstream issue
(obsproject/obs-studio#N, obsproject/obs-websocket#N) when there is one.
- A fix for a bug that the fork itself added goes on the line of the
feature it fixes, not on a line of its own.
## Features
- **Hybrid Rust/C application build.** Completed Rust ports replace their C
equivalents in the normal application; unported components remain available.
Property parameter destructors observe the original parameter during replacement
(C API compatibility; [#1938](https://github.com/obs-rust/obs-studio/issues/1938),
[#1939](https://github.com/obs-rust/obs-studio/pull/1939)).
Property destructors that remove or add groups run each callback once, and a
removed group stays readable in its own destructor (C API compatibility;
[#1943](https://github.com/obs-rust/obs-studio/issues/1943)).
Settings retain valid JSON members when a plugin produces NaN or infinity,
and recover valid backups when local JSON contains invalid UTF-8.
*All*, 2026-10-21. Issue
[#1587](https://github.com/obs-rust/obs-studio/issues/1587), PR
[#1588](https://github.com/obs-rust/obs-studio/pull/1588). Plugin string
edits preserve converted strings even when their recorded capacity is zero.
Issue [#1941](https://github.com/obs-rust/obs-studio/issues/1941), PR
[#1945](https://github.com/obs-rust/obs-studio/pull/1945). Persistence fix:
issue [#1940](https://github.com/obs-rust/obs-studio/issues/1940), PR
[#1946](https://github.com/obs-rust/obs-studio/pull/1946).
Opening an unreadable config preserves its contents; failed reads keep the
C API's empty-config result. Issue
[#1942](https://github.com/obs-rust/obs-studio/issues/1942), PR
[#1944](https://github.com/obs-rust/obs-studio/pull/1944).
- Rust libobs process pipes fill reads across kernel pipe chunks, matching the C API on Linux and macOS.
- Failed libobs startup reports the initializer that failed; Linux X11
hotkey initialization reports a failed display connection and its display
name. *All* (X11 detail on Linux), 2026-10-17. Issue
[#1355](https://github.com/obs-rust/obs-studio/issues/1355).
### Headless and automation
- **MCP starts without X11.** The headless host uses an available Wayland
compositor or X server, and serves control requests without either display.
Video operations report unavailability when no display can create graphics.
*Linux*, 2026-11-09. Issue [#4464](https://github.com/obs-rust/obs-studio/issues/4464),
PR [#4466](https://github.com/obs-rust/obs-studio/pull/4466).
- **Bounded MCP waits.** Agents can wait for typed output/source/media/metric
conditions and request automatic waits on starts, without GUI interaction or
fixed sleeps. Timeouts return the last observation. *All*, 2026-11-09.
Issue [#4447](https://github.com/obs-rust/obs-studio/issues/4447),
PR [#4454](https://github.com/obs-rust/obs-studio/pull/4454).
- **Virtual device and media control.** MCP can start/stop Virtual Camera, inspect
its paired mic, restart media, inspect pipeline graphs and read/reset measured
stage counters. Unmeasured device/sync values stay null. *All* (device support
depends on the loaded plugin), 2026-11-09. Issue [#4446](https://github.com/obs-rust/obs-studio/issues/4446),
PR [#4452](https://github.com/obs-rust/obs-studio/pull/4452).
- **Typed MCP control.** Existing OBS MCP tools publish input and output schemas,
structured results and machine-readable domain errors. Read operations carry
annotations, and repeated output start/stop calls succeed with current state.
*All*, 2026-11-09. Issue [#4445](https://github.com/obs-rust/obs-studio/issues/4445),
PR [#4450](https://github.com/obs-rust/obs-studio/pull/4450).
- **`--disable-shutdown-check` works again.** After an unclean stop (power
loss, OOM killer, a hard stop of the VM or container), OBS starts without
the "Crash Detected" dialog and logs the unclean shutdown as a warning on
line 1. *All*, 2026-10-15. Issue
[#809](https://github.com/obs-rust/obs-studio/issues/809), PR
[#810](https://github.com/obs-rust/obs-studio/pull/810).
- **Settings from before OBS 31 are migrated.** Settings without
`LastVersion` no longer open the first-run wizard, which on a headless
display was hidden and disabled all outputs. *All*, 2026-10-15. Issue
[#815](https://github.com/obs-rust/obs-studio/issues/815), PR
[#816](https://github.com/obs-rust/obs-studio/pull/816).
- **Refused output starts are logged.** A start of streaming, recording, the
replay buffer or the virtual camera that is refused while outputs are
disabled writes a log line, where before obs-websocket replied "success"
and nothing happened. *All*, 2026-10-15. Issue
[#817](https://github.com/obs-rust/obs-studio/issues/817), PR
[#818](https://github.com/obs-rust/obs-studio/pull/818).
- **obs-websocket changes are saved.** Requests that change the scene
collection (volume, mute, input settings, transforms and others) save it,
so a crash or a hard stop no longer loses them. *All*, 2026-10-16. Issue
[#811](https://github.com/obs-rust/obs-studio/issues/811), PR
[#812](https://github.com/obs-rust/obs-studio/pull/812).
- **`obs-stream-rust` command-line tool.** Starts, stops and toggles the
stream of a running OBS and shows its status through obs-websocket v5,
with password support, IPv6 hosts and a `--json` flag for scripts. *All*,
2026-10-10. Issue [#96](https://github.com/obs-rust/obs-studio/issues/96),
PRs [#30](https://github.com/obs-rust/obs-studio/pull/30),
[#276](https://github.com/obs-rust/obs-studio/pull/276),
[#277](https://github.com/obs-rust/obs-studio/pull/277).
### GPU status
- **GPU acceleration light.** A light in the status bar shows whether OBS
renders on a hardware GPU (green), in software on a machine without a GPU
(yellow), or in software although a GPU is present, after a graphics
failure or over the frame budget (red). Clicking it explains the state and
quotes the graphics log lines, including the D3D11 adapter selected on Windows. Legacy Mesa Software Rasterizer and Apple
Software Renderer are recognized as CPU rendering. The startup log and
`GetStats.gpuAcceleration` in obs-websocket have the same state
([gpu-status.md](gpu-status.md)). *All*, 2026-10-15. Issues
[#846](https://github.com/obs-rust/obs-studio/issues/846),
[#942](https://github.com/obs-rust/obs-studio/issues/942),
[#943](https://github.com/obs-rust/obs-studio/issues/943),
[#944](https://github.com/obs-rust/obs-studio/issues/944),
[#946](https://github.com/obs-rust/obs-studio/issues/946),
[#1003](https://github.com/obs-rust/obs-studio/issues/1003),
[#1005](https://github.com/obs-rust/obs-studio/issues/1005),
[#1225](https://github.com/obs-rust/obs-studio/issues/1225), PRs
[#890](https://github.com/obs-rust/obs-studio/pull/890),
[#894](https://github.com/obs-rust/obs-studio/pull/894),
[#929](https://github.com/obs-rust/obs-studio/pull/929),
[#958](https://github.com/obs-rust/obs-studio/pull/958),
[#960](https://github.com/obs-rust/obs-studio/pull/960),
[#963](https://github.com/obs-rust/obs-studio/pull/963),
[#1006](https://github.com/obs-rust/obs-studio/pull/1006),
[#1010](https://github.com/obs-rust/obs-studio/pull/1010),
[#1018](https://github.com/obs-rust/obs-studio/pull/1018),
[#1035](https://github.com/obs-rust/obs-studio/pull/1035),
[#1178](https://github.com/obs-rust/obs-studio/pull/1178),
[#1226](https://github.com/obs-rust/obs-studio/pull/1226).
- **`GPU: x%` label.** The light shows the render GPU's utilization next to
the CPU usage, or `CPU rendering` in software; obs-websocket gets the same
reading. NVML process sampling keeps a separate window for each GPU and PID,
and falls back to the older API when a GPU cannot use the newer one.
Sources: NVML for NVIDIA and `gpu_busy_percent` for AMD on
Linux, IOKit on macOS, the PDH `GPU Engine` counters on Windows (every
vendor). *All*, 2026-10-17. Issues
[#1020](https://github.com/obs-rust/obs-studio/issues/1020),
[#1021](https://github.com/obs-rust/obs-studio/issues/1021),
[#1022](https://github.com/obs-rust/obs-studio/issues/1022),
[#1024](https://github.com/obs-rust/obs-studio/issues/1024),
[#1025](https://github.com/obs-rust/obs-studio/issues/1025),
[#1026](https://github.com/obs-rust/obs-studio/issues/1026), PRs
[#1194](https://github.com/obs-rust/obs-studio/pull/1194),
[#1195](https://github.com/obs-rust/obs-studio/pull/1195),
[#1198](https://github.com/obs-rust/obs-studio/pull/1198),
[#1222](https://github.com/obs-rust/obs-studio/pull/1222),
[#1224](https://github.com/obs-rust/obs-studio/pull/1224),
[#1228](https://github.com/obs-rust/obs-studio/pull/1228),
[#1233](https://github.com/obs-rust/obs-studio/pull/1233),
[#1236](https://github.com/obs-rust/obs-studio/pull/1236),
[#1238](https://github.com/obs-rust/obs-studio/pull/1238),
[#1262](https://github.com/obs-rust/obs-studio/pull/1262),
[#1264](https://github.com/obs-rust/obs-studio/pull/1264).
### Video capture
- **V4L2 settings updates preserve the running camera format.** Changing a live
option keeps the negotiated resolution and framerate, including when their
setting is Unchanged. Timeout and automatic reset changes apply while capture
continues. *Linux*, pending merge. Issue
[#3506](https://github.com/obs-rust/obs-studio/issues/3506), PR
[#3525](https://github.com/obs-rust/obs-studio/pull/3525).
- **X11 screen capture keeps the graphics thread moving.** Screen capture
repeats the last completed picture while the X server prepares the next one,
instead of waiting for each image and cursor reply. Capture adds one graphics
tick of latency. *Linux*, pending merge. Issue
[#3204](https://github.com/obs-rust/obs-studio/issues/3204), PR
[#3517](https://github.com/obs-rust/obs-studio/pull/3517).
- The Video Capture Device (PipeWire) list shows only video sources, not
audio devices or other node kinds, and every row has a name: a camera whose
node has no description is labelled from its nickname or node name instead of
being hidden. *Linux*, pending merge. Issues
[#3041](https://github.com/obs-rust/obs-studio/issues/3041),
[#3065](https://github.com/obs-rust/obs-studio/issues/3065), PRs
[#3047](https://github.com/obs-rust/obs-studio/pull/3047),
[#3066](https://github.com/obs-rust/obs-studio/pull/3066).
- **reject duplicate inputs after scaler reentry.** One disconnect removes a video input even when scaler creation reenters registration. *All*, 2026-10-20. Issue [#1529](https://github.com/obs-rust/obs-studio/issues/1529), PR [#1534](https://github.com/obs-rust/obs-studio/pull/1534).
- Virtual camera output resumes at the correct byte after a short device write. *Linux*.
- **Busy V4L2 cameras are recovered.** When another process holds a V4L2
camera, OBS names that process, offers a Force Camera button and opens the
camera when it is free. *Linux*, 2026-10-15. Issue
[#799](https://github.com/obs-rust/obs-studio/issues/799), PR
[#800](https://github.com/obs-rust/obs-studio/pull/800).
- **Camera-busy warning: Close it, Ignore, Always allow.** When a V4L2 camera
OBS uses is busy, or another program opens it while OBS has it, OBS names
every program holding it (app and PID) in a window of the main window and
waits for a click: Close it (SIGTERM, then SIGKILL after 2 s), Ignore, or
Always allow (never warn about that app again; kept in the user config).
One warning per camera and app at a time, at most once a minute after an
answer; each one is logged. It never takes the focus while OBS is in the
background. *Linux*, 2026-11-05. Issue
[#3724](https://github.com/obs-rust/obs-studio/issues/3724), PR
[#3725](https://github.com/obs-rust/obs-studio/pull/3725).
- **Camera-busy warning names a holder found on a retry, and Quit asks
first.** When the first look misses the program holding a busy camera,
the next retry that finds it replaces the "another program" warning with
one that names it (app and PID). The Close it button is now "Quit "
("Quit zoom") and asks for confirmation before it ends the program; it is
offered only for programs of the same user. *Linux*, 2026-11-06. Issue
[#3726](https://github.com/obs-rust/obs-studio/issues/3726).
- **Option to not restore V4L2 camera controls.** A V4L2 camera source has
the option "Restore camera controls when the camera connects", so an
external PTZ controller can keep control of the camera. *Linux*,
2026-10-12. Issues
[#385](https://github.com/obs-rust/obs-studio/issues/385),
[#976](https://github.com/obs-rust/obs-studio/issues/976), PRs
[#386](https://github.com/obs-rust/obs-studio/pull/386),
[#977](https://github.com/obs-rust/obs-studio/pull/977).
- **Video scaler buffer ownership.** A video input replaced during scaling cannot inherit the old registration's scaler buffers. *All*, 2026-10-20. Issue [#1540](https://github.com/obs-rust/obs-studio/issues/1540), PR [#1544](https://github.com/obs-rust/obs-studio/pull/1544).
### Audio
- JACK timestamp fallback uses the active server sample rate instead of an uninitialized zero rate. *Linux*.
- Unchanged JACK source settings no longer restart audio capture. *Linux*.
- Stopping ALSA capture before its worker starts no longer revives the worker and hangs shutdown. *Linux*.
- **ALSA captures 24-bit devices at 24 bits.** A USB audio interface that
offers `S24_3LE` and `S16_LE` is opened at 24 bits, where before OBS tried
16 bits first. *Linux*, 2026-10-16. Issue
[#1103](https://github.com/obs-rust/obs-studio/issues/1103), PR
[#1104](https://github.com/obs-rust/obs-studio/pull/1104).
- **ALSA audio comes back after a USB replug.** An Audio Capture Device
(ALSA) source whose USB device is unplugged and plugged in again captures
again within a few seconds, instead of staying silent with its capture
thread at full CPU. The log says once that the device went away and once
that it captures again. *Linux*, 2026-10-29. Issue
[#2924](https://github.com/obs-rust/obs-studio/issues/2924), PR
[#2933](https://github.com/obs-rust/obs-studio/pull/2933).
- **NDI audio on its own clock stays in the mix.** An NDI source whose sender
stamps its audio and video on different clocks, such as NDI Test Patterns
through DistroAV, is heard in the mix and in recordings again. Since
2026-10-13 its audio dropped out for minutes at a time, a source recording
of it started late or not at all, and OBS could hang at quit with a
source-record filter on it. *All*, pending merge. Issue
[#3747](https://github.com/obs-rust/obs-studio/issues/3747), PR
[#3752](https://github.com/obs-rust/obs-studio/pull/3752).
- **NDI audio on its own clock stays clean on a busy machine.** Audio stamped
on a clock apart from its video keeps a timing of its own, so the video's
frames no longer re-place each packet by when it arrived: on a loaded CPU
the tone of such a source no longer breaks up into gaps and overlaps
(73–89 % of the program instead of 93 %). *All*, pending merge. Issue
[#3747](https://github.com/obs-rust/obs-studio/issues/3747).
- **NDI audio on its own clock stays in sync with a fast sender.** Audio
whose sender clock runs faster than the computer's no longer plays later
and later (about 0.2 s an hour at 50 ppm, without a limit): OBS takes its
timing again when it runs more than 70 ms ahead. Each such step skips
about 60 ms of audio, once every 23 minutes at 50 ppm; a smooth
correction is [#4182](https://github.com/obs-rust/obs-studio/issues/4182).
*All*, pending merge. Issue
[#4143](https://github.com/obs-rust/obs-studio/issues/4143).
- **NDI audio on its own clock follows a drifting sender smoothly.** For audio
stamped on a clock apart from its video, OBS turns on the resampler's clock
drift compensation by itself: it takes out a drift of up to about 0.1 %
(1000 ppm, a real sender is about 50 ppm) by resampling, so the delay stays
the same and the 60 ms steps every 23 minutes stop. Only a faster drift
still steps at 70 ms. Audio on its video's clock (cameras, microphones,
media files) is not changed. *All*, pending merge. Issue
[#4182](https://github.com/obs-rust/obs-studio/issues/4182).
### Encoding, streaming and recording
- **Missing encoder reasons.** When a profile names a VA-API or Intel QSV
encoder this OBS does not have, the Missing Encoders dialog says why
instead of "Unknown", and how to fix it. For VA-API it names the cause:
no GPU render device, an NVIDIA GPU (use NVENC), no access to the render
device (with the `usermod` command), or no VA-API driver installed (with
the install command for Debian/Ubuntu, Fedora or Arch), and logs it as a
`VAAPI:` line. On Linux, for QSV it reads the Intel GPU's device id and
names the runtime that generation needs (Intel Media SDK up to Ice Lake,
oneVPL GPU runtime from Tiger Lake) with its install command, or says the
GPU is too old for Quick Sync, or that the iHD driver or render access is
missing, and logs it as a `QSV:` line
([#1925](https://github.com/obs-rust/obs-studio/issues/1925)). A build
without QSV (the AppImage) says to pick another encoder for Streaming and
Recording. *All*, pending merge. Issues
[#1720](https://github.com/obs-rust/obs-studio/issues/1720),
[#1862](https://github.com/obs-rust/obs-studio/issues/1862), PRs
[#1841](https://github.com/obs-rust/obs-studio/pull/1841),
[#1872](https://github.com/obs-rust/obs-studio/pull/1872).
- **QSV probe log.** On Linux, the OBS log has one `QSV probe:` line per GPU
render device, with whether VA-API opened it, its driver and whether it
encodes HEVC and AV1. That is what decides which Quick Sync encoders
appear, so a log from real Intel hardware is enough to check and pin that
decision in a test. *Linux*, pending merge. Issue
[#1863](https://github.com/obs-rust/obs-studio/issues/1863), PR
[#1879](https://github.com/obs-rust/obs-studio/pull/1879).
- **Missing source types.** When a loaded scene collection has sources whose
plugin this OBS does not have, a "Missing Source Types" warning lists them
instead of leaving them blank without a word: browser sources (not in this
build yet, with the Window Capture workaround), VLC, or the plugin type,
with how many sources each. The sources keep their settings. Safe mode only
logs it. *All*, pending merge. Issue
[#1865](https://github.com/obs-rust/obs-studio/issues/1865), PR
[#1883](https://github.com/obs-rust/obs-studio/pull/1883).
- **let buffered queues fit one chunk.** Large buffered recording chunks complete when the configured queue limit is smaller than a chunk. *All*, 2026-10-20. Issue [#1526](https://github.com/obs-rust/obs-studio/issues/1526), PR [#1527](https://github.com/obs-rust/obs-studio/pull/1527).
- **FFmpeg output retry and encoder errors.** FFmpeg output can retry after a connection attempt that finishes before thread creation returns, and missing FFmpeg video encoders report an error using initialized message storage. *All*, pending merge. Split from PR [#1464](https://github.com/obs-rust/obs-studio/pull/1464).
- **FFmpeg muxer error handling.** The FFmpeg recording muxer reports seek positions and rejects unsupported seeks correctly, cleans up safely when the recording file cannot be opened, exits with an error when writing or reading a packet fails, and restores argument ownership when opening a split recording fails (prevents a Windows double free). *All*, pending merge. Split from PR [#1464](https://github.com/obs-rust/obs-studio/pull/1464).
- **Codec availability follows the build.** MP4 and MOV outputs do not advertise
HEVC when it was disabled at build time. *Linux*, pending merge. PR
[#1333](https://github.com/obs-rust/obs-studio/pull/1333).
- **wake buffered producers after disk errors.** Buffered recording producers wake and report failure after a disk write error. *All*, 2026-10-20. Issue [#1533](https://github.com/obs-rust/obs-studio/issues/1533), PR [#1536](https://github.com/obs-rust/obs-studio/pull/1536).
- **Enhanced Broadcasting encoder controls.** Enhanced Broadcasting stream
settings can turn off B-frames and lookahead and set the preset and
tuning, for lower latency than the service settings give, and show a
read-only preview of the encoding ladder the service sends. *All*,
2026-10-11. Issue [#19](https://github.com/obs-rust/obs-studio/issues/19),
PRs [#162](https://github.com/obs-rust/obs-studio/pull/162),
[#181](https://github.com/obs-rust/obs-studio/pull/181).
- **Encrypted streaming where the service supports it.** Twitch, Vimeo,
niconico, BoxCast, Bitmovin, Eventials and EventLive.pro stream over RTMPS
(port 443) instead of plain RTMP, on every server checked to accept it;
existing profiles switch too, with no setting to change. The nanoStream
Cloud / bintu global ingest and global transcoding ingest use their verified
RTMPS endpoints on port 1937; regional hosts stay unchanged
([#2216](https://github.com/obs-rust/obs-studio/issues/2216),
PR [#3800](https://github.com/obs-rust/obs-studio/pull/3800)). Restream.io's
Autodetect host (`live.restream.io`) also uses its verified RTMPS endpoint
on port 1937; its regional hosts stay unchanged (#2216). If the encrypted
connection cannot be made, the shared fallback warning ("Streaming
unencrypted (RTMP)") counts down three seconds and then streams to the same
server over plain RTMP, unless you cancel; the fallback is written to the
log and to stderr. Without trusted root certificates on the system, the
warning says so and suggests installing the system's CA certificates. A
server certificate that does not verify stops the start instead. Custom servers are unchanged. *All*, pending merge. Issue
[#2205](https://github.com/obs-rust/obs-studio/issues/2205).
### Sources and filters
- **Bundled default font for text.** The Text (FreeType 2) source uses the
bundled JetBrainsMono Nerd Font as its default on every OS. *All*,
2026-10-16. Issue
[#1012](https://github.com/obs-rust/obs-studio/issues/1012), PR
[#1016](https://github.com/obs-rust/obs-studio/pull/1016).
- **Chromium 156 with H.264/AAC for browser sources.** Linux x86_64 builds
use CEF 8078 (Chromium 156), built by obs-rust with proprietary codecs,
so browser sources and panels play H.264/AAC media. *Linux*, 2026-10-23.
Issue [#1864](https://github.com/obs-rust/obs-studio/issues/1864), PR
[#1948](https://github.com/obs-rust/obs-studio/pull/1948).
- **Chromium sandbox for browser sources on Linux and macOS.** Browser
sources and panels run in Chromium's sandbox where it can work. On Linux:
with unprivileged user namespaces, or with a `chrome-sandbox` helper that
is setuid root. On macOS: each helper app sandboxes itself (Seatbelt) with
`libcef_sandbox.dylib` from the CEF framework in the app. Where it can't
(on Linux, OBS runs as root or neither is available; on macOS, the library
is missing), they run without it as before, and OBS shows the fallback
warning with the cause and what to change. *Linux*, 2026-10-25; *macOS*,
pending merge. Windows: [#2379](https://github.com/obs-rust/obs-studio/issues/2379).
Issue [#1092](https://github.com/obs-rust/obs-studio/issues/1092), PRs
[#2378](https://github.com/obs-rust/obs-studio/pull/2378),
[obs-rust/obs-browser#3](https://github.com/obs-rust/obs-browser/pull/3),
[obs-rust/obs-browser#8](https://github.com/obs-rust/obs-browser/pull/8),
[obs-rust/obs-browser#12](https://github.com/obs-rust/obs-browser/pull/12).
### Scenes and UI
- **accept C hexadecimal prefixes in config integers.** Configuration integer values accept the optional hexadecimal prefix after the sign, matching C. *All*, 2026-10-20. Issue [#1531](https://github.com/obs-rust/obs-studio/issues/1531), PR [#1532](https://github.com/obs-rust/obs-studio/pull/1532).
- Remux queue path and processing-state changes notify views with valid cell ranges. *All*.
- The remux queue updates its insertion row consistently when processing starts and finishes. *All*.
- **Wayland global hotkeys.** On Wayland, hotkeys and push-to-talk work
while another window has focus, through the desktop's GlobalShortcuts
portal. Each shortcut is named by its actions in the desktop's shortcut
list, Settings > Hotkeys shows whether global hotkeys work (with a marker
on each key) and can open the desktop's shortcut editor. Cancelling the
desktop's dialog after only a shortcut's description changed — an action
moved onto an already-approved key — keeps the approved keys bound with
the description they were approved with, instead of unbounding every key
until Ask again. *Linux*,
2026-10-11. Issues
[#240](https://github.com/obs-rust/obs-studio/issues/240),
[#255](https://github.com/obs-rust/obs-studio/issues/255),
[#347](https://github.com/obs-rust/obs-studio/issues/347),
[#408](https://github.com/obs-rust/obs-studio/issues/408),
[#474](https://github.com/obs-rust/obs-studio/issues/474),
[#790](https://github.com/obs-rust/obs-studio/issues/790), PRs
[#245](https://github.com/obs-rust/obs-studio/pull/245),
[#256](https://github.com/obs-rust/obs-studio/pull/256),
[#348](https://github.com/obs-rust/obs-studio/pull/348),
[#409](https://github.com/obs-rust/obs-studio/pull/409),
[#475](https://github.com/obs-rust/obs-studio/pull/475),
[#791](https://github.com/obs-rust/obs-studio/pull/791),
[#2669](https://github.com/obs-rust/obs-studio/pull/2669).
- **Help → Discord opens the OBS Rust server.** The Help menu's Discord
item opens the OBS Rust Discord, where this build's bugs and questions
belong, instead of upstream OBS Studio's server. *All*, 2026-10-24.
Issue [#2097](https://github.com/obs-rust/obs-studio/issues/2097).
- **Fallback warning.** When a feature falls back to a less safe mode so
that it keeps working (for example a browser source without the Chromium
sandbox), OBS logs it at error level and shows a warning with a 3-second
countdown that accepts the fallback, once per session. Plugins call
`obs_frontend_warn_fallback()` ([fallback-warning.md](fallback-warning.md));
the browser source uses it when the Chromium sandbox can't work. *All*,
2026-10-25. Issue
[#2218](https://github.com/obs-rust/obs-studio/issues/2218), PRs
[#2238](https://github.com/obs-rust/obs-studio/pull/2238),
[obs-rust/obs-browser#8](https://github.com/obs-rust/obs-browser/pull/8).
- **No upstream release notes or donor list downloads.** The What's New
dialog, which showed upstream OBS Studio's release notes from
obsproject.com, is off by default (`ENABLE_WHATSNEW=OFF`); a build that
turns it on reads `whatsnew.json` from the obs-rust release assets
([#1882](https://github.com/obs-rust/obs-studio/issues/1882)). The About
box no longer downloads upstream's Patreon list; it links to the
obs-rust repository instead. Two obsproject.com data feeds stay on
because they are data only and useful: the streaming-service list
(`plugins/rtmp-services/data/package.json`) and the game-capture
compatibility list (`plugins/win-capture/data/package.json`).
`ci/test_no_upstream_runtime_feeds.py` keeps the allow-list. *All*,
2026-10-21. Issue
[#1732](https://github.com/obs-rust/obs-studio/issues/1732).
### Performance
- **Volume meters repaint only when they change.** The audio mixer's meters
no longer repaint 60 times a second while the mixer is hidden, OBS is
minimized or every source is silent; a meter stops about 20 s after its
last sound, when its peak hold falls back. *All*, 2026-10-17. Issue
[#1281](https://github.com/obs-rust/obs-studio/issues/1281), PR
[#1307](https://github.com/obs-rust/obs-studio/pull/1307).
- **Faster launch on NVIDIA machines.** 4.3 times faster to the main window
and 19 % less memory on an NVIDIA streaming machine (see the README): the
VAAPI probe skips decode-only drivers, the NVENC test result is reused
while the driver does not change, the AppImage loads only NVIDIA's EGL
vendor, and the GPU status probe runs on a thread. *Linux*, 2026-10-17.
Issues [#1168](https://github.com/obs-rust/obs-studio/issues/1168),
[#1170](https://github.com/obs-rust/obs-studio/issues/1170),
[#1171](https://github.com/obs-rust/obs-studio/issues/1171),
[#1172](https://github.com/obs-rust/obs-studio/issues/1172), PRs
[#1175](https://github.com/obs-rust/obs-studio/pull/1175),
[#1176](https://github.com/obs-rust/obs-studio/pull/1176),
[#1177](https://github.com/obs-rust/obs-studio/pull/1177),
[#1178](https://github.com/obs-rust/obs-studio/pull/1178).
- **Settings load and save faster.** Storing and reloading scene collections,
profiles and source settings no longer takes about a third longer than the
original C code: the JSON round trip is 28-32 % faster than before. *All*,
2026-10-19. Issue
[#1452](https://github.com/obs-rust/obs-studio/issues/1452), PR
[#1461](https://github.com/obs-rust/obs-studio/pull/1461).
- **Formatted UI text builds faster.** Messages that substitute `$1`..`$4`
values no longer rescan and rebuild the string once per value: 27 % faster
for a short message and 5 % faster for a 4 KB one, both now ahead of the
original C code. *All*, 2026-10-21. Issue
[#1296](https://github.com/obs-rust/obs-studio/issues/1296), PR
[#1619](https://github.com/obs-rust/obs-studio/pull/1619).
### Stability
- **PipeWire capture connection failures return cleanly.** A failed capture connection no longer risks hanging OBS while its capture thread starts. *Linux*, pending merge. Issue [#3594](https://github.com/obs-rust/obs-studio/issues/3594).
- **Capture sources start enabled.** Audio capture started by a source's create callback sees its initialized enabled state and flags; source creation no longer rewrites unchanged flags while capture is running. *All*, pending merge. Issue [#3505](https://github.com/obs-rust/obs-studio/issues/3505).
- **A frozen macOS Screen Capture says so in the log.** When the source
stops receiving frames, one warning every 30 s names the gap in seconds
and whether frames stopped arriving or are arriving but cannot be
published; the last frame stays on screen and the recording continues.
*macOS*, pending merge. Issue
[#2223](https://github.com/obs-rust/obs-studio/issues/2223).
- **OBS ends when a plugin blocks its exit.** When OBS has finished its
shutdown but the process does not end within 10 s (for example, a
plugin's static destructor waits for a thread that never stops), OBS
writes `exit-watchdog: exit did not finish in 10 s ...` to its log and
ends with exit code 124, instead of staying in the background without a
window. *Linux, macOS*, pending merge. Issue
[#4065](https://github.com/obs-rust/obs-studio/issues/4065).
- **The exit watchdog names the plugin.** The line names the library OBS
waits in and the plugin that loaded it, also a library a plugin loaded
itself, for example `... is blocking in libremidi.so.4 (loaded by
advanced-scene-switcher.so); ending the process`. *Linux, macOS*,
pending merge. Issue
[#4525](https://github.com/obs-rust/obs-studio/issues/4525). On
*Windows x64* the line names the DLL too, also when a DLL blocks while
Windows unloads it at exit: the helper process walks OBS's stack from
outside. Issue
[#4589](https://github.com/obs-rust/obs-studio/issues/4589).
- **The exit watchdog on Windows.** When a plugin DLL blocks while Windows
unloads it at exit (for example, its static destructor waits for a
signal that never comes), OBS still ends after 10 s, with the same
`exit-watchdog: ...` line in its log and exit code 124. A small helper
process, `obs-exit-watchdog.exe` next to `obs64.exe`, starts with OBS
(log: `Exit watchdog: helper process started`) and ends it from outside.
*Windows*, pending merge. Issue
[#4589](https://github.com/obs-rust/obs-studio/issues/4589).
- Repeated null-output encoding sessions reclaim complete stop threads. *All*.
- **No swscale warning for every JPEG.** Loading a JPEG image (Image
Source, Image Slide Show) no longer logs FFmpeg's "deprecated pixel
format used, make sure you did set range correctly" once per image or
slide; the colours are unchanged. *All*, pending merge. Issue
[#2334](https://github.com/obs-rust/obs-studio/issues/2334).
- **preserve empty item types for defaults.** Empty settings items retain their type when an incompatible default is supplied. *All*, 2026-10-20. Issue [#1528](https://github.com/obs-rust/obs-studio/issues/1528), PR [#1530](https://github.com/obs-rust/obs-studio/pull/1530).
- Callback parameters that exactly fill a fixed calldata buffer are preserved. *All*.
- Signal handlers release their storage when the last reference-holding callback removes itself. *All*.
- Global signal callbacks can disconnect themselves during delivery. *All*.
- Callbacks that emit nested signals can still remove the currently executing callback. *All*.
- Recursive emission of a signal no longer skips remaining subscribers after a callback removes itself. *All*.
- Signal callbacks can register additional callbacks and then remove themselves safely. *All*.
- Global signal callbacks can register additional global callbacks and then remove themselves safely. *All*.
- Global signal callbacks that emit nested signals or disconnect other global callbacks no longer skip or remove the next global callback. *All*.
- **Diagnostics when video fails to start.** When video fails to start on
Wayland, the log shows the EGL error and the display variables, and OBS
cleans up without leaks. *Linux*, 2026-10-13. Issue
[#633](https://github.com/obs-rust/obs-studio/issues/633), PR
[#655](https://github.com/obs-rust/obs-studio/pull/655).
- **Slow GPU usage sources do not stall the label.** After a slow reading
the `GPU: x%` label is updated less often (up to every 30 s), a reading
that is too old shows `GPU: n/a` with "The GPU reading is late.", and a
source that is slow three times in a row is not asked again in that
session, with one log line. *All*, 2026-10-17. Issue
[#1022](https://github.com/obs-rust/obs-studio/issues/1022), PR
[#1287](https://github.com/obs-rust/obs-studio/pull/1287).
- **Recordings no longer hold the stream's connection or the QSV device.**
A recording started while streaming no longer keeps a copy of the RTMP
connection in its muxer, nor of the QSV encoder's GPU device on Linux,
and a VA-API or QSV device that has no driver is closed again.
*Linux, macOS*, pending merge. Issue
[#2305](https://github.com/obs-rust/obs-studio/issues/2305).
- **Profiles with the same name are all listed.** Importing a profile
named like an existing one gives it a name of its own (for example
"Name2"), and two profile folders with the same name both show up in
the Profile menu, the second under a unique name with a warning in the
log; before, one of them was hidden and could not be selected, renamed
or removed. *All*, pending merge. Issue
[#2382](https://github.com/obs-rust/obs-studio/issues/2382).
- **QSV encoders release the GPU when they stop.** Each QSV encoder
start on Linux, including a failed one, no longer leaks the Intel VPL
loader and session; a start that fails no longer keeps the VA display
and the GPU device open. *Linux*, pending merge. Issue
[#2393](https://github.com/obs-rust/obs-studio/issues/2393).
- **Failed QSV starts release what they took.** A QSV encoder start
whose Intel VPL session can't be created no longer leaks the VPL
loader, and on Linux a failed frame allocation no longer keeps its VA
surfaces and textures. *All*, pending merge. Issue
[#2396](https://github.com/obs-rust/obs-studio/issues/2396).
### Platforms and packages
- **Signed Windows releases.** Every executable, DLL and Python module in the
Windows release ZIP, and the MSI installer once it ships, is signed with the
project's Azure Artifact Signing certificate; stable releases fail rather
than publish an unsigned binary. *Windows*, pending merge.
- **Windows BETA MSI installer.** Each Windows release also ships an
`OBS-Studio-Rust BETA` MSI for x64 and arm64 with an install folder choice, a
Start menu entry and a clean uninstall; the zip stays the portable option.
*Windows*, pending merge. Issue
[#3476](https://github.com/obs-rust/obs-studio/issues/3476).
- **Logs and crash reports stay on your computer.** OBS-Studio-Rust no
longer sends logs or crash reports to obsproject.com and has no log
analyzer button. Help > Log Files > Upload and the crash prompt open the
file's folder and ask you to attach it to a new issue at
github.com/obs-rust/obs-studio/issues. *All*, 2026-10-21. Issue
[#1731](https://github.com/obs-rust/obs-studio/issues/1731).
- **report buffered close errors when copying files.** File copies report buffered close failures instead of success for truncated output. *Linux, macOS*, 2026-10-20. Issue [#1537](https://github.com/obs-rust/obs-studio/issues/1537), PR [#1538](https://github.com/obs-rust/obs-studio/pull/1538).
- **Own app identity.** The fork runs as OBS-Studio-Rust with its own logo,
settings folder (`obs-studio-rust`) and version, next to the upstream OBS
version it is based on, in the window title, log, About dialog,
`--version` and package metadata. On first run it copies the upstream OBS
settings without changing them. Plugins still see a valid OBS version.
On macOS the browser source's helper apps take the app's name too, so
adding a browser source no longer crashes OBS. *All*, 2026-10-10. Issues
[#111](https://github.com/obs-rust/obs-studio/issues/111),
[#631](https://github.com/obs-rust/obs-studio/issues/631),
[#632](https://github.com/obs-rust/obs-studio/issues/632),
[#1087](https://github.com/obs-rust/obs-studio/issues/1087),
[#2386](https://github.com/obs-rust/obs-studio/issues/2386), PRs
[#67](https://github.com/obs-rust/obs-studio/pull/67),
[#112](https://github.com/obs-rust/obs-studio/pull/112),
[#510](https://github.com/obs-rust/obs-studio/pull/510),
[#515](https://github.com/obs-rust/obs-studio/pull/515),
[#657](https://github.com/obs-rust/obs-studio/pull/657),
[#706](https://github.com/obs-rust/obs-studio/pull/706),
[#1088](https://github.com/obs-rust/obs-studio/pull/1088),
[#2390](https://github.com/obs-rust/obs-studio/pull/2390),
[obs-rust/obs-browser#9](https://github.com/obs-rust/obs-browser/pull/9).
- **Daily beta packages.** A beta is published every day as the latest
release: an AppImage for Linux, zips for Windows x64 (with the Visual C++
runtime) and ARM64, and DMGs for Apple silicon and Intel Macs. *All*,
2026-10-13. Issues
[#626](https://github.com/obs-rust/obs-studio/issues/626),
[#627](https://github.com/obs-rust/obs-studio/issues/627),
[#628](https://github.com/obs-rust/obs-studio/issues/628), PRs
[#639](https://github.com/obs-rust/obs-studio/pull/639),
[#642](https://github.com/obs-rust/obs-studio/pull/642),
[#664](https://github.com/obs-rust/obs-studio/pull/664),
[#679](https://github.com/obs-rust/obs-studio/pull/679).
- **OBS-Studio-Rust 1.0 stable release.** The certified 1.0.0 release is available; the crate version is now
1.0.1 so daily `1.0.1-beta.` builds sort after it. A
maintainer dispatch of `release-rust.yaml` with `stable=true` publishes
the next stable tag (`obs-studio-rust-v`) from master through every gate of the daily beta
(builds, Tier 2, packaged-app smoke tests, AppImage), ready to certify. Its
macOS `CFBundleVersion` is the UTC build date, so Sparkle offers it over the
earlier certified beta. *All*, 2026-11-01.
- **Flatpak bundle with each release.** Every beta has an
`OBS-Studio-Rust--linux-x86_64.flatpak` next to the .deb and the
AppImage. It installs as `io.github.obs_rust.OBSStudioRust` beside
upstream's Flatpak, and the release gate installs that file and runs it
with a saved screen capture, camera, microphone and browser profile before
it ships. *Linux (Flatpak)*, pending merge. Issue
[#2400](https://github.com/obs-rust/obs-studio/issues/2400).
- **AppImage for most Linux distributions.** The AppImage is built on glibc
2.28 and uses the host's GPU and VA-API drivers, so it starts and encodes
in hardware on older and current distributions. It bundles PipeWire, finds
the host's CA certificates (HTTPS works on Debian, Ubuntu, Arch and
Fedora), and does not load the plugins of a distribution's OBS on the same
machine. *Linux*, 2026-10-13. Issues
[#426](https://github.com/obs-rust/obs-studio/issues/426),
[#498](https://github.com/obs-rust/obs-studio/issues/498),
[#621](https://github.com/obs-rust/obs-studio/issues/621),
[#625](https://github.com/obs-rust/obs-studio/issues/625),
[#926](https://github.com/obs-rust/obs-studio/issues/926),
[#1084](https://github.com/obs-rust/obs-studio/issues/1084),
[#1085](https://github.com/obs-rust/obs-studio/issues/1085), PRs
[#437](https://github.com/obs-rust/obs-studio/pull/437),
[#499](https://github.com/obs-rust/obs-studio/pull/499),
[#650](https://github.com/obs-rust/obs-studio/pull/650),
[#722](https://github.com/obs-rust/obs-studio/pull/722),
[#927](https://github.com/obs-rust/obs-studio/pull/927),
[#1227](https://github.com/obs-rust/obs-studio/pull/1227),
[#1234](https://github.com/obs-rust/obs-studio/pull/1234).
- **.deb version is the release version.** A release .deb's package
version is the OBS-Studio-Rust version (`1:0.1.0~beta.20261024`), not
upstream's `git describe` string, so `dpkg -l` matches the About box and
each daily installs as an upgrade. *Linux*, 2026-10-24. Issue
[#2299](https://github.com/obs-rust/obs-studio/issues/2299).
- **WHIP streaming in the AppImage.** The AppImage ships obs-webrtc and its
libdatachannel, so WHIP appears in Settings > Stream > Service. *Linux*,
2026-10-23. Issue [#1744](https://github.com/obs-rust/obs-studio/issues/1744),
PR [#1871](https://github.com/obs-rust/obs-studio/pull/1871).
- **AppImage decodes alpha WebM and VP9-encodes with libvpx 1.17.0.** The
bundled FFmpeg takes libvpx 1.17.0 instead of 1.14.1 — older than the
1.16.0 the AppImage had before — so the alpha-WebM decode path (Media
Source and Stinger transitions) and Custom FFmpeg Output's libvpx-vp9
encoder carry CVE-2026-2447's fix and the 1.17 decoder fixes. *Linux
(AppImage)*, pending merge. Issue
[#1134](https://github.com/obs-rust/obs-studio/issues/1134), PR
[#20](https://github.com/obs-rust/obs-studio-libs/pull/20).
- **AppImage names a missing libwayland-egl.** On a host without
libwayland-egl.so.1, the AppImage says which package to install
(libwayland-egl1 on Debian and Ubuntu) instead of "Failed to initialize
video: Graphics module not found". *Linux (AppImage)*, pending merge.
Issue [#2298](https://github.com/obs-rust/obs-studio/issues/2298).
- **AppImage names a missing libGLX.** On a host without libGLX.so.0, the
AppImage says which package to install (libglx0 on Debian and Ubuntu)
instead of the dynamic loader's "error while loading shared libraries".
*Linux (AppImage)*, pending merge. Issue
[#2337](https://github.com/obs-rust/obs-studio/issues/2337).
- **NVENC in the AppImage on NixOS without appimage-run.** Run directly
through nix-ld, the AppImage adds NixOS's driver libraries
(`/run/opengl-driver/lib`) to nix-ld's search path, so NVENC finds the
NVIDIA driver instead of reporting "NVENC not supported". *Linux
(AppImage, NixOS)*, pending merge. Issue
[#891](https://github.com/obs-rust/obs-studio/issues/891).
- **AppImage starts on NixOS Wayland.** The AppImage points its keyboard
library at the host's keyboard data (`/etc/X11/xkb` on NixOS) when
`/usr/share/X11/xkb` is missing, so Qt's Wayland plugin no longer crashes
at start with "failed to create xkb context". *Linux (AppImage, NixOS)*,
pending merge. Issue
[#2437](https://github.com/obs-rust/obs-studio/issues/2437).
- **Builds with Qt 6.8.** The frontend builds against distribution Qt 6.8,
for example on Debian 13. *Linux*, 2026-10-16. Issue
[#1015](https://github.com/obs-rust/obs-studio/issues/1015), PR
[#1017](https://github.com/obs-rust/obs-studio/pull/1017).
- **Rust libobs.** Parts of libobs are ported to Rust with the same
exported symbols as the C libobs. It began as an opt-in
`libobs-with-rust` build; since #1588 the hybrid Rust/C `libobs` is the
application default (see "Hybrid Rust/C application build"), and the
C-only `libobs-c-reference` is built only on request for tests. *All*,
2026-10-13. Issues
[#4](https://github.com/obs-rust/obs-studio/issues/4),
[#453](https://github.com/obs-rust/obs-studio/issues/453),
[#1065](https://github.com/obs-rust/obs-studio/issues/1065), PRs
[#454](https://github.com/obs-rust/obs-studio/pull/454),
[#1086](https://github.com/obs-rust/obs-studio/pull/1086).
- **No updates from upstream OBS Studio on macOS.** The macOS app no
longer checks upstream's update feed, so it can't offer to replace itself
with upstream OBS Studio. Its in-app updater stays off until OBS-Studio-Rust
has its own feed. *macOS*, 2026-10-22. PR
[#1727](https://github.com/obs-rust/obs-studio/pull/1727).
- **In-app updates from certified OBS-Studio-Rust releases.** The Windows
and macOS updaters are on and offer only certified releases from
obs-rust/obs-studio, never a daily beta or upstream OBS Studio. Daily betas
are GitHub pre-releases; a maintainer certifies one, which attaches an
RSA-signed update manifest and EdDSA-signed Sparkle appcasts and makes it
the Latest release. Only a daily whose release run passed every job and
that has been out at least two days can be certified (#1757). Windows downloads the release ZIP, checks its SHA-256
against the signed manifest, installs it and restarts. *Windows, macOS*,
2026-10-22. PR [#1742](https://github.com/obs-rust/obs-studio/pull/1742).
- **AppImage updates follow certified releases.** The AppImage's embedded
update information (AppImageUpdate, `.zsync` deltas) points at the
certified Latest release, like the Windows and macOS updaters, instead of
the daily `continuous` build. *Linux (AppImage)*, 2026-10-23. Issue
[#1881](https://github.com/obs-rust/obs-studio/issues/1881).
- **Opt-in nightly updates.** Settings > General > Updates > Update Channel
offers **Nightly** next to **Stable** (the default). On Nightly, the
Windows and macOS updaters offer each day's build as soon as it passes the
release gate, from a signed feed on the rolling `continuous` pre-release,
instead of waiting for a certified release. Switching back to Stable never
downgrades. *Windows, macOS*, 2026-10-22. Issue
[#1759](https://github.com/obs-rust/obs-studio/issues/1759).
- **Hybrid daily builds ship as nightlies before release approval.** The
daily OBS-Studio-Rust pre-release, the `continuous` AppImage and the
nightly update feed publish while the hybrid release approval is pending.
Certifying a release (Latest, the stable feed) still needs the maintainer's
approved `hybrid-release-evidence.json` and dispatch. *All platforms*,
2026-10-22. Issue [#1811](https://github.com/obs-rust/obs-studio/issues/1811).
- **Releases ship on dispatch with automated gates only.** Nightlies always
publish the hybrid build; a public release is published when the maintainer
dispatches certify and the automated CI gates pass. The manual
`hybrid-release-evidence.json` approval is gone; regressions are fixed
forward and covered by new automated tests. *All platforms*, 2026-10-22.
Issue [#1818](https://github.com/obs-rust/obs-studio/issues/1818).
- **Main window title names OBS Studio Rust.** The title bar reads "OBS Studio
Rust ": the release version, or for development builds the newest
`obs-studio-rust-v*` tag plus `-dev+-g` (or `dev` without a
tag). Profile, scene collection, safe mode and portable mode still follow;
`--version` and Help > About keep the upstream base version.
*All platforms*, 2026-10-23. Issue [#1983](https://github.com/obs-rust/obs-studio/issues/1983).
- **A hung recording share can't stall obs-websocket.** Free disk space
answers within 200 ms: one query per path runs at a time, and while a
network share hangs, callers get its last value (0 before the first). So
clients polling `GetStats` no longer fill obs-websocket's worker pool and
stop every request and event. *All platforms*, 2026-10-25.
Issue [#1345](https://github.com/obs-rust/obs-studio/issues/1345).
- **The .deb brings its desktop helpers.** It recommends xdg-utils and
xdg-desktop-portal with a backend, so on a minimal Ubuntu install Show
Recordings, log and dialog links, and Wayland capture work after
`apt install`; it suggests v4l2loopback-dkms for the virtual camera.
*Linux*, 2026-10-24. Issue [#2301](https://github.com/obs-rust/obs-studio/issues/2301).
- **Software centres link to obs-rust.** The Linux AppStream metainfo names
obs-rust as developer and points its homepage, bug tracker and source links
at obs-rust/obs-studio, and the .deb's Homepage and Maintainer follow, so
"Report an issue" in GNOME Software or KDE Discover reaches this project.
*Linux*, 2026-10-24. Issue [#2302](https://github.com/obs-rust/obs-studio/issues/2302).
- **The .deb installs next to the distribution's OBS.** On Linux the
helpers are `obs-studio-rust-ffmpeg-mux` and `obs-studio-rust-nvenc-test`,
so `apt install` no longer fails over `/usr/bin/obs-nvenc-test` when
Ubuntu's obs-studio is installed, in either order.
*Linux*, 2026-10-24. Issue [#2296](https://github.com/obs-rust/obs-studio/issues/2296).
## Fixed upstream bugs
Bugs inherited from OBS Studio (and obs-websocket) that are fixed here, by
area.
### obs-websocket
- Deleting a scene in the Scenes dock sends SceneListChanged once, not
twice. *All*, 2026-10-13. Issue
[#534](https://github.com/obs-rust/obs-studio/issues/534), PR
[#535](https://github.com/obs-rust/obs-studio/pull/535), upstream
[obsproject/obs-websocket#979](https://github.com/obsproject/obs-websocket/issues/979).
- Setting the Studio Mode T-Bar through the frontend API (obs-websocket
SetTBarPosition) moves the T-Bar, and releasing it no longer cancels the
transition. *All*, 2026-10-13. Issue
[#549](https://github.com/obs-rust/obs-studio/issues/549), PR
[#550](https://github.com/obs-rust/obs-studio/pull/550), upstream
[obsproject/obs-studio#11372](https://github.com/obsproject/obs-studio/issues/11372).
- Removing the current profile now sends ProfileListChanged, and
obs-websocket RemoveProfile removes the current profile without leaving a
confirmation dialog open on the OBS machine. *All*, 2026-10-13. Issue
[#568](https://github.com/obs-rust/obs-studio/issues/568), PR
[#569](https://github.com/obs-rust/obs-studio/pull/569), upstream
[obsproject/obs-websocket#1267](https://github.com/obsproject/obs-websocket/issues/1267).
- obs-websocket SetSceneItemTransform accepts the transform that
GetSceneItemTransform returns, with 0 bounds and OBS_BOUNDS_NONE. *All*,
2026-10-13. Issue
[#540](https://github.com/obs-rust/obs-studio/issues/540), PR
[#589](https://github.com/obs-rust/obs-studio/pull/589), upstream
[obsproject/obs-websocket#1299](https://github.com/obsproject/obs-websocket/issues/1299),
[obsproject/obs-studio#13124](https://github.com/obsproject/obs-studio/issues/13124).
- obs-websocket GetSourceScreenshot labels jpg and other screenshots with
the correct MIME type, for example image/jpeg. *All*, 2026-10-13. Issue
[#523](https://github.com/obs-rust/obs-studio/issues/523), PR
[#652](https://github.com/obs-rust/obs-studio/pull/652), upstream
[obsproject/obs-websocket#1298](https://github.com/obsproject/obs-websocket/issues/1298).
- obs-websocket CreateProfile and RemoveProfile answer after the profile
list has changed, so the next request sees the new profiles. *All*,
2026-10-15. Issue
[#804](https://github.com/obs-rust/obs-studio/issues/804), PR
[#805](https://github.com/obs-rust/obs-studio/pull/805), upstream
[obsproject/obs-studio#1283](https://github.com/obsproject/obs-studio/issues/1283).
- A Parallel request batch returns each result with its own requestType and
requestId, so clients get the correct data. *All*, 2026-10-16. Issue
[#813](https://github.com/obs-rust/obs-studio/issues/813), PR
[#1074](https://github.com/obs-rust/obs-studio/pull/1074), upstream
[obsproject/obs-studio#1317](https://github.com/obsproject/obs-studio/issues/1317).
- The Session Duration column in WebSocket Server Settings keeps counting
after the first minute instead of going blank. *All*, 2026-10-17. Issue
[#1116](https://github.com/obs-rust/obs-studio/issues/1116), PR
[#1145](https://github.com/obs-rust/obs-studio/pull/1145), upstream
[obsproject/obs-studio#1208](https://github.com/obsproject/obs-studio/issues/1208).
- GetSourceScreenshot and SaveSourceScreenshot of a 10-bit or 12-bit source
return the colors that OBS shows, not a much darker picture. *All*,
2026-10-17. Issue
[#1141](https://github.com/obs-rust/obs-studio/issues/1141), PR
[#1146](https://github.com/obs-rust/obs-studio/pull/1146), upstream
[obsproject/obs-websocket#1213](https://github.com/obsproject/obs-websocket/issues/1213),
[obsproject/obs-websocket#1257](https://github.com/obsproject/obs-websocket/issues/1257),
[obsproject/obs-websocket#1298](https://github.com/obsproject/obs-websocket/issues/1298).
- GetCurrentProgramScene no longer aborts OBS when the program scene was
removed in Studio Mode; it returns null names and UUIDs. *All*,
2026-10-17. Issue
[#1254](https://github.com/obs-rust/obs-studio/issues/1254), PR
[#1256](https://github.com/obs-rust/obs-studio/pull/1256), upstream
[obsproject/obs-studio#1349](https://github.com/obsproject/obs-studio/issues/1349).
- obs-websocket GetInputPropertiesListPropertyItems no longer aborts OBS
when a list item has no name or no value, such as the placeholder at the
top of the macOS Screen Capture display and application lists; those items
are reported with empty strings. *All*, 2026-10-23. Issue
[#1266](https://github.com/obs-rust/obs-studio/issues/1266), PR
[#1996](https://github.com/obs-rust/obs-studio/pull/1996), upstream
[obsproject/obs-studio#13905](https://github.com/obsproject/obs-studio/issues/13905).
- A RequestBatch with the Parallel execution type no longer crashes OBS
when its last request finishes. *All*, 2026-10-23. PR
[#1996](https://github.com/obs-rust/obs-studio/pull/1996).
- obs-websocket GetStats reports each client's CPU usage since that client's
own previous GetStats, not since the last one from any client, and clients
polling at the same time no longer race on one shared state. *All*,
2026-10-23. Issue
[#1346](https://github.com/obs-rust/obs-studio/issues/1346), PR
[#1996](https://github.com/obs-rust/obs-studio/pull/1996).
- The CPU usage OBS reports (the Stats dock, obs-websocket GetStats) is
at most 100 %. Polled in quick succession it could read above 100 %,
because the process and wall times tick at 10 ms. *All*, 2026-11-01.
Issue [#3367](https://github.com/obs-rust/obs-studio/issues/3367).
- obs-websocket RemoveInput removes the scene items of the input at once,
also in scenes that are not on program or preview, so GetSceneItemList
and GetInputList no longer show the removed input. *All*, 2026-10-24.
Issue [#1613](https://github.com/obs-rust/obs-studio/issues/1613), PR
[#2196](https://github.com/obs-rust/obs-studio/pull/2196).
### Video capture
- I420 recordings and raw video output no longer have sheared chroma when
the output width is four pixels past a multiple of eight (for example 1364)
with the OpenGL renderer. *Linux, macOS*, pending merge. Issue
[#4126](https://github.com/obs-rust/obs-studio/issues/4126), PR
[#4132](https://github.com/obs-rust/obs-studio/pull/4132).
- A macOS display capture no longer keeps showing the last frame after its
display is unplugged, moved to another port or reconfigured: it notices the
display configuration change, waits for the display it was created for, and
recreates its stream when that display is back, logging the absence once.
It never switches to a different display. *macOS*, pending merge. Issue
[#2838](https://github.com/obs-rust/obs-studio/issues/2838).
- **deliver video after a callback disconnects.** A video callback that disconnects itself no longer causes the next subscriber to miss a frame. *All*, 2026-10-20. Issue [#1535](https://github.com/obs-rust/obs-studio/issues/1535), PR [#1539](https://github.com/obs-rust/obs-studio/pull/1539).
- An XComposite window capture no longer asks the X server whether its
window exists once or twice per frame while holding the graphics
context; it keeps the window's state from X events (map, unmap,
destroy) and checks with the server at most once a second, so a busy or
remote X server no longer stalls rendering. *Linux*, 2026-10-17. Issue
[#1356](https://github.com/obs-rust/obs-studio/issues/1356), PR
[#1377](https://github.com/obs-rust/obs-studio/pull/1377).
- An XComposite window capture whose window is minimized or on another
workspace no longer searches every window and rebuilds its pixmap every
2 s; the search backs off to 30 s and runs at once when the window maps
again or the settings change. *Linux*, 2026-10-17. Issue
[#1357](https://github.com/obs-rust/obs-studio/issues/1357), PR
[#1366](https://github.com/obs-rust/obs-studio/pull/1366).
- After a PipeWire restart, PipeWire screen capture and PulseAudio audio
sources reconnect automatically; the screen shows its last frame until
capture returns. *Linux*, 2026-10-10. Issue
[#108](https://github.com/obs-rust/obs-studio/issues/108), PR
[#109](https://github.com/obs-rust/obs-studio/pull/109).
- A capture device that reports more audio buffers than OBS supports no
longer corrupts the audio frame; the extra buffers are dropped with a log
warning. *macOS*, 2026-10-11. Issue
[#92](https://github.com/obs-rust/obs-studio/issues/92), PR
[#124](https://github.com/obs-rust/obs-studio/pull/124).
- Removing or closing a macOS screen or audio capture (ScreenCaptureKit)
source no longer crashes OBS. *macOS*, 2026-10-11. Issue
[#93](https://github.com/obs-rust/obs-studio/issues/93), PR
[#125](https://github.com/obs-rust/obs-studio/pull/125).
- A V4L2 Video Capture Device runs at the selected frame rate, and changing
camera controls such as zoom or focus no longer restarts the capture.
*Linux*, 2026-10-11. Issue
[#201](https://github.com/obs-rust/obs-studio/issues/201), PR
[#202](https://github.com/obs-rust/obs-studio/pull/202), upstream
[obsproject/obs-studio#13388](https://github.com/obsproject/obs-studio/issues/13388),
[obsproject/obs-studio#13896](https://github.com/obsproject/obs-studio/issues/13896).
- V4L2 devices whose input capabilities cannot be read are closed again, so
cameras no longer stop opening with "more than 16 video devices". *Linux*,
2026-10-11. Issue
[#203](https://github.com/obs-rust/obs-studio/issues/203), PR
[#204](https://github.com/obs-rust/obs-studio/pull/204), upstream
[obsproject/obs-studio#5422](https://github.com/obsproject/obs-studio/issues/5422).
- The Linux AppImage includes the audio control helper needed by the Virtual
Microphone, including on desktops without PulseAudio command-line tools.
- The Linux Virtual Camera also sends OBS's audio mix to an "OBS Virtual
Microphone" (a PulseAudio/PipeWire pipe source loaded with `pactl`), so
video calls and podcast recorders get picture and sound in sync from one
output; without `pactl` it runs video-only as before, and one left by an
OBS that crashed is removed at the next start. *Linux*, 2026-10-29.
Issues [#3011](https://github.com/obs-rust/obs-studio/issues/3011),
[#3014](https://github.com/obs-rust/obs-studio/issues/3014).
- The macOS Virtual Camera also sends the chosen audio track to an "OBS
Virtual Microphone" input device (a HAL plug-in in
`/Library/Audio/Plug-Ins/HAL`) that meeting apps list as a microphone;
without the plug-in it runs video-only and says so. OBS.app ships the
plug-in and installs or updates it with one admin prompt the first time
the camera starts with audio. *macOS*, 2026-11-01.
Issues [#3184](https://github.com/obs-rust/obs-studio/issues/3184),
[#3341](https://github.com/obs-rust/obs-studio/issues/3341).
- The Virtual Camera settings dialog can turn the OBS Virtual Microphone off
and pick which audio track it sends; both are saved with the scene
collection and shown only where the virtual camera sends audio.
*Linux*, 2026-10-31.
Issue [#3182](https://github.com/obs-rust/obs-studio/issues/3182).
- A first launch with `--startvirtualcam` (or `--startstreaming`,
`--startrecording`, `--startreplaybuffer`) no longer opens the
Auto-Configuration Wizard, which could deadlock with the output's failure
box (both modal, neither dismissable). The wizard stays in the Tools menu.
2026-11-01. Issue [#3325](https://github.com/obs-rust/obs-studio/issues/3325).
- The Linux OBS Virtual Microphone follows the Virtual Camera dialog (on or
off, and which audio track), and a second OBS running at the same time gets
its own "OBS Virtual Microphone (2)" instead of a duplicate. *Linux*,
2026-10-31. Issues [#3182](https://github.com/obs-rust/obs-studio/issues/3182),
[#3185](https://github.com/obs-rust/obs-studio/issues/3185).
- The Linux OBS Virtual Microphone talks to the sound server through libpulse,
so it works without `pactl` installed; `pactl` is only a fallback. *Linux*,
2026-11-08. Issue [#4057](https://github.com/obs-rust/obs-studio/issues/4057).
- A silent OBS Virtual Microphone left by an OBS that died is cleared when the
Virtual Camera starts even with the microphone turned off, and the log says
when `pactl` itself cannot run. *Linux*, 2026-11-06.
Issue [#3797](https://github.com/obs-rust/obs-studio/issues/3797).
- The Linux virtual microphone, now listed as "OBS Audio", stays in sync with
the Virtual Camera picture: each frame waits until its audio has gone out
(audio used to trail by ~0.7 s), and an app that links later hears current
audio instead of a stale backlog. `ci/vcam_av_sync.py` measures the offset
over obs-websocket. *Linux*, 2026-11-08.
Issue [#4087](https://github.com/obs-rust/obs-studio/issues/4087).
- The OBS Virtual Microphone no longer turns into noise or swaps channels
after the sound server falls behind: a packet the pipe takes only part of
is finished before the next one. *Linux*, 2026-10-31.
Issues [#3180](https://github.com/obs-rust/obs-studio/issues/3180),
[#3185](https://github.com/obs-rust/obs-studio/issues/3185).
- The OBS Virtual Microphone works in the Flatpak build: its pipe lives in
a runtime folder the sandbox shares with the sound server, and an OBS that
is still running keeps its microphone even when another one starts.
*Linux*, 2026-10-31.
Issue [#3179](https://github.com/obs-rust/obs-studio/issues/3179).
- The Windows Virtual Camera also sends the chosen audio track to a virtual
audio cable (VB-Audio "CABLE Input" or "VoiceMeeter Input"), so a meeting
app that picks the cable's output as its microphone gets OBS's sound; with
no cable installed it runs video-only and says so. The Virtual Camera
dialog picks the device (Automatic chooses the cable). *Windows*, 2026-10-31.
Issue [#3183](https://github.com/obs-rust/obs-studio/issues/3183).
- Starting or stopping the Linux Virtual Camera no longer freezes OBS when
the sound server stops answering: each `pactl` call for the OBS Virtual
Microphone gives up after 3 seconds and the camera runs video-only.
*Linux*, 2026-10-31.
Issue [#3181](https://github.com/obs-rust/obs-studio/issues/3181).
- The Linux virtual camera sends a correct picture to a v4l2loopback device
with a fixed format of a different size. *Linux*, 2026-10-11. Issue
[#212](https://github.com/obs-rust/obs-studio/issues/212), PR
[#213](https://github.com/obs-rust/obs-studio/pull/213), upstream
[obsproject/obs-studio#12081](https://github.com/obsproject/obs-studio/issues/12081).
- A PipeWire screen capture no longer crashes OBS when a portal reply
arrives while the source is removed. *Linux*, 2026-10-11. Issue
[#246](https://github.com/obs-rust/obs-studio/issues/246), PR
[#247](https://github.com/obs-rust/obs-studio/pull/247), upstream
[obsproject/obs-studio#13809](https://github.com/obsproject/obs-studio/issues/13809).
- PipeWire screen capture no longer draws a black square around the cursor
with Rec. 2100 (HDR) output. *Linux*, 2026-10-12. Issue
[#328](https://github.com/obs-rust/obs-studio/issues/328), PR
[#329](https://github.com/obs-rust/obs-studio/pull/329), upstream
[obsproject/obs-studio#13350](https://github.com/obsproject/obs-studio/issues/13350).
- A V4L2 camera keeps capturing after a corrupt MJPEG or H.264 frame instead
of stopping until OBS restarts. *Linux*, 2026-10-12. Issue
[#330](https://github.com/obs-rust/obs-studio/issues/330), PR
[#331](https://github.com/obs-rust/obs-studio/pull/331), upstream
[obsproject/obs-studio#12521](https://github.com/obsproject/obs-studio/issues/12521).
- You can change a V4L2 camera's resolution, frame rate or format while
recording; the camera no longer stays busy. *Linux*, 2026-10-12. Issue
[#339](https://github.com/obs-rust/obs-studio/issues/339), PR
[#340](https://github.com/obs-rust/obs-studio/pull/340), upstream
[obsproject/obs-studio#12508](https://github.com/obsproject/obs-studio/issues/12508).
- Saved V4L2 camera controls (zoom, focus, exposure) are applied when OBS
starts, when the camera reconnects and when a script changes them.
*Linux*, 2026-10-12. Issues
[#363](https://github.com/obs-rust/obs-studio/issues/363),
[#459](https://github.com/obs-rust/obs-studio/issues/459), PRs
[#364](https://github.com/obs-rust/obs-studio/pull/364),
[#460](https://github.com/obs-rust/obs-studio/pull/460), upstream
[obsproject/obs-studio#11633](https://github.com/obsproject/obs-studio/issues/11633),
[obsproject/obs-studio#3003](https://github.com/obsproject/obs-studio/issues/3003).
- A PipeWire camera that sends NV12 shows its picture instead of green bands
or a crash. *Linux*, 2026-10-12. Issue
[#390](https://github.com/obs-rust/obs-studio/issues/390), PR
[#391](https://github.com/obs-rust/obs-studio/pull/391), upstream
[obsproject/obs-studio#13823](https://github.com/obsproject/obs-studio/issues/13823).
- A Wayland screen capture or window capture starts again by itself after
the monitor sleeps, is unplugged, or the captured window animates, and
does not stay frozen on the last frame. *Linux*, 2026-10-12. Issues
[#257](https://github.com/obs-rust/obs-studio/issues/257),
[#398](https://github.com/obs-rust/obs-studio/issues/398), PRs
[#399](https://github.com/obs-rust/obs-studio/pull/399),
[#461](https://github.com/obs-rust/obs-studio/pull/461), upstream
[obsproject/obs-studio#12063](https://github.com/obsproject/obs-studio/issues/12063).
- PipeWire cameras that send only I420 or YV12 show a picture, also at odd
widths, and the preview no longer stays black. *Linux*, 2026-10-12. Issues
[#406](https://github.com/obs-rust/obs-studio/issues/406),
[#467](https://github.com/obs-rust/obs-studio/issues/467), PRs
[#407](https://github.com/obs-rust/obs-studio/pull/407),
[#468](https://github.com/obs-rust/obs-studio/pull/468), upstream
[obsproject/obs-studio#13744](https://github.com/obsproject/obs-studio/issues/13744).
- PipeWire screen capture from shared memory follows the buffer stride and
offset, so padded or offset frames are no longer skewed and a short buffer
no longer crashes OBS. *Linux*, 2026-10-13. Issue
[#508](https://github.com/obs-rust/obs-studio/issues/508), PR
[#509](https://github.com/obs-rust/obs-studio/pull/509), upstream
[obsproject/obs-studio#13318](https://github.com/obsproject/obs-studio/issues/13318).
- PipeWire screen capture shows each frame once, without repeated and
skipped frames. *Linux*, 2026-10-13. Issue
[#191](https://github.com/obs-rust/obs-studio/issues/191), PR
[#612](https://github.com/obs-rust/obs-studio/pull/612), upstream
[obsproject/obs-studio#13292](https://github.com/obsproject/obs-studio/issues/13292).
- OBS no longer can crash at startup when the scene collection has a
PipeWire Video Capture Device source. *Linux*, 2026-10-14. Issue
[#774](https://github.com/obs-rust/obs-studio/issues/774), PR
[#775](https://github.com/obs-rust/obs-studio/pull/775), upstream
[obsproject/obs-studio#13971](https://github.com/obsproject/obs-studio/issues/13971).
- Opening the Properties of a PipeWire camera no longer renegotiates the
running stream, so libcamera cameras no longer drop or freeze. *Linux*,
2026-10-15. Issue
[#819](https://github.com/obs-rust/obs-studio/issues/819), PR
[#820](https://github.com/obs-rust/obs-studio/pull/820), upstream
[obsproject/obs-studio#10399](https://github.com/obsproject/obs-studio/issues/10399).
- Camera control sliders of a PipeWire camera can be dragged and moved with
the mouse wheel again. *Linux*, 2026-10-15. Issue
[#827](https://github.com/obs-rust/obs-studio/issues/827), PR
[#829](https://github.com/obs-rust/obs-studio/pull/829).
- V4L2 camera controls that the camera refuses (for example manual exposure
in an automatic mode) are disabled, so other sliders can be dragged again.
*Linux*, 2026-10-15. Issue
[#827](https://github.com/obs-rust/obs-studio/issues/827), PR
[#895](https://github.com/obs-rust/obs-studio/pull/895).
- A new resolution for a running PipeWire camera restarts the stream, so
libcamera cameras no longer lose the stream. *Linux*, 2026-10-16. Issues
[#390](https://github.com/obs-rust/obs-studio/issues/390),
[#933](https://github.com/obs-rust/obs-studio/issues/933), PR
[#934](https://github.com/obs-rust/obs-studio/pull/934), upstream
[obsproject/obs-studio#10399](https://github.com/obsproject/obs-studio/issues/10399).
- In the Video Capture Device (PipeWire) source, a manual camera control is
greyed out while its automatic mode is on, and menu controls such as Auto
Exposure and Power Line Frequency show again. *Linux*, 2026-10-16. Issue
[#827](https://github.com/obs-rust/obs-studio/issues/827), PR
[#1054](https://github.com/obs-rust/obs-studio/pull/1054).
- A Screen Capture (PipeWire) source that is not showing keeps its stream
paused, so several captures no longer slow down the desktop and OBS.
*Linux*, 2026-10-16. Issue
[#1110](https://github.com/obs-rust/obs-studio/issues/1110), PR
[#1111](https://github.com/obs-rust/obs-studio/pull/1111), upstream
[obsproject/obs-studio#13836](https://github.com/obsproject/obs-studio/issues/13836).
- A V4L2 camera from a scene collection saved by older OBS runs at the frame
rate you picked, not at the camera's fastest rate. *Linux*, 2026-10-16.
Issue [#1117](https://github.com/obs-rust/obs-studio/issues/1117), PR
[#1118](https://github.com/obs-rust/obs-studio/pull/1118), upstream
[obsproject/obs-studio#14036](https://github.com/obsproject/obs-studio/issues/14036),
[obsproject/obs-studio#201](https://github.com/obsproject/obs-studio/issues/201).
- Picking a PipeWire camera format that does not have the picked frame rate
no longer freezes the picture. *Linux*, 2026-10-16. Issue
[#1119](https://github.com/obs-rust/obs-studio/issues/1119), PR
[#1120](https://github.com/obs-rust/obs-studio/pull/1120), upstream
[obsproject/obs-studio#13783](https://github.com/obsproject/obs-studio/issues/13783).
- The format list of a PipeWire camera source shows each format and size
once. *Linux*, 2026-10-17. Issue
[#1068](https://github.com/obs-rust/obs-studio/issues/1068), PR
[#1217](https://github.com/obs-rust/obs-studio/pull/1217).
- The frame rate list of a PipeWire camera source is filled for the format
the properties show when the source's settings have no format yet, and it
lists each frame rate once. *Linux*, 2026-10-30. Issue
[#1068](https://github.com/obs-rust/obs-studio/issues/1068).
- Window Capture has a "List OBS windows" option (off by default) that adds
OBS's own windows, such as projectors, to the window list so OBS can capture
itself. *Windows*, 2026-10-24. Issue
[#2226](https://github.com/obs-rust/obs-studio/issues/2226).
- Screen Capture (XSHM) follows a change of the screen's resolution: the
capture is resized instead of freezing (screen made smaller) or staying
cropped to the old size (screen made larger). *Linux*, 2026-10-20. Issue
[#1494](https://github.com/obs-rust/obs-studio/issues/1494), PR
[#1495](https://github.com/obs-rust/obs-studio/pull/1495), port of
[obsproject/obs-studio#12937](https://github.com/obsproject/obs-studio/pull/12937).
- OBS no longer trips a PipeWire assertion ('loop->recurse > 0') when it
quits with a screen capture or camera source from PipeWire. *Linux*,
2026-10-26. Issue
[#2431](https://github.com/obs-rust/obs-studio/issues/2431).
- Screen Capture (XSHM) draws the cursor in the right place after the captured
monitor moves without changing size (a monitor plugged in or rearranged).
*Linux*, 2026-10-24. Issue
[#2265](https://github.com/obs-rust/obs-studio/issues/2265).
- The OBS Virtual Camera no longer burns about a millisecond of CPU per frame
spinning inside the app that uses it (Zoom, Teams, a browser); it hands each
frame to that app slightly earlier instead. *Windows*, 2026-10-21. Issue
[#1279](https://github.com/obs-rust/obs-studio/issues/1279), PR
[#1638](https://github.com/obs-rust/obs-studio/pull/1638).
- A camera or other async source rotated by a multiple of 90 degrees other
than 0, 90, -90, 180 or 270 (such as -180, -270 or 450, from a camera's
autorotation or a plugin) is drawn turned in its place, instead of outside
its box. *All*, pending merge. Issue
[#2121](https://github.com/obs-rust/obs-studio/issues/2121).
- Turning off Autorotation on a Video Capture Device source takes back the
rotation it applied, instead of leaving the camera turned until OBS
restarts or the source is recreated. *Windows*, pending merge. Issue
[#2137](https://github.com/obs-rust/obs-studio/issues/2137).
- A PipeWire screen or window capture of a stream with the Flipped or
Flipped180 transform is mirrored left to right again instead of drawn
upside down: `GS_FLIP_U` on a 2D texture (`gs_draw_sprite()`, and a
full-size `gs_draw_sprite_subregion()`) flips it on u, not on v, as it did
before upstream 7b8b51b29. *All*, 2026-10-24. Issue
[#2124](https://github.com/obs-rust/obs-studio/issues/2124), PR
[#2135](https://github.com/obs-rust/obs-studio/pull/2135).
- A V4L2 Video Capture Device follows its camera, not a /dev/videoN number:
a camera replugged or renumbered under another number is captured again,
and another camera that takes its old number is not captured in its place
(the log says the source waits for its camera). The source saves the
camera's name, bus and USB serial number next to the node; two cameras of
one model without serial numbers are told apart by their USB port.
*Linux*, pending merge. Issue
[#2262](https://github.com/obs-rust/obs-studio/issues/2262), upstream
[obsproject/obs-studio#3824](https://github.com/obsproject/obs-studio/issues/3824),
[obsproject/obs-studio#4972](https://github.com/obsproject/obs-studio/issues/4972).
- A V4L2 camera that stops working without being unplugged (a firmware
hang, an error after suspend and resume) no longer freezes its source on
the last frame: OBS closes the camera and opens it again until it
delivers frames. *Linux*, pending merge. Issue
[#2264](https://github.com/obs-rust/obs-studio/issues/2264), upstream
[obsproject/obs-studio#9434](https://github.com/obsproject/obs-studio/issues/9434).
- The Virtual Camera can be stopped and started again while recording: the
recording no longer keeps the v4l2loopback device open, and no longer
holds the VA-API encoder's GPU device either. *Linux*, pending merge.
Issue [#2278](https://github.com/obs-rust/obs-studio/issues/2278), upstream
[obsproject/obs-studio#14054](https://github.com/obsproject/obs-studio/issues/14054).
### Audio
- PulseAudio audio input on pipewire-pulse no longer cuts out or stutters
when audio packets arrive in bursts. *Linux*, 2026-10-11. Issue
[#190](https://github.com/obs-rust/obs-studio/issues/190), PR
[#194](https://github.com/obs-rust/obs-studio/pull/194), upstream
[obsproject/obs-studio#12835](https://github.com/obsproject/obs-studio/issues/12835),
[obsproject/obs-studio#10808](https://github.com/obsproject/obs-studio/issues/10808).
- On Wayland, push-to-talk and other hold hotkeys stay pressed while the key
is held and an OBS window has focus, and are released when it is let go,
also after the keyboard layout changed while it was held (it no longer
stays pressed until OBS loses focus). *Linux*, 2026-10-11. Issues
[#210](https://github.com/obs-rust/obs-studio/issues/210),
[#3069](https://github.com/obs-rust/obs-studio/issues/3069), PR
[#211](https://github.com/obs-rust/obs-studio/pull/211), upstream
[obsproject/obs-studio#10701](https://github.com/obsproject/obs-studio/issues/10701).
- VLC Video Source plays 5.1 and 7.1 audio through the correct speakers.
*All*, 2026-10-11. Issue
[#251](https://github.com/obs-rust/obs-studio/issues/251), PR
[#252](https://github.com/obs-rust/obs-studio/pull/252), upstream
[obsproject/obs-studio#12579](https://github.com/obsproject/obs-studio/issues/12579).
- Audio capture devices on ALSA, JACK and PulseAudio no longer drop out
every few minutes because their clock is slightly fast or slow. *Linux*,
2026-10-11. Issue
[#270](https://github.com/obs-rust/obs-studio/issues/270), PR
[#271](https://github.com/obs-rust/obs-studio/pull/271), upstream
[obsproject/obs-studio#4600](https://github.com/obsproject/obs-studio/issues/4600).
- Scene transitions fade the audio again when an output uses Rescale Output.
*All*, 2026-10-11. Issue
[#272](https://github.com/obs-rust/obs-studio/issues/272), PR
[#273](https://github.com/obs-rust/obs-studio/pull/273), upstream
[obsproject/obs-studio#12912](https://github.com/obsproject/obs-studio/issues/12912).
- The audio monitoring device you choose stays in use when the system
default output changes (PulseAudio and PipeWire). *Linux*, 2026-10-11.
Issue [#274](https://github.com/obs-rust/obs-studio/issues/274), PR
[#275](https://github.com/obs-rust/obs-studio/pull/275), upstream
[obsproject/obs-studio#10342](https://github.com/obsproject/obs-studio/issues/10342).
- A Media Source keeps its audio sync offset when playback starts or
restarts. *All*, 2026-10-11. Issue
[#286](https://github.com/obs-rust/obs-studio/issues/286), PR
[#287](https://github.com/obs-rust/obs-studio/pull/287), upstream
[obsproject/obs-studio#11640](https://github.com/obsproject/obs-studio/issues/11640).
- A VLC Video Source playlist no longer cuts the last second of each audio
track. *All*, 2026-10-12. Issue
[#301](https://github.com/obs-rust/obs-studio/issues/301), PR
[#302](https://github.com/obs-rust/obs-studio/pull/302), upstream
[obsproject/obs-studio#9345](https://github.com/obsproject/obs-studio/issues/9345).
- An audio sync offset changed from 0 on a running source now takes effect,
and a saved offset applies when a scene collection loads. *All*,
2026-10-12. Issue
[#333](https://github.com/obs-rust/obs-studio/issues/333), PR
[#334](https://github.com/obs-rust/obs-studio/pull/334), upstream
[obsproject/obs-studio#7912](https://github.com/obsproject/obs-studio/issues/7912).
- An audio input on PulseAudio or PipeWire records again after its stream
dies, without a settings change or restart. *Linux*, 2026-10-12. Issues
[#377](https://github.com/obs-rust/obs-studio/issues/377),
[#1029](https://github.com/obs-rust/obs-studio/issues/1029),
[#1056](https://github.com/obs-rust/obs-studio/issues/1056), PRs
[#378](https://github.com/obs-rust/obs-studio/pull/378),
[#1031](https://github.com/obs-rust/obs-studio/pull/1031),
[#1057](https://github.com/obs-rust/obs-studio/pull/1057), upstream
[obsproject/obs-studio#10072](https://github.com/obsproject/obs-studio/issues/10072).
- The VLC Video Source sends its audio as it plays, so volume meters and
audio callbacks no longer run up to 2 s early or reset every second.
*All*, 2026-10-12. Issue
[#404](https://github.com/obs-rust/obs-studio/issues/404), PR
[#405](https://github.com/obs-rust/obs-studio/pull/405), upstream
[obsproject/obs-studio#2406](https://github.com/obsproject/obs-studio/issues/2406).
- A Video Delay (Async) filter of more than 2 s no longer breaks up the
audio of the source into noise. The filter keeps its configured delay when
graphics ticks skip frames, dropping expired queued pictures and holding
the last picture across gaps instead of showing newer pictures too early.
Audio also stays continuous when a graphics stall overflows the incoming
video queue.
*All*, 2026-10-13. Issues
[#521](https://github.com/obs-rust/obs-studio/issues/521),
[#3368](https://github.com/obs-rust/obs-studio/issues/3368), PRs
[#522](https://github.com/obs-rust/obs-studio/pull/522),
[#3515](https://github.com/obs-rust/obs-studio/pull/3515),
[#3653](https://github.com/obs-rust/obs-studio/pull/3653), upstream
[obsproject/obs-studio#13830](https://github.com/obsproject/obs-studio/issues/13830).
- Two Audio Input Capture sources on the same device both record cleanly
when PipeWire runs at a large quantum, and the second one is no longer
mostly silent. *Linux*, 2026-10-13. Issue
[#531](https://github.com/obs-rust/obs-studio/issues/531), PR
[#532](https://github.com/obs-rust/obs-studio/pull/532), upstream
[obsproject/obs-studio#10808](https://github.com/obsproject/obs-studio/issues/10808).
- A restarted Media Source with a sample rate different from OBS no longer
starts with a click from the end of its previous playback. *All*,
2026-10-13. Issue
[#545](https://github.com/obs-rust/obs-studio/issues/545), PR
[#546](https://github.com/obs-rust/obs-studio/pull/546), upstream
[obsproject/obs-studio#7063](https://github.com/obsproject/obs-studio/issues/7063).
- In Studio Mode, the Audio Mixer marks audio sources in groups and nested
scenes of the previewed scene as Preview. *All*, 2026-10-13. Issue
[#602](https://github.com/obs-rust/obs-studio/issues/602), PR
[#603](https://github.com/obs-rust/obs-studio/pull/603), upstream
[obsproject/obs-studio#13297](https://github.com/obsproject/obs-studio/issues/13297).
- Fade to Color with a switch point of 0% or 100% no longer produces broken
(NaN) audio. *All*, 2026-10-14. Issue
[#488](https://github.com/obs-rust/obs-studio/issues/488), PR
[#687](https://github.com/obs-rust/obs-studio/pull/687).
- When a PulseAudio monitor reset fails, OBS keeps the working monitor
instead of leaving freed state behind. *Linux*, 2026-10-14. Issues
[#486](https://github.com/obs-rust/obs-studio/issues/486),
[#686](https://github.com/obs-rust/obs-studio/issues/686), PR
[#713](https://github.com/obs-rust/obs-studio/pull/713).
- Removing an ALSA Audio Capture Device source whose device is missing no
longer crashes or hangs OBS. *Linux*, 2026-10-14. Issue
[#770](https://github.com/obs-rust/obs-studio/issues/770), PR
[#771](https://github.com/obs-rust/obs-studio/pull/771), upstream
[obsproject/obs-studio#9322](https://github.com/obsproject/obs-studio/issues/9322).
- Audio monitoring on PulseAudio and PipeWire catches up after a playback
stall or drift instead of staying seconds behind. *Linux*, 2026-10-15.
Issue [#778](https://github.com/obs-rust/obs-studio/issues/778), PR
[#779](https://github.com/obs-rust/obs-studio/pull/779), upstream
[obsproject/obs-studio#10548](https://github.com/obsproject/obs-studio/issues/10548),
[obsproject/obs-studio#3525](https://github.com/obsproject/obs-studio/issues/3525),
[obsproject/obs-studio#4531](https://github.com/obsproject/obs-studio/issues/4531).
- The Expander filter at a 1:1 ratio no longer turns down the audio that
follows silence. *All*, 2026-10-16. PR
[#995](https://github.com/obs-rust/obs-studio/pull/995).
- A disconnected macOS audio device no longer makes OBS retry CoreAudio
every 300 ms or 2 s forever: retries back off to every 30 s and restart
quickly when a device is plugged in or the default device changes.
*macOS*, 2026-10-17. Issue
[#1358](https://github.com/obs-rust/obs-studio/issues/1358), PR
[#1370](https://github.com/obs-rust/obs-studio/pull/1370).
- Audio timestamp differences smaller than one sample no longer leave an
invalid interval in the mixer. *All*, 2026-10-18. Issue
[#838](https://github.com/obs-rust/obs-studio/issues/838), PR
[#1333](https://github.com/obs-rust/obs-studio/pull/1333).
- Audio monitoring above 100% volume no longer distorts on PulseAudio and
PipeWire outputs that play 16-bit, 32-bit or 8-bit integer audio: loud
samples clip instead of wrapping around. *Linux*, 2026-10-21. Issue
[#1697](https://github.com/obs-rust/obs-studio/issues/1697), PR
[#1709](https://github.com/obs-rust/obs-studio/pull/1709).
- A push-to-talk or push-to-mute delay too large to count in nanoseconds
no longer wraps around and ends the moment the key is released; it holds
for as long as it can. A negative delay in a scene collection loads as no
delay. An audio balance outside full left to full right, from a scene
collection, a plugin or a script, is clamped to that range (NaN is
centred) instead of inverting or overdriving a channel. *All*, pending
merge. Issue
[#2051](https://github.com/obs-rust/obs-studio/issues/2051), PR
[#2058](https://github.com/obs-rust/obs-studio/pull/2058).
- A source volume that is not a number, negative or infinite, from a scene
collection, a plugin or a script, no longer silences or corrupts every
audio track the source is in: NaN is read as 100%, a negative volume as
0% and an infinite one as 2000% (+26 dB), the most the volume controls
allow. *All*, pending merge. Issue
[#2108](https://github.com/obs-rust/obs-studio/issues/2108).
- Desktop Audio set to "Default" on PulseAudio no longer goes silent when the
default output changes, and no longer records the microphone when the
default output is unplugged: it follows the new default output. Saving its
properties unchanged no longer restarts it. A transient monitor lookup error
while PipeWire changes the default output is retried, so capture resumes
without another device change. *Linux*, pending merge. Issues
[#3630](https://github.com/obs-rust/obs-studio/issues/3630),
[#2260](https://github.com/obs-rust/obs-studio/issues/2260), PR
[#2271](https://github.com/obs-rust/obs-studio/pull/2271), upstream
[obsproject/obs-studio#4828](https://github.com/obsproject/obs-studio/issues/4828),
[obsproject/obs-studio#3211](https://github.com/obsproject/obs-studio/issues/3211).
- A browser source playing sound through WebAudio (alert boxes and the like)
no longer goes silent for good when Chromium's audio service process dies;
its sound comes back about 3 s later, without a page refresh or toggling
"Control audio via OBS". A page that paused its own audio stays paused.
*All*, pending merge. Issue
[#2328](https://github.com/obs-rust/obs-studio/issues/2328), upstream
[obsproject/obs-studio#10586](https://github.com/obsproject/obs-studio/issues/10586).
- A browser source with "Control audio via OBS" no longer raises the audio
buffering of every source for good (up to 960 ms of added latency) when
its audio arrives late under load. Audio that arrives too late to mix is
dropped and logged instead: during such a stall the browser source is
silent for about the stall's length (up to about a second), and other
sources keep their latency. *All*, pending merge. Issue
[#2335](https://github.com/obs-rust/obs-studio/issues/2335).
- A source set to "Monitor Only" before 33.0 no longer plays into the
stream and recordings after the upgrade: it loads with monitoring on and
muted, the 33.0 form of monitor-only. Sources saved by 33.0 are
unchanged. *All*, pending merge. Issue
[#2444](https://github.com/obs-rust/obs-studio/issues/2444), upstream
[obsproject/obs-studio@646836a](https://github.com/obsproject/obs-studio/commit/646836a3118ca961653c69da1ece902bc3dd9f92).
- Audio monitoring of a Media Source playing a song with embedded cover
art keeps working after the source restarts (the scene is shown again,
or the file loops), instead of going silent until monitoring is switched
off and on. *Windows*, pending merge. Issue
[#2530](https://github.com/obs-rust/obs-studio/issues/2530), upstream
[obsproject/obs-studio#9428](https://github.com/obsproject/obs-studio/issues/9428),
[obsproject/obs-studio#11739](https://github.com/obsproject/obs-studio/issues/11739),
[obsproject/obs-studio#14091](https://github.com/obsproject/obs-studio/pull/14091).
- Audio monitoring to a playback device with 7 or more than 8 channels (a
6.1 speaker setup, or an audio interface with 10 or more outputs on one
device) logs that OBS has no speaker layout for the device's channels,
instead of failing with only a resampler error. Devices OBS could play to
before get the same layout. *Windows*, 2026-10-27. Issue
[#2559](https://github.com/obs-rust/obs-studio/issues/2559).
- Audio monitoring on macOS no longer goes silent for good when CoreAudio
refuses one buffer of audio: the monitor starts playing again with the
next audio instead of staying silent until the monitoring device is
changed. *macOS*, 2026-11-01. Issue
[#3328](https://github.com/obs-rust/obs-studio/issues/3328).
- The macOS monitoring device list no longer reads device ids CoreAudio
never wrote when a device goes away while the list is being built, which
could list a device twice. *macOS*, 2026-11-01. Issue
[#3359](https://github.com/obs-rust/obs-studio/issues/3359).
- A scene transition's audio fade no longer jumps partway through a block
of audio, or puts the left and right channels at different points of the
fade, when the transition moves while that audio is being mixed (for
example while you drag the Studio Mode T-bar). *All*, 2026-11-02. Issue
[#3499](https://github.com/obs-rust/obs-studio/issues/3499).
- An audio source that starts or stops waiting for audio while the mix runs
is no longer mixed for one more tick from a buffer being reset, or left out
of the mix for a tick it had audio for: the audio tick reads that state
under the source's audio lock. *All*, 2026-11-08. Issue
[#4068](https://github.com/obs-rust/obs-studio/issues/4068).
### Encoding, streaming and recording
- A recording no longer fails with "incomplete UTF-8 string" when a long
filename cuts a multibyte character at 255 bytes. *All*, 2026-10-09. Issue
[#21](https://github.com/obs-rust/obs-studio/issues/21), PRs
[#23](https://github.com/obs-rust/obs-studio/pull/23),
[#26](https://github.com/obs-rust/obs-studio/pull/26), upstream
[obsproject/obs-studio#11211](https://github.com/obsproject/obs-studio/issues/11211).
- The SVT-AV1 encoder now uses CBR rate control when CBR is selected, and
invalid SVT-AV1 options stop the encoder with an error. *All*, 2026-10-09.
Issue [#24](https://github.com/obs-rust/obs-studio/issues/24), PR
[#63](https://github.com/obs-rust/obs-studio/pull/63), upstream
[obsproject/obs-studio#13849](https://github.com/obsproject/obs-studio/issues/13849).
- OBS no longer crashes when an RTMP server returns a connect error without
a description. *All*, 2026-10-09. Issue
[#57](https://github.com/obs-rust/obs-studio/issues/57), PR
[#64](https://github.com/obs-rust/obs-studio/pull/64), upstream
[obsproject/obs-studio#13144](https://github.com/obsproject/obs-studio/issues/13144).
- OBS no longer reads past the end of malformed or unusual AV1 packets, and
AV1 headers with an extension byte and no size field get the correct size.
*All*, 2026-10-10. PR
[#103](https://github.com/obs-rust/obs-studio/pull/103).
- Streaming over RTMP or recording to FLV no longer crashes on an empty
packet on a secondary audio track. *All*, 2026-10-10. Issue
[#101](https://github.com/obs-rust/obs-studio/issues/101), PR
[#110](https://github.com/obs-rust/obs-studio/pull/110).
- FFmpeg VAAPI encoders start on the default device, with a log message,
when the saved VAAPI device is not usable on this machine. *Linux*,
2026-10-11. Issue
[#197](https://github.com/obs-rust/obs-studio/issues/197), PR
[#198](https://github.com/obs-rust/obs-studio/pull/198), upstream
[obsproject/obs-studio#13773](https://github.com/obsproject/obs-studio/issues/13773).
- In Advanced output mode, recording and split file names have characters
such as : replaced, the same as in Simple mode. *All*, 2026-10-11. Issue
[#199](https://github.com/obs-rust/obs-studio/issues/199), PR
[#200](https://github.com/obs-rust/obs-studio/pull/200), upstream
[obsproject/obs-studio#13786](https://github.com/obsproject/obs-studio/issues/13786).
- Starting a recording or stream with a VAAPI texture encoder and a color
format other than NV12 or P010 no longer crashes OBS; it uses the CPU
VAAPI encoder instead. *Linux*, 2026-10-11. Issue
[#206](https://github.com/obs-rust/obs-studio/issues/206), PR
[#207](https://github.com/obs-rust/obs-studio/pull/207), upstream
[obsproject/obs-studio#12731](https://github.com/obsproject/obs-studio/issues/12731).
- Recording with the FFmpeg VAAPI H.264 or HEVC encoder no longer crashes at
the start when the first packet holds only headers. *Linux*, 2026-10-11.
Issue [#216](https://github.com/obs-rust/obs-studio/issues/216), PR
[#218](https://github.com/obs-rust/obs-studio/pull/218), upstream
[obsproject/obs-studio#13316](https://github.com/obsproject/obs-studio/issues/13316).
- The replay buffer stops while a shared recording is paused, and OBS no
longer hangs on exit in that case. *All*, 2026-10-11. Issue
[#223](https://github.com/obs-rust/obs-studio/issues/223), PR
[#224](https://github.com/obs-rust/obs-studio/pull/224), upstream
[obsproject/obs-studio#7249](https://github.com/obsproject/obs-studio/issues/7249).
- WHIP streams at 23.976 or 59.94 fps no longer drift out of audio/video
sync over time. *All*, 2026-10-11. Issue
[#225](https://github.com/obs-rust/obs-studio/issues/225), PR
[#226](https://github.com/obs-rust/obs-studio/pull/226), upstream
[obsproject/obs-studio#13970](https://github.com/obsproject/obs-studio/issues/13970).
- When a stream fails to start, OBS shuts down its encoders and releases
hardware encoder sessions such as NVENC. *All*, 2026-10-11. Issue
[#236](https://github.com/obs-rust/obs-studio/issues/236), PR
[#237](https://github.com/obs-rust/obs-studio/pull/237), upstream
[obsproject/obs-studio#10651](https://github.com/obsproject/obs-studio/issues/10651).
- When the recording muxer process stops during a recording, OBS now sees
the write failure instead of discarding all later data in silence. *Linux,
macOS*, 2026-10-11. Issue
[#264](https://github.com/obs-rust/obs-studio/issues/264), PR
[#265](https://github.com/obs-rust/obs-studio/pull/265).
- A mono Opus audio track set above 256 kbps now starts (at 256 kbps, with a
log warning) instead of failing. *All*, 2026-10-12. Issue
[#295](https://github.com/obs-rust/obs-studio/issues/295), PR
[#296](https://github.com/obs-rust/obs-studio/pull/296), upstream
[obsproject/obs-studio#12753](https://github.com/obsproject/obs-studio/issues/12753).
- An encoder error during a recording no longer freezes OBS or leaves an
output that shares the encoder unable to start. *All*, 2026-10-12. Issue
[#298](https://github.com/obs-rust/obs-studio/issues/298), PR
[#299](https://github.com/obs-rust/obs-studio/pull/299), upstream
[obsproject/obs-studio#9946](https://github.com/obsproject/obs-studio/issues/9946).
- Recordings that start in the same second no longer write to the same file
and overwrite each other. *All*, 2026-10-12. Issue
[#308](https://github.com/obs-rust/obs-studio/issues/308), PR
[#309](https://github.com/obs-rust/obs-studio/pull/309), upstream
[obsproject/obs-studio#10750](https://github.com/obsproject/obs-studio/issues/10750).
- A custom FFmpeg recording to WebM/VP9 with the BGRA format now starts and
keeps its alpha channel. *All*, 2026-10-12. Issue
[#310](https://github.com/obs-rust/obs-studio/issues/310), PR
[#311](https://github.com/obs-rust/obs-studio/pull/311), upstream
[obsproject/obs-studio#13785](https://github.com/obsproject/obs-studio/issues/13785).
- With Rescale Output on, Stats counts frames skipped due to encoding lag
and the status bar warns about encoder overload. *All*, 2026-10-12. Issue
[#336](https://github.com/obs-rust/obs-studio/issues/336), PR
[#337](https://github.com/obs-rust/obs-studio/pull/337), upstream
[obsproject/obs-studio#11078](https://github.com/obsproject/obs-studio/issues/11078).
- Caption text longer than 128 bytes, also from obs-websocket
SendStreamCaption, is wrapped and paged instead of cut off. *All*,
2026-10-12. PR [#341](https://github.com/obs-rust/obs-studio/pull/341).
- Stopping a Custom Output (FFmpeg) recording no longer crashes or freezes
OBS, for example with libvpx. *All*, 2026-10-12. Issue
[#354](https://github.com/obs-rust/obs-studio/issues/354), PR
[#355](https://github.com/obs-rust/obs-studio/pull/355), upstream
[obsproject/obs-studio#7536](https://github.com/obsproject/obs-studio/issues/7536).
- Remuxing an MKV recording to MP4 or MOV keeps the audio sample-accurate,
so it no longer crackles in QuickTime and Final Cut Pro. *All*,
2026-10-12. Issue
[#359](https://github.com/obs-rust/obs-studio/issues/359), PR
[#360](https://github.com/obs-rust/obs-studio/pull/360), upstream
[obsproject/obs-studio#13249](https://github.com/obsproject/obs-studio/issues/13249).
- In Advanced output mode, "Ignore streaming service setting
recommendations" keeps your encoder settings, such as CQP or CRF. *All*,
2026-10-12. Issue
[#368](https://github.com/obs-rust/obs-studio/issues/368), PR
[#369](https://github.com/obs-rust/obs-studio/pull/369), upstream
[obsproject/obs-studio#4125](https://github.com/obsproject/obs-studio/issues/4125).
- FFmpeg output recordings that convert the pixel format no longer leak
memory for each recording. *All*, 2026-10-12. PR
[#375](https://github.com/obs-rust/obs-studio/pull/375).
- A caption character that EIA-608 cannot encode (for example CJK or emoji)
becomes a gap, and the rest of the caption row is still sent. *All*,
2026-10-12. Issue
[#376](https://github.com/obs-rust/obs-studio/issues/376), PR
[#412](https://github.com/obs-rust/obs-studio/pull/412).
- Hybrid MP4 recordings with 5.1 audio play with sound in VLC 3. *All*,
2026-10-13. Issue
[#494](https://github.com/obs-rust/obs-studio/issues/494), PR
[#495](https://github.com/obs-rust/obs-studio/pull/495).
- A recording with Custom Output (FFmpeg) set to "Output to URL" is no
longer stopped for low disk space. *All*, 2026-10-13. Issue
[#526](https://github.com/obs-rust/obs-studio/issues/526), PR
[#527](https://github.com/obs-rust/obs-studio/pull/527), upstream
[obsproject/obs-studio#12952](https://github.com/obsproject/obs-studio/issues/12952).
- With dynamic bitrate on, a video bitrate that you change while live stays
in effect after network congestion. *All*, 2026-10-13. Issue
[#574](https://github.com/obs-rust/obs-studio/issues/574), PR
[#575](https://github.com/obs-rust/obs-studio/pull/575), upstream
[obsproject/obs-studio#12235](https://github.com/obsproject/obs-studio/issues/12235).
- A source with Subtract blending no longer shows black in a rescaled
recording or stream. *All*, 2026-10-13. Issue
[#580](https://github.com/obs-rust/obs-studio/issues/580), PR
[#581](https://github.com/obs-rust/obs-studio/pull/581), upstream
[obsproject/obs-studio#10746](https://github.com/obsproject/obs-studio/issues/10746).
- A saved replay uses the current filename settings, not the settings from
when the replay buffer started. *All*, 2026-10-13. Issue
[#583](https://github.com/obs-rust/obs-studio/issues/583), PR
[#584](https://github.com/obs-rust/obs-studio/pull/584), upstream
[obsproject/obs-studio#10923](https://github.com/obsproject/obs-studio/issues/10923).
- A recording started while the replay buffer runs starts at once, instead
of waiting for the next keyframe or leaving an empty file. *All*,
2026-10-13. Issues
[#593](https://github.com/obs-rust/obs-studio/issues/593),
[#597](https://github.com/obs-rust/obs-studio/issues/597), PRs
[#594](https://github.com/obs-rust/obs-studio/pull/594),
[#598](https://github.com/obs-rust/obs-studio/pull/598), upstream
[obsproject/obs-studio#12069](https://github.com/obsproject/obs-studio/issues/12069).
- Tools > Output Timer shows Start again after its timer stopped the output
while the dialog was closed. *All*, 2026-10-13. Issue
[#600](https://github.com/obs-rust/obs-studio/issues/600), PR
[#601](https://github.com/obs-rust/obs-studio/pull/601), upstream
[obsproject/obs-studio#10900](https://github.com/obsproject/obs-studio/issues/10900).
- Restarting the same output no longer makes its interleaving batch limit
grow each time. *All*, 2026-10-14. Issues
[#487](https://github.com/obs-rust/obs-studio/issues/487),
[#686](https://github.com/obs-rust/obs-studio/issues/686), PR
[#704](https://github.com/obs-rust/obs-studio/pull/704).
- A RIST stream that fails to open no longer can crash OBS by freeing its
credentials twice. *All*, 2026-10-14. Issues
[#482](https://github.com/obs-rust/obs-studio/issues/482),
[#686](https://github.com/obs-rust/obs-studio/issues/686), PR
[#705](https://github.com/obs-rust/obs-studio/pull/705).
- A GPU encoder that starts while the last one on the same video mix stops
keeps getting frames; before, it could stop receiving frames. *All*,
2026-10-14. PR [#736](https://github.com/obs-rust/obs-studio/pull/736).
- Quitting OBS while it records stops the recording correctly, so the end of
the recording is not lost. *All*, 2026-10-15. Issue
[#780](https://github.com/obs-rust/obs-studio/issues/780), PR
[#781](https://github.com/obs-rust/obs-studio/pull/781).
- Start Recording no longer crashes OBS after an earlier attempt failed with
"Unable to write to". *All*, 2026-10-15. Issue
[#802](https://github.com/obs-rust/obs-studio/issues/802), PR
[#803](https://github.com/obs-rust/obs-studio/pull/803), upstream
[obsproject/obs-studio#11940](https://github.com/obsproject/obs-studio/issues/11940).
- When the stream server name cannot be resolved, the log shows the real
lookup error instead of "Success". *All*, 2026-10-15. Issue
[#903](https://github.com/obs-rust/obs-studio/issues/903), PR
[#918](https://github.com/obs-rust/obs-studio/pull/918).
- With bitrate limiting on, the VideoToolbox encoder on macOS gets the
configured limit values; before, it got wrong values. *macOS*, 2026-10-16.
PR [#996](https://github.com/obs-rust/obs-studio/pull/996).
- An SRT stream that fails to connect no longer disconnects the other SRT
streams and Media Sources in OBS. *All*, 2026-10-16. Issue
[#1101](https://github.com/obs-rust/obs-studio/issues/1101), PR
[#1102](https://github.com/obs-rust/obs-studio/pull/1102), upstream
[obsproject/obs-studio#12361](https://github.com/obsproject/obs-studio/issues/12361).
- A recording or stream through the Custom FFmpeg Output keeps its last
second of video and audio when it stops. *All*, 2026-10-16. Issue
[#1124](https://github.com/obs-rust/obs-studio/issues/1124), PR
[#1125](https://github.com/obs-rust/obs-studio/pull/1125).
- With the replay buffer on, a hotkey change in Settings no longer makes OBS
log "Failed reading json string" each time the replay buffer is created.
*All*, 2026-10-17. Issue
[#1137](https://github.com/obs-rust/obs-studio/issues/1137), PR
[#1138](https://github.com/obs-rust/obs-studio/pull/1138), upstream
[obsproject/obs-studio#14014](https://github.com/obsproject/obs-studio/issues/14014).
- Starting a Twitch, Amazon IVS or Dacast stream while their ingest server
list cannot be downloaded no longer stalls 3 s before connecting (5 s in
the Auto-Configuration Wizard): the wait ends as soon as the download
fails. *All*, 2026-10-17. Issue
[#1347](https://github.com/obs-rust/obs-studio/issues/1347), PR
[#1353](https://github.com/obs-rust/obs-studio/pull/1353).
- Stop Streaming stops an SRT listener stream that is waiting for its caller
to come back, and OBS quits while a listener waits; before, the stream
never stopped and OBS never finished quitting. *All*, 2026-10-18. Issue
[#1421](https://github.com/obs-rust/obs-studio/issues/1421), PR
[#1422](https://github.com/obs-rust/obs-studio/pull/1422), upstream
[obsproject/obs-studio#12250](https://github.com/obsproject/obs-studio/issues/12250).
- OBS no longer crashes when an SRT or RIST stream reconnects after its
connection dropped; before, a packet left from the dropped connection could
reach the new connection before its header and kill OBS. *All*,
2026-10-19. Issue
[#1423](https://github.com/obs-rust/obs-studio/issues/1423), PR
[#1475](https://github.com/obs-rust/obs-studio/pull/1475).
- Automatic file splitting by time splits Hybrid MP4 recordings again: the
next file starts at the first keyframe after the split time, as for MKV
and MP4. Before, the recording stayed in one file unless a keyframe fell
within 1 ms of the split time. *All*, 2026-10-19. Issue
[#1476](https://github.com/obs-rust/obs-studio/issues/1476), PR
[#1477](https://github.com/obs-rust/obs-studio/pull/1477), upstream
[obsproject/obs-studio#14051](https://github.com/obsproject/obs-studio/issues/14051),
port of
[obsproject/obs-studio#14052](https://github.com/obsproject/obs-studio/pull/14052).
- Settings > Output (Advanced) with a profile that names a video encoder
OBS does not have (a profile copied from a machine with an AMD encoder,
for example) selects a fallback encoder, x264 for most, and shows its
settings. Before, the encoder settings read "No properties available",
the streaming list showed an encoder that was not in use, the recording
list was empty and OK only said "No Encoder Selected". The profile changes
only when the output settings are saved. *All*, 2026-10-20. Issue
[#1490](https://github.com/obs-rust/obs-studio/issues/1490), PR
[#1491](https://github.com/obs-rust/obs-studio/pull/1491), upstream
[obsproject/obs-studio#3531](https://github.com/obsproject/obs-studio/issues/3531).
- With Enhanced Broadcasting (multitrack video), the Broadcast Performance
Metrics of a frame whose time falls on a whole second carry that time.
Before, the time read 900 ms early (`…:32.1000Z` for `…:33.000Z`).
*All*, 2026-10-20. Issue
[#1505](https://github.com/obs-rust/obs-studio/issues/1505), PR
[#1508](https://github.com/obs-rust/obs-studio/pull/1508).
- A plugin or libobs-based tool that builds a file name from a format with
`%FPS`, `%CRES`, `%ORES` or `%VF` before video is set up gets `0`, `0x0`
and `None` there. Before, those were formatted from uninitialized memory
(names like `2880154539x2880154539`). *All*, 2026-10-20. Issue
[#1509](https://github.com/obs-rust/obs-studio/issues/1509), PRs
[#1562](https://github.com/obs-rust/obs-studio/pull/1562) and
[#1565](https://github.com/obs-rust/obs-studio/pull/1565).
- Streaming over RTMP no longer leaks memory each time the server drops the
connection before the first video frame is sent, or sends a message OBS
can't read before it drops the connection. *All*, 2026-10-20. Issue
[#1573](https://github.com/obs-rust/obs-studio/issues/1573), PR
[#1574](https://github.com/obs-rust/obs-studio/pull/1574), upstream
[obsproject/obs-studio#9972](https://github.com/obsproject/obs-studio/issues/9972).
[#1509](https://github.com/obs-rust/obs-studio/issues/1509), PRs
[#1562](https://github.com/obs-rust/obs-studio/pull/1562) and
[#1565](https://github.com/obs-rust/obs-studio/pull/1565).
- With a stream delay, a stream started again after it stopped on its own
(the connection dropped with Automatically Reconnect off, or an encoder
error) shows as streaming again. Before, OBS and obs-websocket never
reported it as started, and the delayed output passed packets on before
it had connected. *All*, 2026-10-20. Issue
[#1571](https://github.com/obs-rust/obs-studio/issues/1571), PR
[#1572](https://github.com/obs-rust/obs-studio/pull/1572).
- An output whose only video encoder is not in the first slot (a plugin
that sets one with `obs_output_set_video_encoder2()` and an index above 0)
starts on its first keyframe, with its timestamps starting at 0. Before,
the first keyframe was never sent and the output started on a frame that
is not a keyframe. *All*, 2026-10-21. Issue
[#1611](https://github.com/obs-rust/obs-studio/issues/1611), PR
[#1612](https://github.com/obs-rust/obs-studio/pull/1612).
- Captions sent to an output whose video codec cannot carry them (not
H.264, HEVC or AV1, for example ProRes or a plugin's codec) no longer
leak a copy of a video frame for each caption. *All*, 2026-10-22. Issue
[#1777](https://github.com/obs-rust/obs-studio/issues/1777), PR
[#1778](https://github.com/obs-rust/obs-studio/pull/1778).
- A plugin or script that adds an encoder region of interest (ROI) that is
upside down (bottom above top, or right left of left) or has a NaN
priority gets it refused, as a too small one is; before, it was stored and
passed to the encoder's quality map. An ROI edge that an upscaled
encoder scales past the largest value an edge can hold gets that value
instead of an undefined one, and a NULL encoder no longer crashes OBS. *All*, pending merge. Issue
[#1959](https://github.com/obs-rust/obs-studio/issues/1959), PR
[#1964](https://github.com/obs-rust/obs-studio/pull/1964).
- Changing the bitrate of a QSV encoder while streaming no longer races the
other QSV encoders: the reset now takes the lock they share. A device that
stays busy or stops finishing frames now stops the output with an error
instead of leaving it connected at 0 kbps. Live bitrate changes now also
apply in VBR and in CBR with "low" or "normal" latency, and settings that
leave the bitrate alone no longer reset the encoder. *Linux, Windows*,
pending merge. Issue
[#2291](https://github.com/obs-rust/obs-studio/issues/2291), upstream
[obsproject/obs-studio#13228](https://github.com/obsproject/obs-studio/issues/13228).
- Removing the video encoder from an output that has a rescale size set
no longer logs a NULL parameter for `obs_encoder_set_scaled_size()`, and
an encoder set on an output while it is being destroyed no longer leaves
a caption track behind in the slot it could not take. *All*, pending
merge. Issue
[#2491](https://github.com/obs-rust/obs-studio/issues/2491).
- A Windows stream to an `rtmps://` service keeps "Enable network
optimizations" and low-latency mode instead of turning both off with a log
line. The optimized socket loop now waits for the TLS layer (a full buffer
or a pending handshake) instead of spinning, reports a TLS failure with the
Mbed TLS reason, and no longer drops queued bytes when it retries a write
the transport had not accepted. *Windows*, pending merge. Issue
[#2220](https://github.com/obs-rust/obs-studio/issues/2220), PR
[#2778](https://github.com/obs-rust/obs-studio/pull/2778).
- With Enhanced Broadcasting (multitrack video), an encoder rung that runs at
a lower frame rate than the canvas (a frame rate divisor above 1) starts on
the group's start frame instead of sending no frames at all. *All*, pending
merge. Issue [#2920](https://github.com/obs-rust/obs-studio/issues/2920),
PR [#2926](https://github.com/obs-rust/obs-studio/pull/2926).
- A stream whose reconnect settings come from a script, a plugin or a
hand-edited profile no longer waits longer than 15 minutes before its
first reconnect attempt, nor about 49 days for a negative delay, and a
negative retry count stops the stream on a disconnect instead of starting
a reconnect that gives up at once. Every wait between attempts now stays
between 0 and 15 minutes. *All*, 2026-10-30. Issue
[#2990](https://github.com/obs-rust/obs-studio/issues/2990).
- Pausing a recording whose one audio encoder a script or plugin set on
two tracks no longer hangs OBS, and pausing an output in a libobs host
that never set up video no longer crashes it. *All*, 2026-10-30. Issue
[#3020](https://github.com/obs-rust/obs-studio/issues/3020).
- A recording paused and resumed in quick succession (a double press of the
pause hotkey, a script or a websocket client) keeps its audio after the
resume instead of losing it for the rest of the recording, and an encoder
with a frame rate divisor resumes its video instead of staying paused. In
both cases the output can be paused again. *All*, 2026-10-30. Issue
[#3033](https://github.com/obs-rust/obs-studio/issues/3033).
- A stream or recording that the CPU converts to a 4:2:0 format (NV12,
I420, P010 and the like) at an odd output height no longer has a
wrong-coloured bottom row: the scaler now copies the last chroma row it
writes instead of leaving that row of the frame unwritten. *All*,
2026-10-31. Issue
[#3159](https://github.com/obs-rust/obs-studio/issues/3159).
- An SRT Media Source in listener mode reconnects while a recording runs;
before, on Windows, it reconnected only after the recording stopped. The
helper processes OBS starts, such as the recording's muxer, no longer
inherit OBS's sockets and open files, so a socket a source closed is
really closed. *All*, 2026-11-01. Issue
[#3449](https://github.com/obs-rust/obs-studio/issues/3449), upstream
[obsproject/obs-studio#4596](https://github.com/obsproject/obs-studio/issues/4596).
- With "Remember these settings" on in the YouTube broadcast dialog, the
"Automatically stop" checkbox comes back as it was saved, instead of as
whatever "Automatically start" was, so a broadcast no longer ends, or
stays live, against the user's choice. *All*, 2026-11-01. Issue
[#3448](https://github.com/obs-rust/obs-studio/issues/3448), upstream
obs-studio issue 13856.
- OBS no longer hangs on exit when a recording was stopped before it got
any data, such as a Source Record recording of a source whose audio had
not started yet. Such a recording now stops at once and can start
again. *All*, 2026-11-06. Issue
[#3739](https://github.com/obs-rust/obs-studio/issues/3739).
- OBS no longer crashes when a recording stops or fails right after it was
started, before it got any data, with an older Source Record filter
(before 0.5.0): such a stop sent the output's stop signal twice, and the
filter freed its data twice. *All*, 2026-11-13. Issue
[#3799](https://github.com/obs-rust/obs-studio/issues/3799).
- OBS no longer hangs on exit after a stream was stopped while it waited to
reconnect, such as an SRT stream (from OBS or from a Source Record filter)
to a server that does not answer. The stop now finishes at once.
*All*, 2026-11-07. Issue
[#3739](https://github.com/obs-rust/obs-studio/issues/3739).
### Sources and filters
- The color grade filter loads 1D .cube LUTs correctly, and a .cube file
with a very large size no longer crashes OBS or writes out of bounds.
*All*, 2026-10-10. Issue
[#94](https://github.com/obs-rust/obs-studio/issues/94), PR
[#113](https://github.com/obs-rust/obs-studio/pull/113).
- Text (FreeType 2) sources read UTF-16 text files correctly, without
garbage characters, crashes or a stray byte-order mark. *All*, 2026-10-11.
Issue [#95](https://github.com/obs-rust/obs-studio/issues/95), PR
[#121](https://github.com/obs-rust/obs-studio/pull/121).
- A Media Source playing an RTSP camera that goes silent now times out after
about 10 seconds and reconnects when the camera comes back. *All*,
2026-10-11. Issue
[#189](https://github.com/obs-rust/obs-studio/issues/189), PR
[#193](https://github.com/obs-rust/obs-studio/pull/193), upstream
[obsproject/obs-studio#12958](https://github.com/obsproject/obs-studio/issues/12958).
- A Text (FreeType 2) source whose text changes often no longer stops
drawing new letters after a while. *All*, 2026-10-11. Issue
[#195](https://github.com/obs-rust/obs-studio/issues/195), PR
[#196](https://github.com/obs-rust/obs-studio/pull/196), upstream
[obsproject/obs-studio#11819](https://github.com/obsproject/obs-studio/issues/11819).
- A Media Source that restarts when it becomes active no longer flashes its
old last frame and shows its first frame at once. *All*, 2026-10-11.
Issues [#249](https://github.com/obs-rust/obs-studio/issues/249),
[#321](https://github.com/obs-rust/obs-studio/issues/321), PRs
[#250](https://github.com/obs-rust/obs-studio/pull/250),
[#322](https://github.com/obs-rust/obs-studio/pull/322), upstream
[obsproject/obs-studio#4667](https://github.com/obsproject/obs-studio/issues/4667),
[obsproject/obs-studio#10488](https://github.com/obsproject/obs-studio/issues/10488).
- A Text (FreeType 2) source that reads from a file shows the whole file,
also when the file contains NUL bytes. *All*, 2026-10-12. Issue
[#292](https://github.com/obs-rust/obs-studio/issues/292), PR
[#293](https://github.com/obs-rust/obs-studio/pull/293), upstream
[obsproject/obs-studio#7595](https://github.com/obsproject/obs-studio/issues/7595).
- A Media Source that plays once (Loop off), such as a GIF, now shows its
last frames. *All*, 2026-10-12. Issue
[#306](https://github.com/obs-rust/obs-studio/issues/306), PR
[#307](https://github.com/obs-rust/obs-studio/pull/307), upstream
[obsproject/obs-studio#10425](https://github.com/obsproject/obs-studio/issues/10425).
- Seeking in an audio file with embedded cover art continues from the new
position instead of ending playback. *All*, 2026-10-12. Issue
[#312](https://github.com/obs-rust/obs-studio/issues/312), PR
[#313](https://github.com/obs-rust/obs-studio/pull/313), upstream
[obsproject/obs-studio#11195](https://github.com/obsproject/obs-studio/issues/11195).
- Changing the audio track, subtitle track or network caching of a VLC Video
Source takes effect every time. *All*, 2026-10-12. Issue
[#314](https://github.com/obs-rust/obs-studio/issues/314), PR
[#315](https://github.com/obs-rust/obs-studio/pull/315), upstream
[obsproject/obs-studio#8346](https://github.com/obsproject/obs-studio/issues/8346).
- A VLC Video Source no longer shows subtitles while "Enable subtitles" is
off, also when the file has a default subtitle track or a subtitle file
beside it. *All*, 2026-11-18. Issue
[#5102](https://github.com/obs-rust/obs-studio/issues/5102), PR
[#5105](https://github.com/obs-rust/obs-studio/pull/5105), upstream
[obsproject/obs-studio#14199](https://github.com/obsproject/obs-studio/issues/14199).
- Yadif 2x deinterlacing shows bottom-field-first video in the correct
order. *All*, 2026-10-12. Issue
[#316](https://github.com/obs-rust/obs-studio/issues/316), PR
[#317](https://github.com/obs-rust/obs-studio/pull/317), upstream
[obsproject/obs-studio#6061](https://github.com/obsproject/obs-studio/issues/6061).
- Scale filtering works on rotated scene items instead of aliasing or making
them transparent. *All*, 2026-10-12. Issue
[#371](https://github.com/obs-rust/obs-studio/issues/371), PR
[#372](https://github.com/obs-rust/obs-studio/pull/372), upstream
[obsproject/obs-studio#12625](https://github.com/obsproject/obs-studio/issues/12625).
- A Stinger transition plays its whole clip when the clip's header gives a
short or no duration. *All*, 2026-10-12. Issue
[#373](https://github.com/obs-rust/obs-studio/issues/373), PR
[#374](https://github.com/obs-rust/obs-studio/pull/374), upstream
[obsproject/obs-studio#9755](https://github.com/obsproject/obs-studio/issues/9755).
- A Stinger transition set to "Monitor Only" before 33.0 no longer plays
into the stream and recordings after the upgrade: it loads with its
monitoring restored and muted, the 33.0 form of monitor-only. A
transition saved by 33.0 is unchanged. A new or edited Stinger can be
set to Monitor Only again: "Monitor Only (mute output)" under "Audio
Monitoring" keeps its clip in the monitor and out of the stream and
recordings. *All*, pending merge. Issues
[#2638](https://github.com/obs-rust/obs-studio/issues/2638),
[#5391](https://github.com/obs-rust/obs-studio/issues/5391), upstream
[obsproject/obs-studio@646836a](https://github.com/obsproject/obs-studio/commit/646836a3118ca961653c69da1ece902bc3dd9f92),
[obsproject/obs-studio#14144](https://github.com/obsproject/obs-studio/issues/14144).
- Double-rate deinterlacing (Yadif 2x, Linear 2x, Discard 2x) shows every
field when the source field rate is not the canvas rate, so 50i on a 60
fps canvas is no longer choppy. *All*, 2026-10-12. Issue
[#394](https://github.com/obs-rust/obs-studio/issues/394), PR
[#395](https://github.com/obs-rust/obs-studio/pull/395), upstream
[obsproject/obs-studio#3402](https://github.com/obsproject/obs-studio/issues/3402).
- A FreeType 2 Text source set to "Read from file" shows a file that is
created after the source is loaded, without a restart. *All*, 2026-10-12.
Issue [#396](https://github.com/obs-rust/obs-studio/issues/396), PR
[#397](https://github.com/obs-rust/obs-studio/pull/397), upstream
[obsproject/obs-studio#3196](https://github.com/obsproject/obs-studio/issues/3196).
- A Media Source no longer leaks memory each time a read fails, for example
on a network timeout or at the end of a file. *All*, 2026-10-13. Issue
[#463](https://github.com/obs-rust/obs-studio/issues/463), PR
[#466](https://github.com/obs-rust/obs-studio/pull/466).
- A Media Source seek (seek bar or obs-websocket SetMediaInputCursor) goes
to the requested time, not to the keyframe before it. *All*, 2026-10-13.
Issue [#478](https://github.com/obs-rust/obs-studio/issues/478), PR
[#479](https://github.com/obs-rust/obs-studio/pull/479), upstream
[obsproject/obs-websocket#1190](https://github.com/obsproject/obs-websocket/issues/1190).
- Play after Stop or after the end of the file starts a Media Source again
from the beginning, from the hotkey or obs-websocket
TriggerMediaInputAction. *All*, 2026-10-13. Issue
[#504](https://github.com/obs-rust/obs-studio/issues/504), PR
[#505](https://github.com/obs-rust/obs-studio/pull/505), upstream
[obsproject/obs-websocket#1046](https://github.com/obsproject/obs-websocket/issues/1046).
- A Media Source follows a stream whose frame size or pixel format changes,
and the picture no longer freezes or becomes garbled. *All*, 2026-10-13.
Issue [#517](https://github.com/obs-rust/obs-studio/issues/517), PR
[#518](https://github.com/obs-rust/obs-studio/pull/518), upstream
[obsproject/obs-studio#5010](https://github.com/obsproject/obs-studio/issues/5010).
- An Image source reloads an image file that is replaced within the same
second. *All*, 2026-10-13. Issues
[#547](https://github.com/obs-rust/obs-studio/issues/547),
[#564](https://github.com/obs-rust/obs-studio/issues/564), PRs
[#548](https://github.com/obs-rust/obs-studio/pull/548),
[#565](https://github.com/obs-rust/obs-studio/pull/565), upstream
[obsproject/obs-studio#10700](https://github.com/obsproject/obs-studio/issues/10700).
- A cropped Media Source with show/hide transitions plays again when it is
shown after it played to its end. *All*, 2026-10-13. Issue
[#572](https://github.com/obs-rust/obs-studio/issues/572), PR
[#573](https://github.com/obs-rust/obs-studio/pull/573), upstream
[obsproject/obs-studio#10852](https://github.com/obsproject/obs-studio/issues/10852).
- A looped Media Source plays an .mp3 or a file that does not start at 0
again without a gap of silence and a held picture. *All*, 2026-10-13.
Issue [#576](https://github.com/obs-rust/obs-studio/issues/576), PR
[#577](https://github.com/obs-rust/obs-studio/pull/577), upstream
[obsproject/obs-studio#12028](https://github.com/obsproject/obs-studio/issues/12028).
- An Image Slide Show set to an aspect ratio such as 16:9 gets a real size
instead of 0x0. *All*, 2026-10-13. Issue
[#578](https://github.com/obs-rust/obs-studio/issues/578), PR
[#579](https://github.com/obs-rust/obs-studio/pull/579), upstream
[obsproject/obs-studio#11696](https://github.com/obsproject/obs-studio/issues/11696).
- Changing Antialiasing on a Text (FreeType 2) source that reads from a file
no longer blanks its characters. *All*, 2026-10-14. Issues
[#484](https://github.com/obs-rust/obs-studio/issues/484),
[#686](https://github.com/obs-rust/obs-studio/issues/686), PR
[#711](https://github.com/obs-rust/obs-studio/pull/711).
- A local Media Source that closes when inactive plays again when it is
restarted at its end, instead of showing nothing. *All*, 2026-10-14. PR
[#732](https://github.com/obs-rust/obs-studio/pull/732).
- Changing the settings of a Media Source no longer can crash OBS while the
old file is still opening. *All*, 2026-10-14. PR
[#733](https://github.com/obs-rust/obs-studio/pull/733).
- Undo and Redo in the Filters dialog step through each change correctly
when two settings change within half a second. *All*, 2026-10-14. Issue
[#765](https://github.com/obs-rust/obs-studio/issues/765), PR
[#766](https://github.com/obs-rust/obs-studio/pull/766), upstream
[obsproject/obs-studio#10628](https://github.com/obsproject/obs-studio/issues/10628).
- Seeking a paused local Media Source shows the new frame at once, also when
it caches the file. *All*, 2026-10-15. PR
[#731](https://github.com/obs-rust/obs-studio/pull/731).
- An emptied legacy slideshow clears and reports its end also in manual,
paused and deactivated modes, without a deadlock. *All*, 2026-10-15. PR
[#735](https://github.com/obs-rust/obs-studio/pull/735).
- Next on the last slide of an Image Slide Show in "Once" mode ends the
slideshow instead of going back to the first slide. *All*, 2026-10-15.
Issue [#792](https://github.com/obs-rust/obs-studio/issues/792), PR
[#793](https://github.com/obs-rust/obs-studio/pull/793).
- The Scroll filter shows sources wider or taller than 16384 pixels, such as
long text tickers; before, they disappeared. *All*, 2026-10-15. Issue
[#797](https://github.com/obs-rust/obs-studio/issues/797), PR
[#798](https://github.com/obs-rust/obs-studio/pull/798), upstream
[obsproject/obs-studio#10034](https://github.com/obsproject/obs-studio/issues/10034).
- Image Source and Image Slide Show follow the EXIF orientation with FFmpeg
8.1 and later, so portrait photos are no longer sideways. *All*,
2026-10-15. Issue
[#821](https://github.com/obs-rust/obs-studio/issues/821), PR
[#822](https://github.com/obs-rust/obs-studio/pull/822), upstream
[obsproject/obs-studio#5223](https://github.com/obsproject/obs-studio/issues/5223).
- When you close a VST plug-in window with its own close button, the filter
shows Open Plug-in Interface again and you can reopen the editor. *All*,
2026-10-16. Issue
[#1105](https://github.com/obs-rust/obs-studio/issues/1105), PR
[#1106](https://github.com/obs-rust/obs-studio/pull/1106), upstream
[obsproject/obs-studio#13580](https://github.com/obsproject/obs-studio/issues/13580).
- OBS no longer crashes when you pick a file, font or color in Properties
after the source refreshed its properties while the dialog was open.
*All*, 2026-10-16. Issue
[#1112](https://github.com/obs-rust/obs-studio/issues/1112), PR
[#1113](https://github.com/obs-rust/obs-studio/pull/1113), upstream
[obsproject/obs-studio#10423](https://github.com/obsproject/obs-studio/issues/10423).
- A Media Source playing a file whose timestamps do not start at 0, such as
MPEG-TS, shows the correct time and seeks to the correct position. *All*,
2026-10-16. Issue
[#1122](https://github.com/obs-rust/obs-studio/issues/1122), PR
[#1123](https://github.com/obs-rust/obs-studio/pull/1123).
- A Media Source playing a WebM with alpha from a URL shows the video, not
only the audio. *All*, 2026-10-16. Issue
[#1131](https://github.com/obs-rust/obs-studio/issues/1131), PR
[#1132](https://github.com/obs-rust/obs-studio/pull/1132).
- A Color Correction filter at its default settings leaves a high-precision
(16-bit) source such as macOS Screen Capture as it is; before, it turned
saturated colours (reds, greens) black or transparent. 8-bit sources look
the same as before. *All*, 2026-10-19. Issue
[#1471](https://github.com/obs-rust/obs-studio/issues/1471), PR
[#1472](https://github.com/obs-rust/obs-studio/pull/1472), upstream
[obsproject/obs-studio#10403](https://github.com/obsproject/obs-studio/issues/10403).
- An Image source given a picture larger than the GPU's texture size limit
fails at once, with a log line that gives the size and the limit, instead
of using gigabytes of memory and freezing OBS for seconds. *All*,
2026-10-19. Issue
[#1473](https://github.com/obs-rust/obs-studio/issues/1473), PR
[#1474](https://github.com/obs-rust/obs-studio/pull/1474), upstream
[obsproject/obs-studio#3427](https://github.com/obsproject/obs-studio/issues/3427).
- HDR Tone Mapping (and any filter that reads the colour space of what is
below it) works whatever the filter order: an audio filter such as Gain
or Noise Suppression below it no longer makes an HDR source look SDR.
*All*, 2026-10-19. Issue
[#1492](https://github.com/obs-rust/obs-studio/issues/1492), PR
[#1493](https://github.com/obs-rust/obs-studio/pull/1493), port of
[obsproject/obs-studio#13761](https://github.com/obsproject/obs-studio/pull/13761).
- Stopping a VLC Video Source playlist just as a track ends no longer crashes
OBS, and no longer lets the next item start playing after the Stop.
*All*, 2026-10-21. Issue
[#1677](https://github.com/obs-rust/obs-studio/issues/1677), PR
[#1678](https://github.com/obs-rust/obs-studio/pull/1678).
- Double-rate deinterlacing (Yadif 2x, Linear 2x, Discard 2x) shows both
fields of the first frame when a source starts, restarts or comes back
after a pause, instead of skipping the second field or holding the frame
too long (an unbuffered source still moves straight on when its next
frame is already waiting). *All*, pending merge. Issue
[#1965](https://github.com/obs-rust/obs-studio/issues/1965), PR
[#1995](https://github.com/obs-rust/obs-studio/pull/1995).
- Double-rate deinterlacing (Yadif 2x, Linear 2x, Discard 2x) shows every
frame of a buffered source after it falls behind and catches up, instead
of sometimes skipping the fields of a later frame and showing the frame
after it a frame early. *All*, pending merge. Issue
[#2009](https://github.com/obs-rust/obs-studio/issues/2009), PR
[#2048](https://github.com/obs-rust/obs-studio/pull/2048).
- A camera, capture card or media source whose deinterlace mode is not one
OBS knows (from an edited or generated scene collection, a plugin or a
script) is drawn with deinterlacing off, instead of drawing nothing, and
its Deinterlacing menu shows Disable. *All*, pending merge. Issue
[#2090](https://github.com/obs-rust/obs-studio/issues/2090).
- Display Capture can follow the same monitor after a dock or output change
during a session when its EDID manufacturer, product and serial identify
exactly one connected display. *Windows*, pending hardware validation and merge.
Issues [#2839](https://github.com/obs-rust/obs-studio/issues/2839),
[#2224](https://github.com/obs-rust/obs-studio/issues/2224), PR
[#2847](https://github.com/obs-rust/obs-studio/pull/2847).
- Screen Capture (XSHM) keeps capturing the monitor it was set to when
another monitor is unplugged or plugged in: it saves the RandR monitor's
name, not only its place in the list, and shows no other monitor when its
own goes away. *Linux*, 2026-10-25. Issue
[#2261](https://github.com/obs-rust/obs-studio/issues/2261), upstream
[obsproject/obs-studio#5502](https://github.com/obsproject/obs-studio/issues/5502).
- On macOS, a first browser source created by obs-websocket (`CreateInput`)
renders. Before, CEF started on obs-websocket's thread, and no browser
source rendered for the rest of the session, also ones added in the UI
later. If that first source arrives while OBS quits, after Qt's main loop
has stopped, OBS leaves CEF uninitialized and quits, instead of hanging.
*macOS*, 2026-10-25 (the quit part pending merge). Issues
[#2387](https://github.com/obs-rust/obs-studio/issues/2387),
[#2391](https://github.com/obs-rust/obs-studio/issues/2391), PRs
[#2390](https://github.com/obs-rust/obs-studio/pull/2390),
[obs-rust/obs-browser#10](https://github.com/obs-rust/obs-browser/pull/10),
[obs-rust/obs-browser#11](https://github.com/obs-rust/obs-browser/pull/11).
- A frame of an animated GIF whose last LZW code ends on a byte boundary at
the end of the frame's data no longer loses its last pixels (backport of
libnsgif 2255b2f74). *All*, 2026-10-26. Issue
[#2465](https://github.com/obs-rust/obs-studio/issues/2465), PR
[#2468](https://github.com/obs-rust/obs-studio/pull/2468).
- Image sources report the memory their picture uses again, and an Image
Slide Show saved before the slideshow rework keeps no more than about
400 MiB of slides decoded: the slides past that are loaded only around
the one on screen, and every slide is still shown in order. Newer
slideshows are unchanged. *All*, pending merge. Issue
[#2279](https://github.com/obs-rust/obs-studio/issues/2279), upstream
[obsproject/obs-studio#14076](https://github.com/obsproject/obs-studio/issues/14076).
- In such a slideshow, Next and Previous report the new slide's index (the
`current_index` procedure) only once its transition has started, not
while a slide past the memory cap is still being decoded. *All*, pending
merge. Issue [#3789](https://github.com/obs-rust/obs-studio/issues/3789).
- Shader effects that give an `int` or `bool` parameter a default value (in
a plugin's shader filter or a custom `.effect` file) now draw with that
default on Linux and macOS, instead of 0 or false with a "Size of shader
param does not match" error in the log. *Linux, macOS*, 2026-10-27.
Issue [#2548](https://github.com/obs-rust/obs-studio/issues/2548).
- **Effect int values past the int range.** An `int` default or an array
size in a shader effect (a plugin's shader filter or a custom `.effect`
file) past the `int` range now reads as the nearest `int` on every
platform: `3000000000` gives 2147483647 instead of -1294967296 on Linux and
macOS, and `-2147483648` gives -2147483648 instead of -2147483647 on
Windows. The same holds for the `int` defaults of a plain shader, read by
the shader parser, while a plain shader's array size past the range is now
a parse error, as a size that is not a number is, instead of wrapping to
another size. Values inside the range are unchanged.
*All*, 2026-11-02. Issues
[#3464](https://github.com/obs-rust/obs-studio/issues/3464) and
[#3468](https://github.com/obs-rust/obs-studio/issues/3468).
- A frame read in parts, the way a Media Source scans an animated GIF, no
longer makes the rest of the frame decode as a separate block when the read
stops at the end of the frame's data: the next scan starts the frame again,
so the frames after it decode instead of coming out corrupted. *All*,
2026-10-27. Issue
[#2515](https://github.com/obs-rust/obs-studio/issues/2515), PR
[#2516](https://github.com/obs-rust/obs-studio/pull/2516).
- A plugin source that lists its child sources only as "all sources" (not
as active ones) is now checked for loops: setting or starting a
transition to it while it holds that transition, moving a scene item
into a scene it holds, or adding it as an active child of a source it
holds is refused, instead of being accepted and risking a hang. *All*,
2026-10-29. Issue
[#2942](https://github.com/obs-rust/obs-studio/issues/2942).
- Undoing a filter change on a source that has a filter from a plugin that
isn't loaded no longer brings that filter back as a public source (one that
takes a place among the source names, and is renamed if a source already
has its name). A script or plugin can no longer put one filter on two
sources at once, leave a source's filters locked for good by adding a
filter that is being destroyed, or set off a reorder of a source's filters
with a movement that doesn't exist. *All*, 2026-10-30. Issue
[#2981](https://github.com/obs-rust/obs-studio/issues/2981).
- A shader effect (a plugin's shader filter or a custom `.effect` file)
whose pass names a vertex or pixel function the file doesn't define now
fails only that shader. The pass's other shader no longer leaves out the
parameters the bad call named, so the log shows no extra
undeclared-identifier errors pointing away from the typo, and loading the
effect no longer leaks a little memory each time. *All*, 2026-11-04.
Issue [#3625](https://github.com/obs-rust/obs-studio/issues/3625).
- Media Source status queries from the UI or scripts now synchronize with
decoding when reporting playback time, frame count, stream availability
and playback state. *All*, 2026-11-05. Issue
[#3572](https://github.com/obs-rust/obs-studio/issues/3572), PR
[#3643](https://github.com/obs-rust/obs-studio/pull/3643).
- A shader effect (a plugin's shader filter or a custom `.effect` file)
whose vertex or pixel function takes two or more separately mapped
parameters, such as `float4 pos : POSITION, float2 uv : TEXCOORD0`, now
compiles. The generated `main()` used to run them together with no comma,
so the shader failed with a syntax error in code the file doesn't
contain. *All*, 2026-11-06. Issue
[#3768](https://github.com/obs-rust/obs-studio/issues/3768).
- A browser runtime that never finishes starting no longer leaves OBS waiting
forever at quit. A startup warning names the CEF version and explains why
browser sources and docks are unavailable. A slow runtime can still recover.
*Linux*, 2026-11-07. Issue
[#3833](https://github.com/obs-rust/obs-studio/issues/3833).
- A new Image Slide Show plays the images of a folder in name order on Linux
and macOS too (slide2 before slide10), instead of the filesystem's order.
A Folder Order setting chooses Name (natural), Name (A-Z) or Filesystem
order; slideshows saved before keep filesystem order. *All*, pending
merge. Issue [#3451](https://github.com/obs-rust/obs-studio/issues/3451),
upstream
[obsproject/obs-studio#10382](https://github.com/obsproject/obs-studio/issues/10382).
### Scenes and UI
- Edit > Undo is no longer clickable when there is nothing to undo; it was
enabled again after loading a scene collection or closing the Filters
dialog, even with an empty history. *All*, 2026-10-24. Issue
[#2222](https://github.com/obs-rust/obs-studio/issues/2222).
- Theme metadata, theme string variables and effect annotation strings that
contain escape characters no longer end with a stray closing quote. *All*,
2026-10-09. Issue [#48](https://github.com/obs-rust/obs-studio/issues/48),
PR [#54](https://github.com/obs-rust/obs-studio/pull/54).
- Hotkeys from saved files or plugins can no longer be bound to the left or
right mouse button, so a normal click does not trigger a hotkey. *All*,
2026-10-09. PR [#56](https://github.com/obs-rust/obs-studio/pull/56),
upstream
[obsproject/obs-studio#13403](https://github.com/obsproject/obs-studio/issues/13403).
- A source moved into or out of a hidden group now becomes active or
inactive correctly, so it no longer plays audio while hidden or stays
silent while visible. *All*, 2026-10-11. Issue
[#241](https://github.com/obs-rust/obs-studio/issues/241), PR
[#242](https://github.com/obs-rust/obs-studio/pull/242), upstream
[obsproject/obs-studio#9961](https://github.com/obsproject/obs-studio/issues/9961).
- Moving one child of a group no longer moves the other children of the
group across the canvas. *All*, 2026-10-11. Issue
[#279](https://github.com/obs-rust/obs-studio/issues/279), PR
[#280](https://github.com/obs-rust/obs-studio/pull/280), upstream
[obsproject/obs-studio#9298](https://github.com/obsproject/obs-studio/issues/9298).
- Moving a scene into a group that the scene contains is refused instead of
crashing OBS. *All*, 2026-10-12. Issue
[#303](https://github.com/obs-rust/obs-studio/issues/303), PR
[#304](https://github.com/obs-rust/obs-studio/pull/304), upstream
[obsproject/obs-studio#10466](https://github.com/obsproject/obs-studio/issues/10466).
- Hiding a group now stops children that have show/hide transitions, so a
hidden media source no longer plays. *All*, 2026-10-12. Issue
[#324](https://github.com/obs-rust/obs-studio/issues/324), PR
[#325](https://github.com/obs-rust/obs-studio/pull/325), upstream
[obsproject/obs-studio#5551](https://github.com/obsproject/obs-studio/issues/5551).
- The Studio Mode Program view, a duplicated scene and an ungrouped item now
draw scene items at the correct size. *All*, 2026-10-12. Issue
[#345](https://github.com/obs-rust/obs-studio/issues/345), PR
[#346](https://github.com/obs-rust/obs-studio/pull/346), upstream
[obsproject/obs-studio#12171](https://github.com/obsproject/obs-studio/issues/12171).
- In Studio Mode, the Program view follows the window to a screen with
another pixel ratio (for example from a Retina display to an external
display) and keeps its size and position, instead of keeping the old
layout until the window is resized. Projectors and other previews follow
too. *All* (seen on macOS), 2026-11-08. Issue
[#4010](https://github.com/obs-rust/obs-studio/issues/4010), PR
[#4052](https://github.com/obs-rust/obs-studio/pull/4052).
- On X11 with a second keyboard layout, hotkeys on keys like [ and ] use the
correct key instead of a number key. *Linux*, 2026-10-12. Issue
[#349](https://github.com/obs-rust/obs-studio/issues/349), PR
[#350](https://github.com/obs-rust/obs-studio/pull/350), upstream
[obsproject/obs-studio#12941](https://github.com/obsproject/obs-studio/issues/12941).
- In Studio Mode, hiding a source that is only in the Preview now hides it,
so "Shutdown source when not visible" works. *All*, 2026-10-12. Issue
[#357](https://github.com/obs-rust/obs-studio/issues/357), PR
[#358](https://github.com/obs-rust/obs-studio/pull/358), upstream
[obsproject/obs-studio#4120](https://github.com/obsproject/obs-studio/issues/4120).
- Copy Transform and Paste Transform work with items inside groups and use
canvas positions. *All*, 2026-10-12. Issue
[#361](https://github.com/obs-rust/obs-studio/issues/361), PR
[#362](https://github.com/obs-rust/obs-studio/pull/362), upstream
[obsproject/obs-studio#5478](https://github.com/obsproject/obs-studio/issues/5478).
- Paste Filters pastes into every selected source, not only one. *All*,
2026-10-12. Issue
[#365](https://github.com/obs-rust/obs-studio/issues/365), PR
[#366](https://github.com/obs-rust/obs-studio/pull/366), upstream
[obsproject/obs-studio#4290](https://github.com/obsproject/obs-studio/issues/4290).
- The time in the media controls follows the media time, also on long files.
*All*, 2026-10-12. Issue
[#381](https://github.com/obs-rust/obs-studio/issues/381), PR
[#382](https://github.com/obs-rust/obs-studio/pull/382), upstream
[obsproject/obs-studio#11183](https://github.com/obsproject/obs-studio/issues/11183).
- A source added to an empty group with a bounding box keeps a valid
transform and is drawn in the group's box. *All*, 2026-10-12. Issue
[#387](https://github.com/obs-rust/obs-studio/issues/387), PR
[#388](https://github.com/obs-rust/obs-studio/pull/388), upstream
[obsproject/obs-studio#4245](https://github.com/obsproject/obs-studio/issues/4245).
- A fresh profile no longer logs a false "Failed to rename basic scene
collection file" error. *All*, 2026-10-13. Issue
[#155](https://github.com/obs-rust/obs-studio/issues/155), PR
[#419](https://github.com/obs-rust/obs-studio/pull/419).
- The Decklink Captions and Decklink Output tools show their real menu and
button text instead of raw text keys. *All*, 2026-10-13. Issue
[#157](https://github.com/obs-rust/obs-studio/issues/157), PR
[#421](https://github.com/obs-rust/obs-studio/pull/421).
- A normal shutdown no longer logs the warning "Tried to call
obs_frontend_remove_event_callback with no callbacks!". *All*, 2026-10-13.
Issue [#156](https://github.com/obs-rust/obs-studio/issues/156), PR
[#425](https://github.com/obs-rust/obs-studio/pull/425).
- Turning Studio Mode off no longer sends scene-changed events for scenes
that did not go live, so obs-websocket clients and Advanced Scene Switcher
see no false CurrentProgramSceneChanged. *All*, 2026-10-13. PR
[#481](https://github.com/obs-rust/obs-studio/pull/481), upstream
[obsproject/obs-websocket#1150](https://github.com/obsproject/obs-websocket/issues/1150).
- Switching scenes quickly when a scene has a transition override no longer
locks the program output on one scene. *All*, 2026-10-13. Issue
[#555](https://github.com/obs-rust/obs-studio/issues/555), PR
[#556](https://github.com/obs-rust/obs-studio/pull/556), upstream
[obsproject/obs-studio#11914](https://github.com/obsproject/obs-studio/issues/11914).
- In Studio Mode, a preview scene set while a transition runs stays in the
preview and is not replaced by the old program scene. *All*, 2026-10-13.
Issue [#560](https://github.com/obs-rust/obs-studio/issues/560), PR
[#561](https://github.com/obs-rust/obs-studio/pull/561), upstream
[obsproject/obs-websocket#1320](https://github.com/obsproject/obs-websocket/issues/1320).
- In Studio Mode, a program switch that is refused because a transition is
still running no longer becomes the current program scene: the frontend
API and obs-websocket keep naming the scene on the program, and turning
Studio Mode off no longer cuts to the refused scene. *All*, 2026-11-18.
Issue [#5017](https://github.com/obs-rust/obs-studio/issues/5017), PR
[#5020](https://github.com/obs-rust/obs-studio/pull/5020), upstream
[obsproject/obs-studio#14217](https://github.com/obsproject/obs-studio/issues/14217).
- On the Advanced Streaming tab, the Rescale Output resolution is greyed out
when Rescale Output is Disabled. *All*, 2026-10-13. Issue
[#585](https://github.com/obs-rust/obs-studio/issues/585), PR
[#586](https://github.com/obs-rust/obs-studio/pull/586), upstream
[obsproject/obs-studio#11908](https://github.com/obsproject/obs-studio/issues/11908).
- Profile and scene collection names that contain '&' show correctly in the
menus. *All*, 2026-10-13. Issue
[#587](https://github.com/obs-rust/obs-studio/issues/587), PR
[#588](https://github.com/obs-rust/obs-studio/pull/588), upstream
[obsproject/obs-studio#12853](https://github.com/obsproject/obs-studio/issues/12853).
- The selected built-in transition stays selected when you change the UI
language. *All*, 2026-10-13. Issue
[#590](https://github.com/obs-rust/obs-studio/issues/590), PR
[#591](https://github.com/obs-rust/obs-studio/pull/591), upstream
[obsproject/obs-studio#11844](https://github.com/obsproject/obs-studio/issues/11844).
- The Add Source dialog lists existing sources of a type by name again.
*All*, 2026-10-13. Issue
[#604](https://github.com/obs-rust/obs-studio/issues/604), PR
[#605](https://github.com/obs-rust/obs-studio/pull/605), upstream
[obsproject/obs-studio#13947](https://github.com/obsproject/obs-studio/issues/13947).
- In Settings > Stream, "Show all..." in the Service list no longer enables
Apply or causes a false unsaved-changes prompt. *All*, 2026-10-13. Issue
[#608](https://github.com/obs-rust/obs-studio/issues/608), PR
[#609](https://github.com/obs-rust/obs-studio/pull/609), upstream
[obsproject/obs-studio#9860](https://github.com/obsproject/obs-studio/issues/9860).
- Show Transition and Hide Transition from the Sources context menu apply to
all selected sources, not only one. *All*, 2026-10-14. Issue
[#757](https://github.com/obs-rust/obs-studio/issues/757), PR
[#758](https://github.com/obs-rust/obs-studio/pull/758), upstream
[obsproject/obs-studio#10448](https://github.com/obsproject/obs-studio/issues/10448).
- The Replay Buffer memory estimate in Settings > Output goes back to the
normal colour when it is under the limit again. *All*, 2026-10-14. Issue
[#759](https://github.com/obs-rust/obs-studio/issues/759), PR
[#760](https://github.com/obs-rust/obs-studio/pull/760), upstream
[obsproject/obs-studio#13171](https://github.com/obsproject/obs-studio/issues/13171).
- A Settings > Hotkeys field records Alt+C and Alt+O; before, these keys
pressed Cancel or OK on KDE and GNOME. *Linux*, 2026-10-14. Issue
[#763](https://github.com/obs-rust/obs-studio/issues/763), PR
[#764](https://github.com/obs-rust/obs-studio/pull/764), upstream
[obsproject/obs-studio#13385](https://github.com/obsproject/obs-studio/issues/13385).
- In Studio Mode with "Duplicate Sources", editing a source inside a group
in Preview no longer changes Program before the transition. *All*,
2026-10-15. Issue
[#823](https://github.com/obs-rust/obs-studio/issues/823), PR
[#824](https://github.com/obs-rust/obs-studio/pull/824), upstream
[obsproject/obs-studio#4309](https://github.com/obsproject/obs-studio/issues/4309),
[obsproject/obs-studio#6977](https://github.com/obsproject/obs-studio/issues/6977).
- Safe Mode and --only-bundled-plugins no longer show the Plugin Errors
dialog, and removing a Missing plugin in the Plugin Manager removes the
correct plugin. *All*, 2026-10-16. Issue
[#1079](https://github.com/obs-rust/obs-studio/issues/1079), PR
[#1080](https://github.com/obs-rust/obs-studio/pull/1080), upstream
[obsproject/obs-studio#13948](https://github.com/obsproject/obs-studio/issues/13948),
[obsproject/obs-studio#14005](https://github.com/obsproject/obs-studio/issues/14005).
- Shift+Tab out of a hotkey field in Settings > Hotkeys only moves the focus
and no longer binds Shift to that action. *All*, 2026-10-16. Issue
[#1114](https://github.com/obs-rust/obs-studio/issues/1114), PR
[#1115](https://github.com/obs-rust/obs-studio/pull/1115), upstream
[obsproject/obs-studio#12475](https://github.com/obsproject/obs-studio/issues/12475).
- In a tall Settings window, the audio track buttons on the Output page stay
next to their Audio Track label. *All*, 2026-10-17. Issue
[#1135](https://github.com/obs-rust/obs-studio/issues/1135), PR
[#1136](https://github.com/obs-rust/obs-studio/pull/1136), upstream
[obsproject/obs-studio#13286](https://github.com/obsproject/obs-studio/issues/13286).
- Screenshot (Source) of a 10-bit or 12-bit source saves the colors that OBS
shows, not a much darker picture. *Linux, macOS*, 2026-10-17. Issue
[#1143](https://github.com/obs-rust/obs-studio/issues/1143), PR
[#1144](https://github.com/obs-rust/obs-studio/pull/1144), upstream
[obsproject/obs-studio#13209](https://github.com/obsproject/obs-studio/issues/13209).
- Recording to a network or NAS path that stops responding no longer
freezes the window every second: the free-space check while recording and
in the Stats window runs off the UI thread. *All*, 2026-10-17. Issue
[#1282](https://github.com/obs-rust/obs-studio/issues/1282), PR
[#1336](https://github.com/obs-rust/obs-studio/pull/1336).
- Quitting OBS while recording no longer freezes the window while the
recording finishes: OBS waits for the recording's stop signal with the
event loop running (still up to 5 s, then a forced stop) instead of
sleeping on the UI thread. *All*, 2026-10-17. Issue
[#1283](https://github.com/obs-rust/obs-studio/issues/1283), PR
[#1342](https://github.com/obs-rust/obs-studio/pull/1342).
- Recording shutdown waits until the output actually reports inactive,
including the interval after its deactivate signal; a signal alone no
longer permits premature shutdown. The UI keeps processing events within
the existing timeout. *All*, 2026-10-18. Issue
[#1391](https://github.com/obs-rust/obs-studio/issues/1391).
- Output deactivation publishes the inactive state before notifying signal
consumers, preventing a shutdown observer from seeing an active output
after deactivation. *All*, 2026-10-21. PR
[#1643](https://github.com/obs-rust/obs-studio/pull/1643).
- Exit in the tray menu quits OBS when it was started with
`--minimize-to-tray` and its window was never shown; before, nothing
happened. *Linux (Wayland)*, 2026-10-18. Issue
[#1400](https://github.com/obs-rust/obs-studio/issues/1400), upstream
[obsproject/obs-studio#13494](https://github.com/obsproject/obs-studio/issues/13494).
- A source set to Darken blending leaves the background where it is
transparent; before, it drew black there and cut a hole in the scene's
alpha. *All*, 2026-10-18. Issue
[#1404](https://github.com/obs-rust/obs-studio/issues/1404), upstream
[obsproject/obs-studio#6591](https://github.com/obsproject/obs-studio/issues/6591).
- The Text (FreeType 2) source uses the font face that was picked when it
is not the first face of its file: Bold and other styles of variable
fonts, and the language faces of font collections such as Noto Sans CJK.
Before, these rendered as the file's first face. *Linux*, 2026-10-18.
Issue [#1409](https://github.com/obs-rust/obs-studio/issues/1409),
upstream [obsproject/obs-studio#11819](https://github.com/obsproject/obs-studio/issues/11819).
- Help > Crash Reports > Upload Last Crash Report with no crash log to
upload shows "No file to upload found or file was empty." Before, the
dialog stayed at "Uploading..." for good. *Windows, macOS*, 2026-10-19.
Issue [#1482](https://github.com/obs-rust/obs-studio/issues/1482), PR
[#1483](https://github.com/obs-rust/obs-studio/pull/1483), upstream
[obsproject/obs-studio#13401](https://github.com/obsproject/obs-studio/issues/13401),
port of
[obsproject/obs-studio#13414](https://github.com/obsproject/obs-studio/pull/13414).
- A plugin that reads or releases the Studio Mode T-Bar while Studio Mode is
off (at startup, for example) no longer crashes OBS: the T-Bar reads as 0
and a release does nothing. *All*, 2026-10-19. Issue
[#1478](https://github.com/obs-rust/obs-studio/issues/1478), PR
[#1479](https://github.com/obs-rust/obs-studio/pull/1479), port of
[obsproject/obs-studio#13128](https://github.com/obsproject/obs-studio/pull/13128).
- Studio Mode with "Duplicate Scene" no longer logs "Attempted to add Scene
without specifying a canvas!" on every transition, and a plugin's private
copy of a scene on a second canvas (a vertical canvas, for example) is
sized for that canvas instead of the main one. *All*, 2026-10-19. Issue
[#1480](https://github.com/obs-rust/obs-studio/issues/1480), PR
[#1481](https://github.com/obs-rust/obs-studio/pull/1481), port of
[obsproject/obs-studio#12824](https://github.com/obsproject/obs-studio/pull/12824).
- Hotkey entries that bind nothing (no key and no modifier, saved as
`{"key":"OBS_KEY_NONE"}`) are dropped when a profile or scene collection
loads, so they are no longer saved back; such files still load as before.
A load that clears a hotkey's bindings now tells Settings > Hotkeys and
the Wayland global shortcuts. *All*, 2026-10-21. Issue
[#1648](https://github.com/obs-rust/obs-studio/issues/1648), PR
[#1649](https://github.com/obs-rust/obs-studio/pull/1649).
- On Linux, Settings > Hotkeys shows the arrow keys (Left, Right, Up, Down)
in the chosen language; before, they were always in English. On every
platform, a locale file or plugin with an empty numpad or mouse button
name template no longer crashes OBS at startup; those keys keep their
English names. *All*, 2026-10-21. Issue
[#1656](https://github.com/obs-rust/obs-studio/issues/1656), PR
[#1673](https://github.com/obs-rust/obs-studio/pull/1673).
- A scene collection with a negative scene item crop (edited by hand or
written by another tool) loads with that crop at 0, as the Edit
Transform dialog and obs-websocket set it; before, the item was drawn
2 pixels wide or high. A crop past the integer range, the crop of a
nested scene that grows far, and the size of a group whose sources are
very far apart now get the nearest value in range instead of a wrong
one. *All*, 2026-10-22. Issue
[#1839](https://github.com/obs-rust/obs-studio/issues/1839), PR
[#1840](https://github.com/obs-rust/obs-studio/pull/1840).
- A scene collection whose transition has an unknown scale type (edited by
hand or written by another tool) loads with the default, which only
scales sources down to fit; before, the transition drew its scenes with
an undefined scale. *All*, pending merge. Issue
[#2064](https://github.com/obs-rust/obs-studio/issues/2064), PR
[#2080](https://github.com/obs-rust/obs-studio/pull/2080).
- The docks keep the sizes you gave them. OBS saves the width of each dock
in its row and the depth of each dock area (`BasicWindow/DockSizes`, next
to the layout in `BasicWindow/DockState`). Only you change them: drag a
separator, or move, float, hide, show or tab a dock. A window change does
not change them: when the window narrows, a tiling window manager (for
example Hyprland) retiles it, or a floated dock takes half the tile, the
docks keep their shares of the row, and the Scenes/Sources column keeps its
width while the preview has room. A quit from a small window saves the
layout you set, not the squeezed one. A start with no saved sizes (the
first start after the update, a layout from upstream OBS, Reset Docks, a
Twitch, Restream or YouTube layout) shows the saved layout again at each
window change until the window shows it in full or you change a dock.
Upstream OBS reads the same `DockState`. *All*, pending merge. Issues
[#2225](https://github.com/obs-rust/obs-studio/issues/2225),
[#3740](https://github.com/obs-rust/obs-studio/issues/3740),
[#5230](https://github.com/obs-rust/obs-studio/issues/5230), PRs
[#2727](https://github.com/obs-rust/obs-studio/pull/2727),
[#2731](https://github.com/obs-rust/obs-studio/pull/2731),
[#2743](https://github.com/obs-rust/obs-studio/pull/2743),
[#3796](https://github.com/obs-rust/obs-studio/pull/3796),
[#4841](https://github.com/obs-rust/obs-studio/pull/4841),
[#5245](https://github.com/obs-rust/obs-studio/pull/5245),
[#5362](https://github.com/obs-rust/obs-studio/pull/5362),
[#5411](https://github.com/obs-rust/obs-studio/pull/5411).
- Importing a profile from a folder path that ends in a slash (as the
macOS folder dialog returns it) creates the profile in a folder of its
own; before, its files were copied into the profiles folder itself and no
profile showed up. *All*, pending merge. Issue
[#2295](https://github.com/obs-rust/obs-studio/issues/2295), upstream
[obsproject/obs-studio#13862](https://github.com/obsproject/obs-studio/issues/13862).
- On Linux, Settings > Hotkeys names the Volume Up and Volume Down keys
correctly; before, each showed and saved as the other, so a profile moved
from Windows, or a binding from a script or plugin, fired on the other
key. Existing hotkeys keep firing on the key they were set with.
*Linux*, 2026-10-27. Issue
[#2635](https://github.com/obs-rust/obs-studio/issues/2635).
- A flipped item without a bounding box is now placed where x86-64 puts it on
arm64 too: the negative scaled size no longer saturates to zero, which
offset the item by half or all of its size on Apple Silicon and arm64
Linux. *Linux, macOS*, pending merge. Issue
[#2637](https://github.com/obs-rust/obs-studio/issues/2637), PRs
[#2654](https://github.com/obs-rust/obs-studio/pull/2654).
- On macOS, a hotkey bound to a mouse button follows that button: Mouse 1
is the left button, Mouse 2 the right, and so on. Before, OBS tested an
unrelated bit of the pressed buttons, so the hotkey's state was arbitrary.
*macOS*, 2026-10-29. Issue
[#2914](https://github.com/obs-rust/obs-studio/issues/2914).
- On X11, a mouse-button hotkey also follows a raw button event that
carries X's send-event mark, and no longer takes three unrelated kinds of
X event for a mouse button. A mouse button numbered 0
is logged as unsupported instead of being stored outside OBS's button
table, and a script or plugin asking the name of a value that isn't a key
gets no name instead of a read past the key table. *Linux, FreeBSD*,
2026-10-30. Issue
[#3098](https://github.com/obs-rust/obs-studio/issues/3098).
- Duplicating a scene that holds a group no longer names the group's copy
`__unnamed0000`, `__unnamed0001`, ...: the copy of group "G" is "G 2".
*All*, 2026-11-18. Issue
[#4991](https://github.com/obs-rust/obs-studio/issues/4991), upstream
[obsproject/obs-studio#14145](https://github.com/obsproject/obs-studio/issues/14145).
- Cmd+Q, logoff and shutdown quit OBS when a main dock (Scenes, Sources,
Audio Mixer, Scene Transitions, Controls) floats; before, the quit could
be cancelled, and OBS then stayed open for the rest of the session, also
for File → Exit. *All*, 2026-11-21. Issue
[#5406](https://github.com/obs-rust/obs-studio/issues/5406), PR
[#5410](https://github.com/obs-rust/obs-studio/pull/5410).
- On macOS a floating dock (for example Scenes or Stats on a second display)
stays visible while another app is in front; before, it disappeared until
OBS was active again. *macOS*, 2026-11-21. Issue
[#5409](https://github.com/obs-rust/obs-studio/issues/5409), PR
[#5412](https://github.com/obs-rust/obs-studio/pull/5412).
- After a floating dock is moved, the main window still lays out its docks:
they follow a resize, and a dock that is docked again goes back to its
place. Before, on macOS, the docks stayed as they were, and a docked dock
kept its floating position outside the window until Reset Docks. *macOS*,
2026-11-21. Issue
[#5416](https://github.com/obs-rust/obs-studio/issues/5416).
- Closing the window of a floating main dock (Scenes, Sources, Audio Mixer,
Scene Transitions, Controls) puts the dock back into the main window; before,
the dock stayed open and OBS showed "You just closed a dockable window". The
close key (Cmd+W on macOS, Ctrl+W or Ctrl+F4 elsewhere) closes the focused
floating dock: a main dock goes back, other docks hide. In the main window
the key does nothing. *All*, 2026-11-22. Issue
[#5408](https://github.com/obs-rust/obs-studio/issues/5408).
- The dock layout of a logged-in service (Twitch, YouTube, Restream) keeps the
sizes you gave its docks: OBS saves them with the layout
(`/DockSizes`, a new key that upstream OBS ignores). Before, each
login started that layout without its dock sizes. *All*, 2026-11-22. Issue
[#5455](https://github.com/obs-rust/obs-studio/issues/5455).
### Scripting
- A busy Lua source no longer makes the graphics thread poll its locks. OBS
uses cached dimensions or skips that source's render call until the lock is
available, allowing the rest of the frame to proceed. All; pending merge.
Issue [#1275](https://github.com/obs-rust/obs-studio/issues/1275).
- quat_set, which Lua and Python scripts can call, now stores the x, y, z
and w values in the correct order. *All*, 2026-10-10. PR
[#86](https://github.com/obs-rust/obs-studio/pull/86).
- In Python scripts, sys.stdout and sys.stderr behave like normal text
streams, so libraries that call isatty() and similar methods work. *All*,
2026-10-11. Issue
[#234](https://github.com/obs-rust/obs-studio/issues/234), PR
[#235](https://github.com/obs-rust/obs-studio/pull/235), upstream
[obsproject/obs-studio#4628](https://github.com/obsproject/obs-studio/issues/4628).
- A Lua script that makes a video source and enters graphics no longer
freezes OBS; the source skips one frame instead. *All*, 2026-10-11. Issue
[#238](https://github.com/obs-rust/obs-studio/issues/238), PR
[#239](https://github.com/obs-rust/obs-studio/pull/239), upstream
[obsproject/obs-studio#6674](https://github.com/obsproject/obs-studio/issues/6674).
- A plugin or script that calls gs_matrix_scale3f outside a graphics
context no longer crashes OBS; the call logs and returns, as the other
gs_matrix functions do. *All*, pending merge. Issue
[#2518](https://github.com/obs-rust/obs-studio/issues/2518), PR
[#2520](https://github.com/obs-rust/obs-studio/pull/2520).
- After a plugin or script resets the blend state with
gs_reset_blend_state, the blend op is back to add; a subtract, min or
max op set before no longer carries over into later drawing. *All*,
pending merge. Issue
[#2519](https://github.com/obs-rust/obs-studio/issues/2519), PR
[#2528](https://github.com/obs-rust/obs-studio/pull/2528).
- A plugin or script that draws with gs_render_start no longer reads or
writes past OBS's arrays: a texture coordinate for a unit outside 0-15,
or above 0 in immediate mode, is ignored; a saved vertex buffer with a
shorter normal, colour or texture array draws only the vertices those
arrays cover; and a stop or save with no vertex no longer frees the
vertex data twice or leaks its arrays. *All*, 2026-10-31. Issue
[#3132](https://github.com/obs-rust/obs-studio/issues/3132).
- Python scripts can call obs_source_enum_filters to get a list of the
filters on a source. *All*, 2026-10-11. Issue
[#282](https://github.com/obs-rust/obs-studio/issues/282), PR
[#283](https://github.com/obs-rust/obs-studio/pull/283), upstream
[obsproject/obs-studio#12116](https://github.com/obsproject/obs-studio/issues/12116).
- Lua and Python scripts can read the obs-defs.h constants, such as
OBS_ALIGN_*. *All*, 2026-10-12. Issue
[#383](https://github.com/obs-rust/obs-studio/issues/383), PR
[#384](https://github.com/obs-rust/obs-studio/pull/384), upstream
[obsproject/obs-studio#8936](https://github.com/obsproject/obs-studio/issues/8936).
- A Lua or Python script that switches scenes from a timer no longer hangs
OBS when it also has a frontend event callback; the scene changes right
after the timer returns. *All*, 2026-10-18. Issue
[#1416](https://github.com/obs-rust/obs-studio/issues/1416), PR
[#1417](https://github.com/obs-rust/obs-studio/pull/1417), upstream
[obsproject/obs-studio#3385](https://github.com/obsproject/obs-studio/issues/3385).
- A script or plugin can no longer lose or misplace a scene item through the
scene order calls: an unknown order movement leaves the item where it is,
a reorder list that leaves items out, repeats them or names items from
elsewhere is refused, removing an item from a group it is not in does
nothing, asking the position of, or ungrouping, an item that is in no
scene returns instead of crashing, and inserting a group with an empty
item list adds an empty group on top instead of crashing or placing it
after an unrelated item. *All*, 2026-10-29. Issues
[#2895](https://github.com/obs-rust/obs-studio/issues/2895),
[#2945](https://github.com/obs-rust/obs-studio/issues/2945).
- A plugin or script that asks obs_key_to_virtual_key for a key OBS doesn't
have gets 0 on X11 and Windows, as for a key with no keysym or virtual
key, or 0xFF on macOS, as for a key with no virtual key code, instead of
an arbitrary number or a value read past the key table. *Linux, macOS,
Windows*, 2026-10-29. Issues
[#2901](https://github.com/obs-rust/obs-studio/issues/2901),
[#2914](https://github.com/obs-rust/obs-studio/issues/2914),
[#3076](https://github.com/obs-rust/obs-studio/issues/3076).
- Duplicating a scene from a script or plugin, or in Studio Mode with
"Duplicate Sources", no longer gives an item the wrong source when a
source used by several items follows an item that could not be copied,
and duplicating a source that fails to initialize returns nothing
instead of crashing. *All*, 2026-10-29. Issue
[#2905](https://github.com/obs-rust/obs-studio/issues/2905).
- A plugin or script that asks obs_transition_get_size about a missing
transition now gets a debug log line naming obs_transition_get_size,
instead of one naming obs_transition_set_size. *All*, 2026-11-03. Issue
[#3540](https://github.com/obs-rust/obs-studio/issues/3540).
- A plugin or script that hands obs_transition_get_time or
obs_transition_force_stop a missing transition no longer crashes OBS,
and one that hands them a source that is not a transition no longer
gets a made-up time or a stray transition stop on that source: the time
is 0 and the force stop does nothing. *All*, 2026-11-08. Issue
[#4032](https://github.com/obs-rust/obs-studio/issues/4032).
- A plugin or script that hands obs_transition_video_get_color_space a
missing transition no longer crashes OBS, and one that hands it a source
that is not a transition gets sRGB instead of a space made up from that
source's unused fields; obs_transition_video_render_direct's debug line
for a missing transition now names obs_transition_video_render_direct
instead of obs_transition_video_render. *All*, 2026-11-09. Issue
[#4091](https://github.com/obs-rust/obs-studio/issues/4091).
### Stability
- **Video reset keeps its locks.** Changing the base or output resolution
or the FPS in Settings > Video while audio runs no longer risks a crash:
the video reset no longer destroys and re-creates locks that the audio
thread, queued graphics tasks and encoders keep using. *All*, pending
merge. Issue [#5096](https://github.com/obs-rust/obs-studio/issues/5096),
upstream
[obsproject/obs-studio#14192](https://github.com/obsproject/obs-studio/issues/14192).
- **Loaded module log without a core.** An embedder, plugin or script that
calls obs_log_loaded_modules before obs_startup or after obs_shutdown no
longer crashes OBS; with no core it logs nothing. *All*, 2026-11-10. Issue
[#4465](https://github.com/obs-rust/obs-studio/issues/4465).
- An embedder or plugin that leaves a scene alive no longer crashes shutdown
when the scene still owns input sources or nested groups. *All*, pending
merge. Issue [#3458](https://github.com/obs-rust/obs-studio/issues/3458), PR
[#3535](https://github.com/obs-rust/obs-studio/pull/3535).
- A scene item with a bounds type OBS doesn't know (a hand-edited or
foreign scene collection, undo data, a plugin) no longer draws inside a
phantom bounding box; it is loaded and set as no bounds. *All*, pending
merge. Issue [#2281](https://github.com/obs-rust/obs-studio/issues/2281).
- Restoring a source's filters (undo, paste, scene collection load) no longer
crashes when the source's size is read while a filter is being attached; a
filter with no target yet reports a size of 0. *All*, 2026-10-24. Issue
[#2172](https://github.com/obs-rust/obs-studio/issues/2172).
- Desktop Audio (`coreaudio_output_capture`) on a device with no capture
stream (the built-in speakers while they are the system default output) no
longer crashes OBS while the scene collection loads. The device reports zero
channels, which reached a zero-size allocation that libobs turns into an
abort; initialization now fails with a warning in the log and the reconnect
thread retries with backoff. *macOS*, pending merge. Issue
[#2482](https://github.com/obs-rust/obs-studio/issues/2482).
- DeckLink output no longer crashes when a saved output mode is one the
device doesn't offer (settings from another card or firmware); the start
fails with an error in the log. An HDR start with no video conversion
starts as SDR instead of crashing. *All*, 2026-10-24. Issue
[#2144](https://github.com/obs-rust/obs-studio/issues/2144).
- Upload Previous Log File no longer aborts OBS when no previous log exists;
it reports that there is no log file. *Linux*, 2026-10-22. Issue
[#1768](https://github.com/obs-rust/obs-studio/issues/1768), PR
[#1824](https://github.com/obs-rust/obs-studio/pull/1824).
- OBS detects when writing a configuration file to disk fails, instead of
treating the save as successful. *All*, 2026-10-10. PRs
[#70](https://github.com/obs-rust/obs-studio/pull/70),
[#71](https://github.com/obs-rust/obs-studio/pull/71),
[#72](https://github.com/obs-rust/obs-studio/pull/72).
- Settings no longer crashes when no output supports the stream protocol.
*All*, 2026-10-11. Issue
[#217](https://github.com/obs-rust/obs-studio/issues/217), PR
[#219](https://github.com/obs-rust/obs-studio/pull/219), upstream
[obsproject/obs-studio#12843](https://github.com/obsproject/obs-studio/issues/12843).
- OBS on X11 no longer crashes in the hotkey thread when the X connection
closes, for example at shutdown. *Linux*, 2026-10-11. Issue
[#126](https://github.com/obs-rust/obs-studio/issues/126), PR
[#231](https://github.com/obs-rust/obs-studio/pull/231).
- OBS no longer exits at startup on a Wayland desktop with more than one
seat. *Linux*, 2026-10-11. Issue
[#243](https://github.com/obs-rust/obs-studio/issues/243), PR
[#244](https://github.com/obs-rust/obs-studio/pull/244), upstream
[obsproject/obs-studio#12929](https://github.com/obsproject/obs-studio/issues/12929).
- OBS no longer crashes on text that the current locale cannot convert, such
as a Latin-1 X11 window title in a UTF-8 locale. *Linux, Windows*,
2026-10-11. Issue
[#262](https://github.com/obs-rust/obs-studio/issues/262), PR
[#263](https://github.com/obs-rust/obs-studio/pull/263).
- OBS also detects a crash or hang in the first session after installation
and offers recovery on the next launch. *All*, 2026-10-13. Issue
[#154](https://github.com/obs-rust/obs-studio/issues/154), PR
[#424](https://github.com/obs-rust/obs-studio/pull/424).
- OBS no longer crashes when it quits after video initialization failed.
*All*, 2026-10-13. Issue
[#127](https://github.com/obs-rust/obs-studio/issues/127), PR
[#432](https://github.com/obs-rust/obs-studio/pull/432).
- Changing the video resolution or profile no longer leaves raw outputs on
freed memory, so obs-websocket GetOutputList and plugin outputs such as
DistroAV no longer crash after it. *All*, 2026-10-13. Issue
[#469](https://github.com/obs-rust/obs-studio/issues/469), PR
[#470](https://github.com/obs-rust/obs-studio/pull/470), upstream
[obsproject/obs-studio#1344](https://github.com/obsproject/obs-studio/issues/1344).
- Quitting OBS with a PipeWire camera source no longer prints thread
warnings or crashes with a double free. *Linux*, 2026-10-13. Issue
[#512](https://github.com/obs-rust/obs-studio/issues/512), PR
[#513](https://github.com/obs-rust/obs-studio/pull/513).
- Two quick Start Streaming requests (obs-websocket StartStream or a deck
button) no longer crash OBS. *All*, 2026-10-13. Issue
[#538](https://github.com/obs-rust/obs-studio/issues/538), PR
[#539](https://github.com/obs-rust/obs-studio/pull/539), upstream
[obsproject/obs-studio#13283](https://github.com/obsproject/obs-studio/issues/13283).
- Starting OBS with --disable-missing-files-check no longer leaks memory on
each scene collection load. *All*, 2026-10-13. Issue
[#542](https://github.com/obs-rust/obs-studio/issues/542), PR
[#543](https://github.com/obs-rust/obs-studio/pull/543), upstream
[obsproject/obs-studio#11074](https://github.com/obsproject/obs-studio/issues/11074).
- Renaming or duplicating a fresh profile and then opening Settings no
longer crashes OBS. *All*, 2026-10-13. Issue
[#552](https://github.com/obs-rust/obs-studio/issues/552), PR
[#553](https://github.com/obs-rust/obs-studio/pull/553), upstream
[obsproject/obs-studio#12458](https://github.com/obsproject/obs-studio/issues/12458).
- OBS no longer can crash when the portal sleep inhibitor is destroyed while
a reply is pending. *Linux*, 2026-10-13. Issue
[#471](https://github.com/obs-rust/obs-studio/issues/471), PR
[#656](https://github.com/obs-rust/obs-studio/pull/656).
- A script or plugin that removes scene items while it walks a scene no
longer can make OBS use freed items. *All*, 2026-10-14. Issue
[#490](https://github.com/obs-rust/obs-studio/issues/490), PR
[#708](https://github.com/obs-rust/obs-studio/pull/708).
- On macOS 27.2, OBS no longer crashes on launch: the bundled Qt carries the
QTBUG-147602 backport (obs-deps 2026-10-25, as upstream OBS 33.0.0).
*macOS*, 2026-10-25. Issue
[#2290](https://github.com/obs-rust/obs-studio/issues/2290).
- On macOS, OBS no longer hangs when a window gets focus while the system
looks up a generic app icon. *macOS*, 2026-10-14. Issues
[#635](https://github.com/obs-rust/obs-studio/issues/635),
[#725](https://github.com/obs-rust/obs-studio/issues/725), PR
[#727](https://github.com/obs-rust/obs-studio/pull/727).
- A transition that is started towards a destination that already contains
it is refused; before, OBS hung. *All*, 2026-10-14. PR
[#737](https://github.com/obs-rust/obs-studio/pull/737).
- OBS starts when one core module cannot be loaded (for example obs-browser
without CEF), logs a warning, and loads the other core modules. *Linux*,
2026-10-14. Issues
[#404](https://github.com/obs-rust/obs-studio/issues/404),
[#749](https://github.com/obs-rust/obs-studio/issues/749), PR
[#750](https://github.com/obs-rust/obs-studio/pull/750).
- A caller that retries obs_load_core_modules() after a failed load no longer
gets every core module that did load opened a second time: already loaded
core modules are skipped, so their types are registered once. *All*,
2026-10-28. Issue
[#2730](https://github.com/obs-rust/obs-studio/issues/2730).
- OBS no longer crashes when a stream or recording starts, or obs-websocket
lists outputs, after a resolution change. *All*, 2026-10-16. Issue
[#1108](https://github.com/obs-rust/obs-studio/issues/1108), PR
[#1109](https://github.com/obs-rust/obs-studio/pull/1109), upstream
[obsproject/obs-studio#12213](https://github.com/obsproject/obs-studio/issues/12213).
- Browser panels no longer crash during cold startup with CEF 150, and
closing OBS while its browser engine starts no longer hangs. *Linux*,
2026-10-17. PR [#1333](https://github.com/obs-rust/obs-studio/pull/1333),
dependency [obs-browser#1](https://github.com/obs-rust/obs-browser/pull/1).
- SIGTERM while recording or streaming quits OBS and finishes the
recording, even with "Show confirmation on exit while outputs are
active" on, and SIGTERM while a dialog is open (also during startup)
quits too; before, OBS waited until the sender killed it and the
recording was cut off. *Linux, macOS*, 2026-10-18. Issue
[#1402](https://github.com/obs-rust/obs-studio/issues/1402), upstream
[obsproject/obs-studio#10011](https://github.com/obsproject/obs-studio/issues/10011).
- A plugin or script that resets the video to an output width of 2 or 3
gets an invalid-parameter error and keeps the current video; before, the
reset failed with no video left, and OBS could then crash. *All*,
2026-10-22. Issue
[#1713](https://github.com/obs-rust/obs-studio/issues/1713), PR
[#1734](https://github.com/obs-rust/obs-studio/pull/1734).
- A plugin or script that renames a source to no name (NULL) no longer
crashes OBS; the source gets an unnamed name, as with an empty name. A
rename to a name that is taken now logs the requested name as the
duplicate, not the source's old name. *All*, 2026-10-22. Issue
[#1787](https://github.com/obs-rust/obs-studio/issues/1787), PR
[#1804](https://github.com/obs-rust/obs-studio/pull/1804).
- A plugin or script that asks whether a NULL output protocol is registered,
or lists the outputs for one, no longer crashes OBS; no output supports a
protocol that is not there. The auto-configuration wizard's bandwidth test
reports that no output fits, instead of crashing, when its stream service
could not be created (for example without the rtmp-services plugin).
*All*, 2026-10-22. Issue
[#1827](https://github.com/obs-rust/obs-studio/issues/1827), PR
[#1828](https://github.com/obs-rust/obs-studio/pull/1828).
- A tool or plugin host that adds module search paths with
obs_add_module_path() gets a defined module type for the modules found
there (undefined: neither core nor legacy), so the disabled list applies
to them; before, the type was whatever was in memory. *All*, 2026-10-23.
Issue [#1900](https://github.com/obs-rust/obs-studio/issues/1900), PR
[#1906](https://github.com/obs-rust/obs-studio/pull/1906).
- A source type that a plugin fails to register (libobs rejects it, for
example a composite audio source or one without a name) is no longer
counted as that plugin's: its sources show as missing in the Sources list
instead of as provided by a loaded plugin, and the type is not credited to
the plugin if something else registers it later. A plugin or script that
adds a type id to no module (NULL) no longer leaks a copy of it. *All*,
pending merge. Issue [#1953](https://github.com/obs-rust/obs-studio/issues/1953), PR
[#1960](https://github.com/obs-rust/obs-studio/pull/1960).
- A plugin or script that gives an output an audio mixer index OBS does not
have (6 or more) no longer changes the output's mixers; the call is
ignored with a warning. A raw output with a preferred (scaled) size but no
video no longer crashes OBS when asked for its video conversion; it has
none. *All*, pending merge. Issue
[#2127](https://github.com/obs-rust/obs-studio/issues/2127).
- A canvas that a plugin or script creates, or that a scene collection
(edited by hand or written by another tool) loads, keeps only the public
canvas flags. Before, a removed bit in its flags made the canvas count as
removed from the start, so removing it later did not tell OBS or other
plugins, which kept it; unknown bits were saved back. A canvas that fails
to set up is no longer leaked. *All*, pending merge. Issue
[#2141](https://github.com/obs-rust/obs-studio/issues/2141).
- When the system cannot set up a lock or start a thread, OBS reports it
instead of carrying on as if it had worked: a source, output or other
object whose lock fails is not created, and a source that fails to set up
no longer crashes OBS while it is cleaned up; an output whose reconnect
thread does not start no longer stays "reconnecting" for good; and the
screen saver inhibitor reports that it could not start. *All*, pending
merge. Issue [#2152](https://github.com/obs-rust/obs-studio/issues/2152).
- A filter that is removed (in the Filters dialog, by a script or by
obs-websocket) while OBS is drawing it no longer crashes OBS when it has
nothing to draw (for example while it is disabled or has a size of 0); it
draws nothing for that frame. *All*, pending merge. Issue
[#2160](https://github.com/obs-rust/obs-studio/issues/2160).
- When the system cannot set up the event that OBS waits on, OBS no
longer crashes on it: a task that OBS hands to another of its threads
still runs once and is waited for; recording through the buffered file
writer or ffmpeg-mux, macOS window capture and the screen saver
inhibitor fail to start instead; macOS display and screen capture do not
start their stream; and a streaming service's ingest list refresh is not
waited for. macOS display and screen capture also no longer free the
same event twice after an update that could not restart them. *All*,
pending merge. Issue [#2164](https://github.com/obs-rust/obs-studio/issues/2164).
- A plugin that registers a source, output, encoder or service with a
structure size that ends partway through its type data fields no longer
crashes OBS when the registration is refused; the type data is freed only
when the size holds both fields whole. *All*, pending merge. Issue
[#2195](https://github.com/obs-rust/obs-studio/issues/2195).
- A plugin that registers a source, output, encoder or service with a
structure size that ends partway through a callback or its type data no
longer leaves that field partly copied, which crashed OBS when it was
called later or at shutdown; a field is kept only when the size holds it
whole. *All*, pending merge. Issue
[#2203](https://github.com/obs-rust/obs-studio/issues/2203).
- A plugin, script or headless tool that creates an output before OBS has
set up video no longer crashes OBS; the output has no video until one is
set, and it cannot start without it. *All*, pending merge. Issue
[#2237](https://github.com/obs-rust/obs-studio/issues/2237).
- A plugin, script or headless tool that asks for the main texture, adds or
removes a raw video callback, asks whether NV12 or P010 texture output is
active, or reads the position or scale of a scene item that is no longer
in a scene before OBS has set up video no longer crashes OBS; it gets no
texture, a refused callback with a warning, "not active" and a 0x0
canvas. *All*, pending merge. Issue
[#2253](https://github.com/obs-rust/obs-studio/issues/2253).
- **Video levels, audio info and texture checks with no core.** A plugin,
script or headless tool that reads the SDR white level, the HDR nominal
peak level or the audio settings, or asks whether NV12 or P010 texture
output is active, before OBS has started or after it has shut down no
longer crashes; it gets 300 and 1000 nits, "no audio" and "not active",
as it already did with no video or audio set up. Setting the video
levels then is ignored with a warning in the log. *All*, pending merge.
Issues [#2566](https://github.com/obs-rust/obs-studio/issues/2566),
[#3397](https://github.com/obs-rust/obs-studio/issues/3397).
- An SDR white level or HDR nominal peak level of 0, below 0, NaN or
infinite (from an edited profile, a plugin or a script) no longer makes
HDR and scRGB sources draw solid white, black or garbage: the level is
ignored with a warning in the log and the previous one stays. With
graphics up, the levels also start at 300 and 1000 nits instead of 0
until something sets them. *All*, pending merge. Issue
[#2209](https://github.com/obs-rust/obs-studio/issues/2209).
- A plugin or script that resets an effect parameter to its default with
a parameter it failed to look up no longer crashes OBS; the call logs an
error and does nothing, like the other effect parameter setters. *All*,
pending merge. Issue
[#2210](https://github.com/obs-rust/obs-studio/issues/2210).
- Asking whether a video encoder uses NV12 or P010 texture input no longer
crashes OBS when the encoder has no video yet, or when its video belonged
to a canvas that has been removed; the answer is "not active", so an
encoder plugin falls back to raw frames. *All*, pending merge. Issue
[#2267](https://github.com/obs-rust/obs-studio/issues/2267).
- A source set to "Monitor Only" through obs-websocket's
SetInputAudioMonitorType, or by a plugin or script through the
deprecated monitoring type call, no longer plays into the stream and
recordings: it is monitored and muted, the 33.0 form of monitor-only,
and reads back as Monitor Only. Setting it back to no monitoring undoes
that mute. *All*, pending merge. Issue
[#2447](https://github.com/obs-rust/obs-studio/issues/2447).
- A scene shown in Program or a projector, and the sources in it, no longer
stop when a plugin or script sets a transition inside that scene to the
scene itself and then to another source; before, the second set took the
scene's active reference away, and a source set after it was never shown.
*All*, pending merge. Issue
[#2484](https://github.com/obs-rust/obs-studio/issues/2484).
- A scene shown in Program or a projector, and the sources in it, no longer
stop when the transition is changed to one that this scene contains and a
source is then set on it; before, the swap marked the scene as held by the
new transition although it was not, and the next set took the scene's
active reference away. *All*, pending merge. Issue
[#2486](https://github.com/obs-rust/obs-studio/issues/2486).
- OBS no longer hangs when a plugin or script sets a transition to a scene
that contains that transition (or to the transition itself); the set is
refused with a warning in the log, as loading such a transition already
was, and the transition keeps its source.
*All*, pending merge. Issue
[#2487](https://github.com/obs-rust/obs-studio/issues/2487).
- OBS no longer hangs when the transition is changed while the old one
holds a scene that contains the new transition (or holds the new
transition itself) and that scene is then shown; the new transition is
left without that source, with a warning in the log, instead of holding
a loop back to itself. *All*, pending merge. Issue
[#2499](https://github.com/obs-rust/obs-studio/issues/2499).
- Logging into Twitch with Connect Account no longer crashes OBS when the
login window closes itself after the login (Restream uses the same
window); the window now reacts to the browser's address and title changes
after the browser has finished handling them. *macOS*, pending merge. Issue
[#2523](https://github.com/obs-rust/obs-studio/issues/2523), upstream
[obsproject/obs-studio#14072](https://github.com/obsproject/obs-studio/pull/14072).
- OBS no longer crashes at startup when a browser dock (most often the
Twitch Chat dock) was closed before OBS quit: the dock creates its
browser after the saved dock layout has been restored, not in the
middle of it. *Windows*, pending merge. Issue
[#2524](https://github.com/obs-rust/obs-studio/issues/2524), PR
[obs-rust/obs-browser#13](https://github.com/obs-rust/obs-browser/pull/13), upstream
[obsproject/obs-studio#14088](https://github.com/obsproject/obs-studio/issues/14088),
[obsproject/obs-browser#554](https://github.com/obsproject/obs-browser/pull/554).
- With a YouTube account connected, OBS no longer freezes (often seconds
after launch, or while logging in) when the YouTube Live Control Panel
dock navigates: the dock reacts to the new address after the browser has
finished handling the navigation, not inside it. *macOS*, pending merge.
Issue [#2527](https://github.com/obs-rust/obs-studio/issues/2527), PR
[obs-rust/obs-browser#14](https://github.com/obs-rust/obs-browser/pull/14), upstream
[obsproject/obs-studio#14082](https://github.com/obsproject/obs-studio/issues/14082),
[obsproject/obs-browser#556](https://github.com/obsproject/obs-browser/pull/556).
- On macOS, looking up a libobs data file no longer crashes when libobs
is loaded from a framework without a bundle identifier (no
`Info.plist`); the lookup searches the data paths instead. *macOS*,
pending merge. Issue
[#2538](https://github.com/obs-rust/obs-studio/issues/2538).
- A source that a plugin or script puts into a transition while a scene
collection is still loading is no longer kept forever, and no longer
stays active (or shown in Program) after the loaded transition replaces
it; loading the transition lets go of it, as clearing the transition
does. *All*, 2026-10-27. Issue
[#2582](https://github.com/obs-rust/obs-studio/issues/2582).
- An unreachable update host no longer holds the application open on exit.
The service-list update (and every other file-updater fetch) gives up after
a connect/transfer deadline instead of waiting out the operating system's
TCP connect timeout — about 75 s on macOS, longer on Linux — while shutdown
joins the in-flight fetch. *All*, pending merge. Issue
[#2672](https://github.com/obs-rust/obs-studio/issues/2672), PR
[#2673](https://github.com/obs-rust/obs-studio/pull/2673);
obsproject/obs-studio `shared/file-updater`.
- A WebSocket client that never answers the close frame no longer keeps OBS
from quitting. The obs-websocket server waits for its sessions to close on a
condition variable read under the session mutex, bounded at 5 s, and logs
which clients did not close, instead of polling the session list with no lock
(a data race with the IO thread's erase) and spinning forever. *All*, pending
merge. Issue
[#2713](https://github.com/obs-rust/obs-studio/issues/2713);
obs-rust/obs-websocket
[#22](https://github.com/obs-rust/obs-websocket/pull/22).
- A WebSocket client that disconnects while the server is closing no longer
crashes OBS. `onClose()` looks the handle up and returns when the session is
already gone, instead of default-constructing and inserting a null session it
then dereferences. *All*, pending merge. Issue
[#2720](https://github.com/obs-rust/obs-studio/issues/2720);
obs-rust/obs-websocket
[#23](https://github.com/obs-rust/obs-websocket/pull/23).
- A crash whose stack has a long function name no longer spoils the crash
report. The crash handler's symbol buffer holds the 256 wide characters it
tells DbgHelp it has, instead of 256 bytes, so long C++ names (Qt, the
browser) are no longer written past its end while the report is built. The
CPU name it reads is always terminated, and its registry key is closed.
*Windows*, 2026-10-28. Issue
[#2819](https://github.com/obs-rust/obs-studio/issues/2819).
- A plugin built against an older OBS registers its sources and encoders
as what they are. A source no longer gets past the duplicate check under
a version it doesn't have, so it can't be listed twice, and an encoder is
no longer refused, or asked for texture callbacks, because of caps it
never set. *All*, 2026-10-29. Issue
[#2841](https://github.com/obs-rust/obs-studio/issues/2841).
- Listing the audio monitoring devices, or matching a source's device to
the monitoring device, no longer crashes when memory for the device list
can't be allocated; the list comes back empty instead. *macOS*,
2026-10-29. Issue
[#2862](https://github.com/obs-rust/obs-studio/issues/2862).
- A keyboard layout that OBS's keyboard library can't read no longer
crashes OBS on Wayland, at startup or when the layout changes. Hotkeys
keep the last layout that loaded, and the log says the new one was
skipped. *Linux*, 2026-10-29. Issue
[#2975](https://github.com/obs-rust/obs-studio/issues/2975).
- Unregistering a hotkey while one of its bindings is still pressed no
longer reads freed memory. The release now runs while the hotkey is
alive, so a held hotkey's release callback is delivered instead of a
hotkey that stays down after its source, output or plugin goes away.
*All*, 2026-10-30. Issue
[#3044](https://github.com/obs-rust/obs-studio/issues/3044), PR
[#3045](https://github.com/obs-rust/obs-studio/pull/3045).
- `decompress_422()`, exported for plugins, now reads and writes only the
rows of packed 4:2:2 (UYVY or YUY2) it is given. It read and wrote
twice each row, so the last rows of a frame ran past the caller's
buffers. Nothing in OBS calls it. *All*, 2026-10-30. Issue
[#3031](https://github.com/obs-rust/obs-studio/issues/3031).
- An audio sample rate of 0 (a hand-edited profile, a plugin or a
script) no longer crashes OBS with a divide by zero while it logs the
audio settings; the audio reset fails with "Invalid audio parameters
specified" in the log. A buffering above about 44 seconds is logged,
and reported by `obs_get_audio_info2()`, as its real length instead of
an overflowed number. *All*, 2026-10-31. Issue
[#3272](https://github.com/obs-rust/obs-studio/issues/3272).
- A plugin or script that queues a task with a task type OBS does not
know no longer hangs when it waits for the task, or loses it without a
word when it does not: the call logs an error naming the type and
returns without running the task. *All*, 2026-11-01. Issue
[#3397](https://github.com/obs-rust/obs-studio/issues/3397).
- Quitting OBS or switching scene collections no longer crashes now and
then while the Sources dock is torn down, when a source is destroyed
at the same moment as its name label. *All*, 2026-11-01. Issue
[#3450](https://github.com/obs-rust/obs-studio/issues/3450).
- Starting a recording or stream with an audio encoder whose plugin
reports a sample rate of 0 no longer crashes OBS with a divide by zero
while its audio lines up with the video; that audio waits for the
video, or starts after it, without dropping any of its frames. *All*,
2026-11-02. Issue
[#3487](https://github.com/obs-rust/obs-studio/issues/3487).
- A plugin or script that sets a transition's manual time or torque with
no transition no longer crashes OBS, and one that passes a source that
is not a transition no longer changes that source; the call is ignored,
as the other transition setters do. *All*, 2026-11-04. Issue
[#3605](https://github.com/obs-rust/obs-studio/issues/3605).
- A plugin or script that queues a graphics task with no function no
longer crashes OBS on its graphics thread: the empty task is skipped and
the tasks queued after it still run. *All*, 2026-11-12. Issue
[#4408](https://github.com/obs-rust/obs-studio/issues/4408).
- A plugin or script that asks about a source type with no ID (NULL), for
its name, flags, defaults, properties or icon, or that creates a source
with no ID, no longer crashes OBS; the type is not found, as with an
unknown ID. *All*, 2026-11-10. Issue
[#4606](https://github.com/obs-rust/obs-studio/issues/4606).
- A plugin or script that adds or removes a packet callback, or sets a
reconnect callback, with no output (NULL) no longer crashes OBS; the
call is ignored with a debug line, as the other output calls do. *All*,
2026-11-12. Issue
[#4754](https://github.com/obs-rust/obs-studio/issues/4754).
- A plugin or script that sets a scene item's bounds size with no size
(NULL) no longer crashes OBS while holding the scene's lock; the call is
ignored and logged, as the crop setter does. *All*, 2026-11-14. Issue
[#4392](https://github.com/obs-rust/obs-studio/issues/4392).
### Security hardening
- Malformed data from an RTMP server (a zero or negative chunk size, deep or
broken AMF data, oversized fields) can no longer hang the stream, crash
OBS or corrupt memory. *All*, 2026-10-11. Issues
[#100](https://github.com/obs-rust/obs-studio/issues/100),
[#102](https://github.com/obs-rust/obs-studio/issues/102),
[#173](https://github.com/obs-rust/obs-studio/issues/173),
[#209](https://github.com/obs-rust/obs-studio/issues/209), PRs
[#115](https://github.com/obs-rust/obs-studio/pull/115),
[#116](https://github.com/obs-rust/obs-studio/pull/116),
[#188](https://github.com/obs-rust/obs-studio/pull/188),
[#228](https://github.com/obs-rust/obs-studio/pull/228),
[#230](https://github.com/obs-rust/obs-studio/pull/230),
[#232](https://github.com/obs-rust/obs-studio/pull/232).
- obs-websocket closes a connection that sends deeply nested JSON or
MessagePack before authentication, and OBS no longer crashes from it.
*All*, 2026-10-13. Issue
[#99](https://github.com/obs-rust/obs-studio/issues/99), PRs
[#477](https://github.com/obs-rust/obs-studio/pull/477),
[#497](https://github.com/obs-rust/obs-studio/pull/497),
[#502](https://github.com/obs-rust/obs-studio/pull/502),
[#503](https://github.com/obs-rust/obs-studio/pull/503).
- Rust graphics preserves separate C trigonometric calls on macOS and signaling
NaN rounding on macOS/Windows. *macOS, Windows*, 2026-10-18.
PR [#1398](https://github.com/obs-rust/obs-studio/pull/1398).
- Downloads and remote text requests no longer ask servers for brotli: what
comes back can no longer reach a Brotli decoder with a public
out-of-bounds write while the packaged libraries still carry it. *All*,
2026-10-24. Issue
[#2211](https://github.com/obs-rust/obs-studio/issues/2211), PR
[#2213](https://github.com/obs-rust/obs-studio/pull/2213).
- The Windows, macOS and Flatpak packages bundle libsrt 1.5.7 and Mbed TLS
3.6.7, and the Windows package curl 8.23.0: the public advisories in SRT,
in the RTMPS certificate checks and in curl no longer apply. A build of
these packages with an older libsrt or Mbed TLS stops at configure.
*Linux, Windows, macOS*, 2026-10-25. Issues
[#2372](https://github.com/obs-rust/obs-studio/issues/2372),
[#1121](https://github.com/obs-rust/obs-studio/issues/1121),
[#2374](https://github.com/obs-rust/obs-studio/issues/2374), PRs
[#2427](https://github.com/obs-rust/obs-studio/pull/2427),
[#2455](https://github.com/obs-rust/obs-studio/pull/2455).
- The Linux AppImage no longer bundles OpenSSL 1.1.1: Qt is built without
its GSSAPI/SPNEGO auth delegate, so the base's krb5 libraries — the last
thing that pulled in `libcrypto.so.1.1` — are not linked at all. *Linux*,
2026-10-28. Issue
[#2815](https://github.com/obs-rust/obs-studio/issues/2815), PRs
[obs-studio-libs#25](https://github.com/obs-rust/obs-studio-libs/pull/25),
[#2831](https://github.com/obs-rust/obs-studio/pull/2831).
### Building from source
- Building with `-DENABLE_CORE_MODULES=OFF` works again: libobs no longer
fails to compile a core module list that was never generated. *All*,
pending merge. Issue
[#2280](https://github.com/obs-rust/obs-studio/issues/2280);
obsproject/obs-studio#14013.
- obs-nvenc-test builds again against nv-codec-headers master, whose new
`dynlink_nvml.h` declares the same NVML types. *Linux, Windows*, pending
merge. Issue [#2462](https://github.com/obs-rust/obs-studio/issues/2462);
obsproject/obs-studio#14075.
## Development builds
- **Idle Dell capacity for member PRs.** Maintainers can opt in with
`DELL_PR_ROUTING=on`; only same-repository PRs by verified active obs-rust
members qualify. `MQ_PR_RESERVE` keeps queue capacity free, and uncertain
eligibility or capacity stays hosted. Default off. *Linux CI*, 2026-11-19.
Issue [#4896](https://github.com/obs-rust/obs-studio/issues/4896).
- **Dated conversion tracker.** The README shows the libobs Rust percentage,
source date and refresh workflow status beside the conversion graph, making
a stalled tracker visible. *All*, 2026-11-08.
Issue [#4086](https://github.com/obs-rust/obs-studio/issues/4086).
- **Cargo application command.** `uv run --script ci/native_build.py` builds and
stages a Linux hybrid OBS development application with selectable profiles and
plugin features, including default NVENC support and its capability helper.
The `./native-build` shell shim was removed (GEN-005, #962); the module is the
entry point.
*Linux*, 2026-10-22. Issue [#1332](https://github.com/obs-rust/obs-studio/issues/1332),
PRs [#1725](https://github.com/obs-rust/obs-studio/pull/1725),
[#1772](https://github.com/obs-rust/obs-studio/pull/1772).
- **Explicit Qt SDKs for Cargo builds.** `OBS_QT_TARGET_PREFIX` and
`OBS_QT_HOST_PREFIX` select the target Qt SDK and its host tools. Cargo resolves
Qt Core, Gui and Widgets from the SDK's exported targets, validates the
architecture, Qt version and CRT, and cross builds no longer fall back to
host pkg-config. *Linux; Windows and macOS SDK resolution*, 2026-10-22.
Issue [#1869](https://github.com/obs-rust/obs-studio/issues/1869).
- When the desktop's shortcut for an OBS hotkey uses a different key, the
"other key" marker in Settings > Hotkeys is a link that puts the desktop's
key in that row. It is offered only when the desktop's key reads exactly,
so localized modifier names never produce a wrong key. *Linux (KDE, GNOME
portal)*, 2026-10-25. Issue
[#401](https://github.com/obs-rust/obs-studio/issues/401).
- On Windows, the service list and game capture list update from
obsproject.com again, and YouTube API calls work. OBS's HTTP calls now ask
only for compressions the bundled libcurl can decode (Windows' has no
zlib), and still never brotli. *Windows; all platforms use the same rule*,
2026-10-26. Issue [#2453](https://github.com/obs-rust/obs-studio/issues/2453).
- Downloads and remote text requests ask servers for Brotli again, so update
checks, the service list and the API answers OBS fetches transfer
compressed: the packaged Brotli is past CVE-2026-111497 (the AppImage
bundles 1.2.1 and the Windows package links none). macOS keeps asking for
gzip and deflate only, because it uses the system libcurl whose Brotli
version this project does not pin. *AppImage, Windows; macOS keeps the
stop-gap*, 2026-10-29. Issue
[#2211](https://github.com/obs-rust/obs-studio/issues/2211), PR
[#2906](https://github.com/obs-rust/obs-studio/pull/2906).
- Groundwork for an MCP server inside OBS that calls libobs directly, with no
obs-websocket in between: the new `obs-mcp` crate answers the MCP handshake
(`initialize`, `ping`, an empty `tools/list`) over newline-delimited
JSON-RPC. It is not wired into the app yet, so nothing changes for users.
*All platforms*, 2026-10-31. Issue
[#3284](https://github.com/obs-rust/obs-studio/issues/3284), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- Scene tools for the in-process MCP server: `scenes_list`, `scene_get_current`,
`scene_set_current`, `scene_create` and `scene_remove`, each with a JSON
Schema, behind a `SceneBackend` trait. The libobs binding is not wired yet,
so nothing changes for users. *All platforms*, 2026-10-31. Issue
[#3285](https://github.com/obs-rust/obs-studio/issues/3285), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- Source tools for the in-process MCP server: `sources_list`, `source_create`,
`source_set_settings`, `scene_item_set_visible` and `scene_item_set_transform`
(position, scale, rotation), each with a JSON Schema, behind a
`SourceBackend` trait. The libobs binding is not wired yet, so nothing
changes for users. *All platforms*, 2026-10-31. Issue
[#3286](https://github.com/obs-rust/obs-studio/issues/3286), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- Output tools for the in-process MCP server: `record_start`, `record_stop`,
`record_status`, `stream_start`, `stream_stop` and `stream_status` (status
reports `active`, plus `duration_ms` and `bytes` where known), each with a
JSON Schema, behind an `OutputBackend` trait. The libobs binding is not wired
yet, so nothing changes for users. *All platforms*, 2026-10-31. Issue
[#3287](https://github.com/obs-rust/obs-studio/issues/3287), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- Screenshot tool and resources for the in-process MCP server: `screenshot`
returns a PNG of a named source or the program output (optional width and
height) as MCP image content, and `resources/list` / `resources/read` serve
`obs://stats` (fps, CPU, dropped frames) and `obs://scenes` (the scene graph),
behind `CaptureBackend` and `StatsBackend` traits. The libobs binding is not
wired yet, so nothing changes for users. *All platforms*, 2026-10-31. Issue
[#3288](https://github.com/obs-rust/obs-studio/issues/3288), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- The in-process MCP server can now drive libobs: `ObsBackend` implements the
scene, source, output, screenshot and statistics backends by calling libobs
directly (program scene on output channel 0, scene items, `obs_output_*`,
texrender screenshots, `obs_get_active_fps`). It sits behind the `libobs`
feature and is not wired into the app yet, so nothing changes for users.
*All platforms*, 2026-10-31. Issues
[#3301](https://github.com/obs-rust/obs-studio/issues/3301),
[#3304](https://github.com/obs-rust/obs-studio/issues/3304),
[#3306](https://github.com/obs-rust/obs-studio/issues/3306),
[#3308](https://github.com/obs-rust/obs-studio/issues/3308), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- `obs-studio-rust --mcp` starts libobs in the process and serves the MCP
tools and resources over stdin/stdout (logs on stderr, clean exit when stdin
closes), and the repo's `.mcp.json` registers it as the `obs` server for
Claude Code and clud. Build with `--features bundled-native`; see
`docs/rust-port/mcp.md`. *All platforms*, 2026-10-31. Issue
[#3289](https://github.com/obs-rust/obs-studio/issues/3289), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- `obs-studio-rust --mcp` now starts libobs like the application: it resets
video (graphics module `libobs-opengl`, or `OBS_MCP_GRAPHICS_MODULE`) and
audio, loads the plugin modules (`OBS_MCP_MODULE_BIN`, `OBS_MCP_MODULE_DATA`,
`OBS_MCP_DATA_PATH`, or an install next to the binary) and creates the
`simple_file_output` and `simple_stream` outputs, so `screenshot`,
`record_start` and `record_stop` work; `--record-dir ` picks where
recordings go. A step that fails (no display, no plugin) becomes a clear MCP
error instead of a crash. *All platforms*, 2026-10-31. Issues
[#3317](https://github.com/obs-rust/obs-studio/issues/3317),
[#3312](https://github.com/obs-rust/obs-studio/issues/3312), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- The MCP server can put sources on screen: `scene_item_add`,
`scene_items_list` (item id, source, visibility, transform) and an optional
`scene`/`position` on `source_create`; `scene_item_set_visible` and
`scene_item_set_transform` take the listed `item` id. The first scene made
while no program scene is set becomes the program scene, and `screenshot`
adds a `{width, height, source}` text item and documents its alpha channel.
*All platforms*, 2026-10-31. Issues
[#3338](https://github.com/obs-rust/obs-studio/issues/3338),
[#3339](https://github.com/obs-rust/obs-studio/issues/3339), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- `obs-studio-rust --mcp` logs a missing audio subsystem to the OBS log as a
warning (`obs-mcp: cannot start audio ...; continuing without audio`)
instead of printing it to stderr, and keeps running with video. Other
startup failures still go to stderr. *All platforms*, 2026-11-02. Epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- `obs-studio-rust --mcp` still records when libobs cannot open its audio
mixer: the AAC encoder reads a silent audio output at 48 kHz stereo instead,
so `record_start` writes a file with video and a silent track rather than
failing. The `ffmpeg_muxer` output now takes its channel count from its audio
encoder instead of the global mixer, which it dereferenced while null.
*All platforms*, 2026-11-02. Follows
[#3491](https://github.com/obs-rust/obs-studio/pull/3491), epic
[#3283](https://github.com/obs-rust/obs-studio/issues/3283).
- **Control socket** (#4456): private Unix MCP endpoint, `--mcp-attach` stdio proxy,
and an in-app frontend module that controls the existing OBS instance.
- **Typed control client and probe** (#4457): fluent Rust socket client and
`ci/vcam_av_sync.py --transport mcp` with automatic fallback when the websocket
service is absent, bounded capture shutdown, typed waits and probe cleanup.
- MCP: `./mcp` builds and launches an isolated libobs-enabled control server, automatically provisioning the native SDK on NixOS (#4507).
- MCP: `./mcp` builds and locates EGL graphics, Virtual Camera/virtual mic, FFmpeg media/AAC and x264 runtime modules automatically (#4521).
- **Bounded automatic conflict retries.** AI rebases wait six hours before retrying an unchanged PR, preserve capacity recovery, and limit attempts to three per sweep and six per hour. Issue [#5497](https://github.com/obs-rust/obs-studio/issues/5497).
# GPU acceleration status light
OBS-Studio-Rust shows a light in the status bar that says whether video is
rendered on a hardware GPU (obs-rust/obs-studio#846). Clicking it opens a
dialog that explains the state and lists likely causes. The same state is
logged at startup and returned by obs-websocket as `GetStats.gpuAcceleration`.
| Light | Meaning |
|---|---|
| Green | OBS renders on a hardware GPU (any vendor: the driver is bound and the active adapter confirms it). |
| Yellow | No GPU was found and OBS renders in software (llvmpipe, softpipe, Microsoft Basic Render Driver, SwiftShader). Expected on a VM or headless machine. |
| Red | A GPU (NVIDIA, AMD or Intel) is present but OBS renders in software, graphics initialization failed, or frames are over budget. |
**Frame budget.** Once a second the frontend samples libobs' one-second
average frame time (`obs_get_average_frame_time_ns`). The light compares
the **median** of the last 15 samples with the frame interval and ignores
frame timings until it has at least 5 samples, so one slow second (for
example right after launch) does not turn it red (#929). Frames over budget are red.
**Adapter.** The adapter is the renderer OBS actually uses: `GL_VENDOR` and
`GL_RENDERER` on OpenGL, and the active DXGI adapter on Direct3D 11. It is
not `gs_get_device_name()`, which only names the API (`OpenGL`).
**Label (#1025).** The light has a text next to its dot, and the dot keeps
the color above:
| Label | When |
|---|---|
| `GPU: 37%` | OBS renders on a hardware GPU and a source reads it. The percent is the whole adapter, as Task Manager or nvtop show it. |
| `GPU: n/a` | No source reads the render GPU (the tooltip says so), or graphics initialization failed. |
| `CPU rendering` | OBS renders in software. A GPU that OBS does not use can show 0 %, so the label shows no percent. |
On an RTX 3060 (NVML), and on the same machine forced onto llvmpipe
(red, because a GPU is present):


On an M1 Max (IOKit) under a Metal compute load:

The sources, in order: NVML for NVIDIA (#1021), then amdgpu's
`gpu_busy_percent` on Linux (#1024), on macOS IOKit's
`Device Utilization %` of the render GPU's `IOAccelerator` (#1026; the
key is not documented, and an M1 Max has it), and on Windows the PDH
`GPU Engine` counters of the render GPU's DXGI LUID (#1022), as Task
Manager reads them, for every vendor. NVML cannot find the GPU on Windows
yet (it needs the LUID as a PCI address), so PDH reads NVIDIA there too.
The thread `obs-gpu-usage`
reads the source once a second, so the UI thread never waits for one.
`GetStats.gpuAcceleration` has the same reading as `usage` (`percent`,
`source`, or `null`) and the label as `readout`.
**Slow sources (#1022).** After a slow sample the thread pauses 9 times
as long as the sample took (at least 1 s, at most 30 s), so sampling takes
at most about a tenth of its time; the next fast sample gives 1 s again. A
reading older than 3 pauses is not shown: the label is `GPU: n/a` and the
tooltip says the reading is late. A source that takes more than 2 s three
times in a row is not asked again in that session, and the OBS log says so
once with its times; the next source answers instead.
**No share of OBS.** #1004 put OBS's own share in the tooltip. NVML's
per-process samples do not give one: on the RTX 3060 above, an OBS that
rendered 4K at 25 fps the whole time had no sample in 4 of 7 two-second
windows, and 45 % in one while the device average was 20 %
(`nvidia-smi pmon` reads the same values). The label shows the whole GPU
only until a source gives a share that adds up.
An earlier mockup of the dialog for a machine with no GPU (the styling is approximate). Since #1005 that case is yellow, not red; a GPU OBS can't use is red:

## Where it lives
- Classifier, GPU detection (`/sys/class/drm`, `/dev/dri`, `nvidia-smi`), the
frame window (`FrameStats::from_samples`, `median()`) and the dialog text:
`rust/obs-gpu-status`.
- Reading the adapter: `ActiveAdapterName()` in
`frontend/utility/GpuStatus.cpp`, with `GetGlGetStringProc()` in
`frontend/utility/platform-x11.cpp`, `platform-windows.cpp` and
`platform-osx.mm`.
- Label text and sources: `rust/obs-gpu-status/src/usage.rs`
(`Sampler`, tested with injected sources), `Report::readout()`, and
`platform::usage_sources()`; the sampling thread is in `src/ffi`. The
macOS parser is `src/iokit.rs`, its reader `accelerator_statistics()` in
`src/platform/macos.rs`.
- Light and dialog: `frontend/utility/GpuStatus.cpp` and
`frontend/widgets/OBSBasicStatusBar.cpp`. They are built whenever cargo
is available, whatever `ENABLE_RUST_LIBOBS` (the app's name) says
(`frontend/cmake/feature-gpu-status.cmake`, option `ENABLE_GPU_STATUS`).
A build without cargo, such as the Flatpak sandbox today, configures
without the light and prints a warning (#946).
- `GetStats.gpuAcceleration`: obs-websocket reads it from the frontend's
`get_gpu_status` proc, and it is `null` when nothing provides it.
- Tier 4 check (OpenGL forced onto llvmpipe → not green):
`test/websocket-tier4/run_tier4.py`.
# 🏆 OBS Project User Abuse Hall of Fame
**Bugs they confirmed, then closed. Features you relied on, then removed.
Threads where users showed up in numbers, then got locked out.**
   
---
## The scoreboard
| | Issue | 💬 | Fate |
|:-:|---|--:|---|
| 🥇 | [Preview Stutter that appears in Streams/Recordings](https://github.com/obsproject/obs-studio/issues/4191) | 184 | locked (off-topic) |
| 🥈 | [OBS Virtual Camera may affect built-in webcams](https://github.com/obsproject/obs-studio/issues/3555) | 87 | closed not planned, locked (off-topic) |
| 🥉 | [Removal of --disable-shutdown-check breaks automated background workflows](https://github.com/obsproject/obs-studio/issues/12650) | 64 | closed not planned, locked (resolved) |
| 4 | [Dock Sizes are Reset the next time you open OBS.](https://github.com/obsproject/obs-studio/issues/2949) | 34 | closed not planned |
| 5 | [Pause and Resume Recording Doubles or Triples CPU usage](https://github.com/obsproject/obs-studio/issues/3148) | 34 | closed not planned |
| 6 | [[BUG] OBS duplicates scenes and corrupts scene collections when using groups](https://github.com/obsproject/obs-studio/issues/2724) | 30 | closed not planned |
| 7 | ["Enforce Streaming Service Encoder Settings" Checkbox disables Rate Control setting](https://github.com/obsproject/obs-studio/issues/3060) | 26 | closed not planned |
| 8 | [Version 32.2 broke NVENC encoder for legacy graphics cards](https://github.com/obsproject/obs-studio/issues/13685) | 18 | closed not planned |
| 9 | [[BUG] VLC Video Source > Add Path/URL to Playlist > displays incorrectly in a Scene](https://github.com/obsproject/obs-studio/issues/2933) | 18 | closed not planned |
| 10 | [Pasting a source does not show up in the sources until switching from different scenes](https://github.com/obsproject/obs-studio/issues/3387) | 16 | closed not planned |
| 11 | [Dropped frames on recordings in random moments, nothing which could cause it is happening](https://github.com/obsproject/obs-studio/issues/9285) | 15 | closed not planned, locked (too heated) |
| 12 | [[Flatpak] Runtime org.kde.Platform branch 6.6 is end-of-life](https://github.com/obsproject/obs-studio/issues/11478) | 12 | closed not planned, locked (off-topic) |
> [!WARNING]
> **October 14, 2024:** 6 of these were closed as stale
> on the same afternoon, including bugs the maintainers had reproduced themselves.
## In their own words
Verbatim, from maintainers' comments on the threads. Each one links to the comment.
> **“No amount of "I don't like your answer" will change it.”**
>
> — an OBS maintainer, to a user who said a downgrade fixed their dropped frames · [#9285, 2023-08-14](https://github.com/obsproject/obs-studio/issues/9285#issuecomment-1677822114)
> **“However, if you refuse to follow the process, there is nothing we can do, and this report is not actionable.”**
>
> — an OBS maintainer, in the same comment that admitted 32.2 had raised the driver minimum · [#13685, 2026-07-22](https://github.com/obsproject/obs-studio/issues/13685#issuecomment-5052743359)
> **“I'd prefer to not have this just be an argument back and forth about if or if not we should return the flag to disable the check; that decision has already been made.”**
>
> — an OBS maintainer, on removing a flag users' setups depended on · [#12650, 2025-10-04](https://github.com/obsproject/obs-studio/issues/12650#issuecomment-3368592277)
> **“OBS is not designed as, and is not supported to be, a headless application.”**
>
> — an OBS maintainer, to users running OBS unattended · [#12650, 2025-10-12](https://github.com/obsproject/obs-studio/issues/12650#issuecomment-3395057172)
> **“This is just an overly dramatic warning in a package manager.”**
>
> — an OBS maintainer, on shipping Flatpak on an end-of-life runtime · [#11478, 2024-12-23](https://github.com/obsproject/obs-studio/issues/11478#issuecomment-2560434526)
> **“I will repeat them for you since you appear not to have read them the first time”**
>
> — an OBS maintainer, to a user whose game would not launch · [#9792, 2023-11-03](https://github.com/obsproject/obs-studio/issues/9792#issuecomment-1791839734)
> **“This goes both ways, as you were unnecessarily combative and kept pushing the wrong approach […]”**
>
> — an OBS maintainer, to a user who said they had already posted logs, in the 184-comment stutter thread · [#4191, 2021-09-09](https://github.com/obsproject/obs-studio/issues/4191#issuecomment-916203636)
> **“"I don't like it" isn't a valid bug report, and isn't actionable on our end.”**
>
> — an OBS maintainer, closing complaints about the V28 interface · [#7260, 2022-09-12](https://github.com/obsproject/obs-studio/issues/7260#issuecomment-1244047700)
> **“You can't have a bug in nonexistent code :) Thank you!”**
>
> — an OBS maintainer, on global hotkeys not working under Wayland · [#10538, 2026-04-27](https://github.com/obsproject/obs-studio/issues/10538#issuecomment-4330186180)
## The inductees
### 🥇 [#4191 · Preview Stutter that appears in Streams/Recordings](https://github.com/obsproject/obs-studio/issues/4191)
 
> Support staff replicated the stutter in Feb 2021. The issue is still open, but it has been locked since Jan 2022. Before the lock, off-topic comments were deleted, a reporter was told they had been "unnecessarily combative", the cause was put down as "likely coming from outside OBS", and a link to a test build that users said fixed it was removed as "shady file hosting".
### 🥈 [#3555 · OBS Virtual Camera may affect built-in webcams](https://github.com/obsproject/obs-studio/issues/3555)
   
> Users reported their laptops' built-in webcams disappearing after using the OBS virtual camera. A staff member noticed the affected cameras shared one Sunplus OEM model. In Dec 2022 the thread was locked with "next steps is us purchasing a machine with one of these affected cameras". In Oct 2024 it was closed as stale and called "a hardware or kernel bug and not something we can realistically fix", because "nobody reporting the issue has been able to give us access to hardware".
### 🥉 [#12650 · Removal of --disable-shutdown-check breaks automated background workflows](https://github.com/obsproject/obs-studio/issues/12650)
  
> OBS 32.0 removed --disable-shutdown-check, which unattended setups used to skip the unclean-shutdown prompt. Staff told users to fix whatever was crashing OBS and said "that decision has already been made". They did point to PR #12668 for spurious prompts. Then they locked the thread as "resolved", although nothing had been resolved.
### 🏆 [#2949 · Dock Sizes are Reset the next time you open OBS.](https://github.com/obsproject/obs-studio/issues/2949)
  
> Staff first said it was "100% reproducible for some people". A user later found it only happens when OBS is full screen. It was closed in the Oct 2024 sweep as "an issue with permissions and not a bug with OBS".
### 🏆 [#3148 · Pause and Resume Recording Doubles or Triples CPU usage](https://github.com/obsproject/obs-studio/issues/3148)
  
> A staff member reproduced it in 2020, while others could not. Users still reported it on OBS 29 and 30. It was closed in the Oct 2024 sweep as "a catch-all for generic performance issues".
### 🏆 [#2724 · [BUG] OBS duplicates scenes and corrupts scene collections when using groups](https://github.com/obsproject/obs-studio/issues/2724)
 
> Scene collections were corrupted when using groups. A staff member traced the corruption to OBS commit c0e2e7f (drag-and-drop reordering), and another said "It is a priority". Two years later it was closed with "most of the evidence here suggests" an old third-party plugin was to blame.
### 🏆 [#3060 · "Enforce Streaming Service Encoder Settings" Checkbox disables Rate Control setting](https://github.com/obsproject/obs-studio/issues/3060)
  
> "Enforce streaming service encoder settings" silently forces CBR. In 2022 staff said "the pain point is felt on our end as well" and that they were looking into solutions. In the Oct 2024 sweep it was closed as "not a bug and working as intended".
### 🏆 [#13685 · Version 32.2 broke NVENC encoder for legacy graphics cards](https://github.com/obsproject/obs-studio/issues/13685)
 
> 32.2 moved the NVIDIA SDK update that had been planned for 33 into a point release, which raised the minimum driver to 570. Staff first said "we did not drop any support for older GPUs", corrected that in the same comment, added "if you refuse to follow the process, there is nothing we can do", and closed the issue as "nothing actionable" the next day. A note about the minimum driver was added to the release notes afterwards.
### 🏆 [#2933 · [BUG] VLC Video Source > Add Path/URL to Playlist > displays incorrectly in a Scene](https://github.com/obsproject/obs-studio/issues/2933)
  
> Staff confirmed it twice, on 26 RC1 and again on 28 ("it does look like this is still an issue"), and a user posted local repro steps. It was closed in the Oct 2024 sweep as stale, with a request to open a new issue.
### 🏆 [#3387 · Pasting a source does not show up in the sources until switching from different scenes](https://github.com/obsproject/obs-studio/issues/3387)
  
> A staff member said "The issue is valid, but requires a fair bit of steps to repro", and users confirmed it on RC builds. Another staff member could not reproduce it on 28. It was closed in the Oct 2024 sweep as stale for "missing some key step".
### 🏆 [#9285 · Dropped frames on recordings in random moments, nothing which could cause it is happening](https://github.com/obsproject/obs-studio/issues/9285)
  
> The reporter said rolling back to 29.0.2 removed the dropped frames. Staff said the samples were identical and that this is "just how compositing works". When users pushed back, the reply was "No amount of 'I don't like your answer' will change it", and the thread was locked as too heated.
### 🏆 [#11478 · [Flatpak] Runtime org.kde.Platform branch 6.6 is end-of-life](https://github.com/obsproject/obs-studio/issues/11478)
  
> Flatpak OBS kept running on an end-of-life KDE runtime. Staff closed the issue as not planned while saying the update would come with a later release, called the EOL notice "just an overly dramatic warning in a package manager", answered a user who cited Qt security fixes with "We will update when we've verified the packages don't cause regressions", and locked the thread.
## Honorable mentions
8 borderline cases: defensible on the merits,
handled curtly or closed without a fix.
- **[#4011 · Display Capture says "No properties available" after quitting and reopening it](https://github.com/obsproject/obs-studio/issues/4011)** (48 comments). macOS display capture: closed as stale on 2024-10-14. Staff, who now use Apple Silicon, could not reproduce it on Intel.
- **[#3664 · Audio latency on monitor](https://github.com/obsproject/obs-studio/issues/3664)** (37 comments). Monitor latency: staff agree the design "serves neither purpose" but closed it because it works "as implemented".
- **[#12338 · [Bug] `OBS-Studio-31.0.4-Windows-Installer.exe` (and `XPFFH613W8V6LV`) fail to `update` or `install`, unless the user `kill`s their GPU driver software, which is not recommended.](https://github.com/obsproject/obs-studio/issues/12338)** (24 comments). Installer fails while GPU software holds DLLs: "not a bug with OBS", although staff later called the fix valid.
- **[#7451 · AMD AMF using Color Range Full does not work for Livestreaming (Nvidia & x264 works)](https://github.com/obsproject/obs-studio/issues/7451)** (23 comments). AMF full range on streams: locked as too heated two days after it opened. Staff did cite their Twitch contacts.
- **[#11029 · OBS is double loading every built-in plugin and then crashing with double free on exit.](https://github.com/obsproject/obs-studio/issues/11029)** (23 comments). Plugins load twice when lib is a symlink: put down to how the distro packages OBS, after a user showed Arch lays out its directories the same way.
- **[#4354 · OBS causing screen-tearing in preview and recordings](https://github.com/obsproject/obs-studio/issues/4354)** (19 comments). Screen tearing: closed as stale on 2024-10-14 after users said they could only work around it by downgrading.
- **[#8928 · macOS Screen Capture stops working after waking from sleep](https://github.com/obsproject/obs-studio/issues/8928)** (15 comments). Screen capture stops after sleep: closed as "intended behavior". Users have written three scripts to work around it.
- **[#7260 · Large GUI text in V28](https://github.com/obsproject/obs-studio/issues/7260)** (15 comments). V28 theme: "'I don't like it' isn't a valid bug report", though staff did point users to the old theme.
---
## How an issue gets in
1. `tools/upstream_hall_of_fame.py` searches `obsproject/obs-studio` for
issues closed as *not planned* or locked, sorted by comments and reactions.
2. It keeps those with at least 15 comments or 8 reactions.
3. A person reads every remaining thread. Issues traced to a third-party
driver, plugin or distro are thrown out. The verdicts live in
`tools/upstream_hall_of_fame_verdicts.json`.
Every claim links to the thread. Read it and judge for yourself.
**Hit one of these? [OBS-Studio-Rust](../README.md) is where we fix them.**
# macOS signing policy
How OBS-Studio-Rust release builds for macOS are signed and notarized, and
the rules that keep the credentials safe. Background: #2383, #2424, #2430.
## What gets signed
- **Releases only.** `release-rust.yaml` (tags and `verify_only`
dispatches on `master`) signs with the Developer ID and notarizes.
PR, fork and merge-queue builds are ad-hoc signed (`-`) and never see the
secrets.
- **Everything inside the bundle.** Xcode's sign-on-copy signs only the top
level of each embedded framework. `.github/scripts/.package.zsh` signs the
nested code of prebuilt frameworks (Sparkle's helpers, CEF's
`Libraries/*.dylib`) from the inside out with `--timestamp --options
runtime`, reseals the app, and requires
`codesign --verify --strict --deep` before it builds the DMG. A new
prebuilt framework with nested code gets a line there.
- **Notarize, then staple.** The DMG goes to `notarytool submit --wait`
and `stapler staple`. On failure the script prints Apple's notary log, so
the reason is in the CI output.
## An unsigned release is a failed release
A tagged release whose macOS jobs do not report `codesign: true` and
`notarize: true`, or whose DMG fails `spctl --assess` or
`stapler validate`, is not published. Do not ship it with a "right-click,
Open" or `xattr -d com.apple.quarantine` workaround in the notes.
## Secrets
Repository secrets on `obs-rust/obs-studio`, read only by
`.github/actions/setup-macos-codesigning`:
| Secret | What |
| --- | --- |
| `MACOS_SIGNING_IDENTITY` | `Developer ID Application: ()` |
| `MACOS_SIGNING_CERT` | base64 of the `.p12` (exported with `-legacy` so `security import` reads it) |
| `MACOS_SIGNING_CERT_PASSWORD` | the `.p12` password |
| `MACOS_NOTARIZATION_USERNAME` | Apple ID that notarizes |
| `MACOS_NOTARIZATION_PASSWORD` | app-specific password for that Apple ID |
- Set them with `gh secret set` reading from stdin or a prompt. Never paste
a value into an issue, PR, chat or log.
- The private key and `.p12` are kept offline by the account holder. The
app-specific password is not stored anywhere but the secret; if it is
lost, make a new one.
- A value that was ever shown in plain text (a chat, a log, a screenshot)
is compromised: revoke it and set a new one the same day.
## Rotation and expiry
- **Developer ID certificate:** valid five years (the current one expires
2027-11-24). Make the replacement at least 30 days before, from a new CSR,
and update `MACOS_SIGNING_CERT`, `MACOS_SIGNING_CERT_PASSWORD` and
`MACOS_SIGNING_IDENTITY` together. Builds already notarized stay valid
after the certificate expires.
- **App-specific password:** rotate yearly, and whenever someone with
access leaves.
- **Apple Developer Program membership:** renews yearly. If it lapses,
notarization stops and releases fail by the rule above.
- After any change, run `release-rust.yaml` with `verify_only=true` and
check both macOS jobs report `Accepted` before the next tag.
# Undo/redo: coverage, architecture and a visible affordance (#2214)
Research for [obs-rust/obs-studio#2214](https://github.com/obs-rust/obs-studio/issues/2214).
Every claim cites the tree as of 2026-10-24 (branch from `origin/master`).
Nothing here was reproduced at runtime; statuses marked *unknown* need a repro.
## 0. The stack in one paragraph
`undo_stack` (`frontend/utility/undo_stack.hpp:12-58`) holds two
`std::deque` (`:28-29`); each entry is a name, two
`std::string` blobs and two `std::function` callbacks (`:19-25`). The stack
is capped at `MAX_STACK_SIZE 5000` (`undo_stack.cpp.hpp:3`, eviction
`:37-40`), clears redo on every new entry (`:56`, `:163-166`), and writes the
Edit menu text and enable state directly (`:23-27`, `:58-62`, `:78-86`,
`:102-110`). Plugins reach it through `obs_frontend_add_undo_redo_action`
(`frontend/api/obs-frontend-api.h:254`, `frontend/OBSStudioAPI.cpp.hpp:686-691`,
documented in `docs/sphinx/reference-frontend-api.rst:958-966`).
## 1. Coverage audit
### 1a. Undoable today (every `add_action` site)
| Operation | Evidence | Blob stored |
|---|---|---|
| Plugin/script action via frontend API | `frontend/OBSStudioAPI.cpp.hpp:689` | caller's strings |
| Paste transform | `frontend/widgets/OBSBasic_Clipboard.cpp.hpp:43` | transform states |
| Paste filter(s) (single / multiple / multi-dest) | `OBSBasic_Clipboard.cpp.hpp:245`, `:286` | filter JSON |
| Paste source / source ref | `OBSBasic_Clipboard.cpp.hpp:135-139` (via `CreateSceneUndoRedoAction`) | whole scene backup |
| Add source (new / existing) | `frontend/dialogs/OBSBasicSourceSelect.cpp.hpp:771`, `:820` | name only |
| Keyboard nudge (coalesced 1 s by own timer) | `frontend/widgets/OBSBasic_Preview.cpp.hpp:362` | transform states, all items |
| Mouse drag/resize/rotate in preview | `frontend/widgets/OBSBasicPreview.cpp.hpp:874` | transform states, all items |
| Deinterlace mode / order | `frontend/widgets/OBSBasic_SceneItems.cpp.hpp:263`, `:292` | uuid |
| Scale filtering, blending method, blending mode | `OBSBasic_SceneItems.cpp.hpp:364`, `:420`, `:472` | uuid |
| Delete scene item(s) | `OBSBasic_SceneItems.cpp.hpp:876-906` | whole scene backup |
| Move up/down/top/bottom | `OBSBasic_Scenes.cpp.hpp:864` (via `MoveSceneItem` `:882-890`) | scene backup of moved sources |
| Rotate / flip / fit / stretch / center (Edit > Transform) | `OBSBasic_SceneItems.cpp.hpp:1107`, `:1121`, `:1135`, `:1178`, `:1193`, `:1240`, `:1254`, `:1355`, `:1369`, `:1383` | transform states |
| Reset transform | `OBSBasic_Scenes.cpp.hpp:999` | transform states |
| Transform dialog | `frontend/dialogs/OBSBasicTransform.cpp.hpp:126` | transform states |
| Volume / mute / monitoring (mixer) | `frontend/components/VolumeControl.cpp.hpp:832` (repeatable), `:704`, `:726` | uuid |
| Rename via mixer | `VolumeControl.cpp.hpp:559` | uuid |
| Adv. audio: volume, balance, sync, force mono, monitoring, tracks | `frontend/components/OBSAdvAudioCtrl.cpp.hpp:387`, `:406`, `:473`, `:501` (repeatable), `:448`, `:522`, `:547` | uuid |
| Drag-and-drop files from the OS | `frontend/widgets/OBSBasic_Dropfiles.cpp.hpp:179` | name only |
| Show/hide scene item | `frontend/components/SourceTreeItem.cpp.hpp:136` | uuid |
| Rename source in tree | `SourceTreeItem.cpp.hpp:429` | uuid |
| Group items | `SourceTreeItem.cpp.hpp:338-347`, fallback `frontend/components/SourceTree.cpp.hpp:476-481` | whole scene backup |
| Ungroup | `frontend/components/SourceTreeModel.cpp.hpp:361-371` | whole scene backup |
| Reorder sources by drag in the tree | `SourceTree.cpp.hpp:231`, `:392-399` | scene backup |
| Duplicate / delete / add / rename scene | `OBSBasic_Scenes.cpp.hpp:295`, `:469`, `:711`, `:923` | scene JSON / name / uuid |
| Show/hide transition override (single / multi) | `frontend/widgets/OBSBasic_Transitions.cpp.hpp:1034`, `:1094` | transition JSON |
| Filter settings | `frontend/dialogs/OBSBasicFilters.cpp.hpp:188` | full filter settings JSON |
| Add / rename / delete filter | `OBSBasicFilters.cpp.hpp:572`, `:985`, `:1095` | filter JSON |
| Source properties (OK in dialog) | `frontend/dialogs/OBSBasicProperties.cpp.hpp:293` | full settings JSON, old and new |
| Context-bar toolbar property edits | `frontend/components/SourceToolbar.cpp.hpp:53` | full settings JSON |
### 1b. Not undoable
No area below is excluded on purpose anywhere in writing: `docs/`,
`frontend/` comments and the frontend API doc say nothing about undo scope.
The only trace of intent is an orphan string, `Undo.SceneCollection.Switch`
(`frontend/data/locale/en-US.ini:334`), which no code references.
| Operation | Undoable? | Evidence (mutation, no `add_action`) | Gap type |
|---|---|---|---|
| Video/canvas settings | No | `frontend/settings/OBSBasicSettings.cpp.hpp:3372` `SaveVideoSettings`; no `undo` in the file | Unimplemented, plausibly right to exclude (dialog has Cancel/Apply); undocumented |
| Output settings | No | `OBSBasicSettings.cpp.hpp:3602` | same |
| Audio settings | No | `OBSBasicSettings.cpp.hpp:3745` | same |
| Hotkeys | No | `OBSBasicSettings.cpp.hpp:3857` `SaveHotkeySettings` | same |
| Additional canvases | No | `frontend/widgets/OBSBasic_Canvases.cpp.hpp:20`, `:58`; no `undo` in the file | Unimplemented, undocumented |
| Scene-collection switch / new / dup / rename / remove / import | No; **stack is cleared** | `ClearSceneData` `frontend/widgets/OBSBasic_SceneCollections.cpp.hpp:1536`, `undo_s.clear()` `:1594`, called from `LoadData` `:1158-1160` and `CreateDefaultScene` `:1019-1023`; import `:623`, remove `:582` | Deliberate in effect (the clear), undocumented; the orphan locale key suggests it was once planned |
| Scene-collection export | n/a (no state change) | `OBSBasic_SceneCollections.cpp.hpp:631` | — |
| Profile switch / remove | No, and stack is **not** cleared | `frontend/widgets/OBSBasic_Profiles.cpp.hpp:695`, `:561`; no `undo` in the file | Unimplemented, undocumented |
| Scripts (add/remove/settings in Tools > Scripts) | No | `plugins/frontend-tools/scripts.cpp.hpp` has no `undo` | Unimplemented |
| Plugins | Only if they call the API | `frontend/api/obs-frontend-api.cpp.hpp:642-648` | Opt-in by design |
| obs-websocket requests | No | e.g. `plugins/obs-websocket/src/requesthandler/RequestHandler_SceneItems.cpp:527`, `RequestHandler_Inputs.cpp:370`, `RequestHandler_Filters.cpp:339`; no `undo` in `plugins/obs-websocket/src` | Unimplemented; must not be fixed inside the plugin (AGENTS.md "OBS WebSocket compatibility directive") |
| Studio mode toggle, preview/program scene | No | `frontend/widgets/OBSBasic_StudioMode.cpp.hpp:175`; `SetCurrentScene` `OBSBasic_Transitions.cpp.hpp:698-704` | Correctly excluded (navigation, not edit); undocumented |
| Projector windows | No | `frontend/widgets/OBSBasic_Projectors.cpp.hpp:140` | Correctly excluded (view state) |
| Scene list reorder (drag) | No | `frontend/components/SceneTree.cpp.hpp:141` emits `scenesReordered`, handler `frontend/widgets/OBSBasic.cpp.hpp:416-417` only refreshes multiview | Unimplemented |
| Lock/unlock scene item | No | `SourceTreeItem.cpp.hpp:150` | Unimplemented |
| Filter enable toggle | No | `frontend/components/VisibilityItemWidget.cpp.hpp:25` | Unimplemented |
| Filter reorder | No | `OBSBasicFilters.cpp.hpp:706`, `:714`, `:752`, `:760`, `:1123` | Unimplemented |
| Transition select / duration | No | `OBSBasic_Transitions.cpp.hpp:435`, `:1600` | Unimplemented |
| Group operations | Yes (group, ungroup) | see 1a | — |
| OS drag-and-drop | Yes (file drop) | see 1a | — |
## 2. Architecture recommendation
| Option | Verdict |
|---|---|
| Keep the C++ class | **Recommended for now.** It is 169 lines, works, and the bugs (section 4) are in the call sites and `scene_load`, not the container. The four-tier policy applies if it is ported later. |
| Port to Rust 1:1 | Low value alone: the class is a `QObject` bound to `Ui::OBSBasic` (`undo_stack.hpp:3`, `:17`, `:27`). A port should first split the pure deque/coalescing logic (testable without Qt) from the menu wiring. |
| Command layer in core (libobs) | Changes architecture: needs an RFC in obs-rust/rfcs. Not decided here. |
Smallest hooks:
- **Plugins:** already exist (`obs_frontend_add_undo_redo_action`,
`frontend/api/obs-frontend-api.h:254`). Nothing new is needed.
- **obs-websocket:** the plugin must not be modified (AGENTS.md). The only
route is on the Rust/frontend side: observe libobs signals (item
transform, source update) and record entries. That records *every*
libobs change, which would also catch the frontend's own changes twice and
put remote edits on a local user's stack. Recommendation: draw the boundary
at the frontend; remote edits are not undoable. If anyone wants otherwise,
it is an RFC.
## 3. Semantics
| Topic | Current behaviour | Recommendation |
|---|---|---|
| Coalescing | Same-name repeatable entries merge, keeping the first undo and the latest redo (`undo_stack.cpp.hpp:46-50`) while the 3000 ms single-shot timer runs (`:8-9`, `:42-44`). Only mixer/adv-audio sliders pass `repeatable=true` (`VolumeControl.cpp.hpp:834`, `OBSAdvAudioCtrl.cpp.hpp:389`, `:408`, `:475`, `:503`). Nudges coalesce with their own 1 s timer (`OBSBasic_Preview.cpp.hpp:352-372`); drags make one entry on release (`OBSBasicPreview.cpp.hpp:860-876`). The 500 ms timer fixed in #765 is a different one, in `shared/properties-view/properties-view.cpp:2145`. | Keep. Name-based merge can wrongly join two different sources only if their names match; key on name+uuid when ported. |
| Redo invalidation | Any new entry clears redo (`undo_stack.cpp.hpp:56`). A coalesced merge returns before that line (`:49`), so redo survives a merged slider move. | Move `clear_redo()` before the merge return. Minor. |
| Memory at 5000 | Only `undo_items` is capped; eviction copies the entry before dropping it (`:38`). Two blobs per entry. Estimates from what sites store: uuid/name entries < 200 B; transform states store every item in the scene (`OBSBasic_Preview.cpp.hpp:354`, `true` = all items; ~350 B/item from `libobs/obs-scene.c.h:2312-2324`), so a 30-item scene is ~10 KB/entry, ~50 MB at 5000; a whole-scene backup (`OBSBasic_Scenes.cpp.hpp:789-811`) carries every source's full `obs_save_source` JSON including filters, typically 20-200 KB per blob, i.e. **0.2-2 GB** worst case at 5000. | Cap by bytes (e.g. 64 MB) as well as count, and store diffs for transforms (only changed items). |
| Collection switch | Stack cleared (`OBSBasic_SceneCollections.cpp.hpp:1594`), so no entry can outlive its objects. Profile switch does not clear (`OBSBasic_Profiles.cpp.hpp:695`), which is fine: profile objects are not in entries. | Keep. Document it; show a one-time hint or toast that history was reset. |
| Missing objects | Scene backups re-resolve by **name** (`OBSBasic_Scenes.cpp.hpp:836`) and recreate a missing source with `obs_load_source` (`:838`); transform states resolve by item id and silently skip missing items (`libobs/obs-scene.c.h:2387-2388`). | Resolve by uuid everywhere. |
| Enable state bug | `enable_internal()` enables Undo even when `undo_items` is empty (`undo_stack.cpp.hpp:117`), e.g. after any `pop_disabled()`/`enable()`. A visible button would be enabled and do nothing. | Prerequisite fix: `setEnabled(!undo_items.empty())`. |
## 4. Upstream bugs in this fork
| Bug | Status | Reasoning from code |
|---|---|---|
| obsproject/obs-studio#10120 (undo/redo breaks layout, ignores history) | **Unknown** (upstream could not repro on a minimal collection either) | Plausible mechanisms are all still here: scene-backup entries look sources up by name (`OBSBasic_Scenes.cpp.hpp:836`), so after a rename an older entry creates a duplicate (`:838`); scene reloads replace all items (`libobs/obs-scene.c.h:1121`); transform entries skip items whose id no longer matches (`obs-scene.c.h:2387-2388`); group lookup in transform restore is by name (`obs-scene.c.h:2422`). Needs a repro with the reporter's `bugged.json`. |
| #5516 (window/display capture blank after undo/redo) | **Unknown**; Windows-only (WGC), not testable on Linux | Upstream commenters reproduce it without undo, so it is likely a capture/studio-mode bug. Undo makes it more likely: transform undo calls `SetCurrentScene(..., true)` (`OBSBasic_SceneItems.cpp.hpp:1021`), and scene-backup undo re-runs `obs_source_load2` on every backed-up source (`OBSBasic_Scenes.cpp.hpp:855`, `libobs/obs-source.c.h:4325-4335`). |
| #5152 (sources flicker on undo of delete) | **Present** (by code; no runtime repro run) | `CreateSceneUndoRedoAction` calls `obs_source_update` on the scene (`OBSBasic_Scenes.cpp.hpp:849`), whose `scene_load` removes every item and re-adds it (`libobs/obs-scene.c.h:1115-1142`, `remove_all_items` at `:1121`). This is the cause upstream's maintainer gave. |
## 5. The affordance
| Item | Finding |
|---|---|
| Actions | `actionMainUndo`/`actionMainRedo` are the live pair: in the Edit menu (`frontend/forms/OBSBasic.ui:856-857`), defined `enabled=false` (`:2142-2157`), triggered at `frontend/widgets/OBSBasic_MainControls.cpp.hpp:590-598`, shortcuts Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y app-wide (`frontend/widgets/OBSBasic.cpp.hpp:374-381`). `actionUndo`/`actionRedo` (`OBSBasic.ui:1698-1713`) are dead: not in any menu, no code references. Remove them. |
| Enable state | Driven by the stack itself (`undo_stack.cpp.hpp:23-27`, `:58-62`, `:78-86`, `:102-110`, `:113-129`). A toolbar `QToolButton` bound to the same `QAction` inherits text, tooltip and enable state for free; fix the bug at `:117` first. |
| Toolbars | Only `scenesToolbar` (`OBSBasic.ui:1055`) and `sourcesToolbar` (`:1184`). No main toolbar; adding the actions to `sourcesToolbar` is the least disruptive spot. |
| Icons | No undo/redo icon in `frontend/forms/images/`. `revert.svg` exists (`frontend/forms/obs.qrc:38`) with theme variants (`frontend/data/themes/Yami.obt:539`, `Yami_Light.ovt:221`, `System.obt:85`). New `undo.svg`/`redo.svg` (redo = mirrored undo) must be added to `obs.qrc` and each theme's `Dark/`/`Light/` folders, following the `revert.svg` pattern. |
| Localization | `Undo.Undo`, `Undo.Redo`, `Undo.Item.Undo="Undo %1"`, `Undo.Item.Redo="Redo %1"` exist (`frontend/data/locale/en-US.ini:329-336`) with 47 per-action names (`:331-382`), already shown as menu text. A tooltip can reuse them; no new keys needed except for a toast or history panel. |
| Options | **Toolbar button:** a day's work, reuses existing wiring. **Toast** ("Undid: Rename 'X'"): small, uses the existing name; needs one key. **History panel:** needs read access to the deques and a jump-to API; a project of its own. |
## Split
| Pure discoverability (no behaviour change) | Real coverage work |
|---|---|
| Undo/Redo toolbar buttons bound to `actionMainUndo/Redo` | Fix #5152 (diff-based scene restore instead of `scene_load`) |
| undo/redo icons in all themes | Resolve by uuid, not name (#10120 mechanisms) |
| Fix empty-stack enable bug (`undo_stack.cpp.hpp:117`) | Byte cap, transform diffs |
| Remove dead `actionUndo`/`actionRedo` | Lock, filter toggle/reorder, scene reorder, transitions |
| Optional toast | Settings / hotkeys / scripts (decide in or out, and write it down) |
**Verdict:** the claim holds. The button is a day of work, because enable
state, names, shortcuts and localization already exist. Coverage and
correctness are a project: #5152 is present by code, #10120 and #5516 need
repros, and at least six user-visible edit types (section 1b) have no entry.
## Proposed first implementation PR
1. RED: a test that the Undo action is disabled after `push_disabled()`/`pop_disabled()` on an empty stack; GREEN: fix `undo_stack.cpp.hpp:117`.
2. Add `actionMainUndo`/`actionMainRedo` to `sourcesToolbar` with new `undo.svg`/`redo.svg` icons in every theme; tooltips from the existing names.
3. Remove the dead `actionUndo`/`actionRedo`.
4. A `docs/features.md` ledger line (user-visible change).
\#5152 is a prerequisite in principle, since a button advertises it, but its
fix touches libobs `scene_load` semantics and should be its own PR landing
before or with the button. #10120 and #5516 stay follow-ups until reproduced.
## Follow-up issues to file
| Title | One line |
|---|---|
| bug: undo/redo of scene edits recreates every item (upstream #5152) | Replace `obs_source_update` on the scene (`OBSBasic_Scenes.cpp.hpp:849`) with a diff-based restore. |
| bug: undo entries resolve sources by name, not uuid | `OBSBasic_Scenes.cpp.hpp:836` creates duplicates after a rename. |
| repro: upstream #10120 against this fork | Use the reporter's `bugged.json`; record steps and result. |
| repro: upstream #5516 on Windows (WGC + studio mode) | Determine whether undo is involved at all. |
| bug: Undo stays enabled on an empty stack after `pop_disabled()` | `undo_stack.cpp.hpp:117`. |
| bug: coalesced merge keeps a stale redo stack | `undo_stack.cpp.hpp:46-56`, merge returns before `clear_redo()`. |
| perf: cap undo history by bytes, store transform diffs | 5000 whole-scene backups can reach gigabytes. |
| feat: undo for lock, filter enable/reorder, scene reorder, transition changes | Sites listed in section 1b. |
| docs: write down undo scope | Settings, collections, profiles, websocket, studio mode, projectors are out; say why. Remove or use `Undo.SceneCollection.Switch`. |
| cleanup: remove dead `actionUndo`/`actionRedo` | `OBSBasic.ui:1698-1713`, no references. |
| feat: undo toast and/or history panel | After the toolbar button lands. |
# Worker prompt
The copy-paste prompt the README offers under "Want to help port OBS to
Rust?" (#2326). It starts any capable agent (Claude Code, Codex, clud, or a
chat window) as a worker that takes one issue to an open PR and stops.
This file is canonical. `ci/test_readme_worker_prompt.py` fails when the
README's block differs from the block below, so edit both together.
```text
You are a worker in obs-rust/obs-studio, the Rust rewrite of OBS Studio.
Take exactly one issue from claim to an open pull request, then stop.
1. Clone https://github.com/obs-rust/obs-studio if you are not in it.
Read AGENTS.md, then .claude/skills/obs-worker/SKILL.md, and follow it.
It sends you to docs/rust-port/coordination.md and
docs/rust-port/testing-policy.md: read both before you code.
2. Pick one open issue from label:ready (fall back to
label:needs-investigation). Skip any with a recent "Claiming:" comment
or an open PR that names it. Comment "Claiming: #N" with a short plan.
3. Branch from master. Commit a failing test first (RED), then the fix
that makes it pass (GREEN). Run ./lint. One PR per issue.
4. Open the PR against master, describing RED and GREEN.
5. Do not merge, never push to master, and never commit secrets.
Report the PR URL and stop. Maintainers queue PRs; you don't.
Stuck? Ask in the Discord linked in the README, or in Discussions.
```
# Back pressure and AI rebase
## What failed (2026-11-09)
By 14:00 UTC, 114 PRs were open and nothing had merged for more than 5 hours.
Every part of the tooling made its own admission decision from fixed knobs:
- Pool managers kept 8 workers busy, and each worker opened a PR when it finished.
- Chaperones (`pr_merge_watch --enqueue-when-ready`) re-enqueued every PR the queue ejected.
- Rebase waves force-pushed whole sibling sets at once, which restarted CI on every one of them.
None of those parts measured the one quantity that mattered: how fast the merge queue was actually landing PRs. Hosted runners stopped picking up jobs, so that rate fell to zero. Every PR that was still being added after that point increased queued runs and conflicts, which caused more rebases, which queued more runs again. A static cap (lesson 44's "about 15 PRs") would only have moved the cliff to a different spot. It is too low when runners are fast and too high when they are starved.
## Design: measure capacity instead of configuring it
`ci/backpressure.py` takes its numbers from live GitHub state and has no settings:
| signal | source |
|---|---|
| capacity | PRs merged in the last 2 h |
| width | `max_entries_to_build` from the repository's active merge-queue ruleset; fallback 5 if unreadable |
| in flight | union of queue entries and non-draft armed PRs, excluding only conclusively parked red PRs |
| starvation | age of the oldest queued job in its current run attempt (20 min or more counts as starved); job-less runs do not count |
When `capacity > 0`, the limit is `max(capacity, 2 * width)`. After a stall (`capacity == 0`), the limit is `width`. The gate is **open** when `in_flight < limit` and runners are not starved; otherwise it is **closed** (exit code 75). Starvation always forces headroom to zero, whatever the limit. Unreadable PR or queue state still fails closed.
The old one-PR-per-2-h ramp after a stall took about 2 h to recover, even though the queue tests `width` entries at once. Attested PRs reach the queue in about 66 s with no PR-side CI. Allowing one build group's width during a stall and at least two during normal operation keeps that capacity useful. The oldest queued job remains the catastrophic-failure guard from the 2026-11-09 collapse. Width is read once per invocation; an unreadable ruleset uses 5 without closing admission by itself. JSON verdicts report `width`, `width_source` (`ruleset:` or `fallback`) and `limit_reason` (`normal`, `stall` or `starved`).
### Who obeys it
- `./push` opens a new PR as a **draft** while the gate is closed. The work is still published, but it uses no queue capacity.
- Pool managers check the gate before launching producers. When it is closed, they assign rebase and fix work instead of new ports.
- Chaperones enqueue only while it is open.
- `ci/ai_rebase.py --dirty` rebases at most the gate's `headroom` PRs per run, oldest first, because every rebase restarts CI.
## AI rebase
`ci/ai_rebase.py` replays a PR onto `origin/master`. At each stopped step it runs the clud agent unattended (`clud --openrouter --model ~deepseek/deepseek-flash-latest --unattended`) with the instructions in `ci/ai_rebase_prompt.md` and the list of conflicted files. The agent can read neighbouring code and run the repo's own fixers (`test_test_graph_sorted.py --fix`, `soldr cargo fmt`). It only stages files: the script continues the rebase and judges the result. Without clud, each file goes to the model directly. `AI_REBASE_MODEL` overrides the model.
A resolution is refused, and the PR is left untouched with a comment explaining why, if any of these holds:
- conflict markers remain,
- more than 2 lines that either side added are missing,
- `git diff --check` fails,
- the file is a lock file or binary.
The push uses `--force-with-lease` against the head that was fetched, so an author's concurrent push always wins. It then decides whether the PR goes back in the queue, biased towards yes: auto-merge is armed (pinned to the new head) unless the PR is a draft, says hold or "do not enqueue" in its body or labels, has changes requested, failed more than two real checks on its old head, or failed in the merge queue. Back pressure is left to the queue and the gate. The arm command leaves the merge strategy to the queue (which squashes); a rejected arm is reported as `failed to arm auto-merge` and makes the script exit nonzero even when the push succeeded.
### Cooperation with the coordinator, manager and worker pool
The bot owns mechanical rebases of DIRTY PRs and landing stacked drafts after their parent merges. The coordinator/manager assigns a worker to real failures or rebases the bot refuses, and checks whether the bot is enabled before assigning overlapping rebase or landing work. Both bulk selection and explicit PR runs respect these signals:
| label | owner and contract |
|---|---|
| `pool-active` | A pool worker adds it before working on an existing PR and removes it when retiring. The bot reports `skipped: worker active` and does not fetch, check out, rebase or push that PR. |
| `queue-failed` | The manager or requeue bot adds it after a real queue test/build failure; the manager dequeues and disarms the PR and stops its watcher. The rebase bot reports `left out: failed in the merge queue` and leaves it disarmed. Remove it only after a worker fixes and verifies the failure. Watchers must honor the label too. |
The bot also grants at least 30 minutes of quiet time after a head push, reporting `skipped: worker active`. GitHub often returns null for commit `pushedDate`, so the cheap signal is PR `updatedAt`: pushes advance it even when the commit was authored earlier. Comments or label changes can conservatively extend that quiet time. Missing activity data also skips the PR. Skipped workers consume no bulk headroom; the remaining candidates keep their original oldest-first order.
Even without `queue-failed`, the bot checks the most recent `removed_from_merge_queue` timeline event before rebasing. A `failed_checks` ejection on the current PR head prevents re-arming. The event's `beforeCommit` is a synthetic queue commit, so the bot uses ordered commit/force-push timeline events to bind the failure to the PR head, paging backwards when necessary. A newer head or a later non-failure removal does not inherit an old failure. Unreadable or incomplete failure history refuses the operation instead of guessing. The old head's verdict survives the bot's own rebase; rebasing alone cannot clear a real failure.
Stacked drafts keep the first line `Stacked on #P: review only the commits after .` Once P merges, the bot replays only commits after that SHA, replaces the stacking note and marks the PR ready, subject to the same ownership, holds and queue-failure guards. Lease pushes, FIFO ordering and back-pressure headroom remain in force. Bot pushes carry no client attestation, so the rebased PR runs fallback CI.
### Automatic infrastructure re-arm
`uv run --no-project --script ci/ai_rebase.py --requeue-ejected` runs before the rebase steps in the same workflow at :17 and :47 (also on master pushes and manual dispatch). It uses `GITHUB_TOKEN` with `contents: read` and `pull-requests: write`; Actions evidence is public read-only data. It needs neither the ai-rebase App token nor the model key, performs no checkout changes or pushes, and leaves merge strategy to the queue. Missing `AI_REBASE_TOKEN` disables only rebasing. Refs #4896.
The latest queue/head transition must be a removal within three hours, bound by preceding commit/force-push events to the unchanged PR head. The PR must be open, disarmed, out of draft, without a hold, `draft`, `pool-active` or `queue-failed` label or requested changes. The worker quiet period applies. Conflicts stay with the rebase path; manual removals are never retried. Immediately before mutation the bot refreshes the PR and queue transition.
- `checks_timed_out` is retried directly. Otherwise the bot reads the exact synthetic `beforeCommit`'s merge-group runs and their latest-attempt jobs, including failed jobs inside cancelled runs.
- Cancellation, runner-loss diagnostics, checkout/setup-soldr/cache-restore failures and explicit network errors qualify as infrastructure. Compiler/assertion failures take precedence over network text. A self-hosted failure also qualifies when the same workflow and exact matrix job passed on a different runner within one hour.
- Every substantive failed job must qualify. The downstream `CI Gate ✅` failure is ignored only with supporting failed/cancelled job evidence. Real test/build failures get `queue-failed` and remain disarmed; missing, unreadable or ambiguous evidence leaves the PR untouched.
One automatic attempt is allowed per PR per head SHA, across schedules and further ejections. Before `gh pr merge N --auto --match-head-commit SHA` (without `--squash`), the bot posts `` in a hidden comment. It pages through comments when checking this marker; restoring an identical SHA cannot reset the cap. The marker reserves the attempt before arming, so a rejected arm consumes the attempt and is reported as a failure. Workflow concurrency serializes these reservations. A run performs at most ten actions by default (`--limit`); `--dry-run` classifies without comments, labels or arming. Explicit PR numbers can narrow a manual script run.
`.github/workflows/ai-rebase.yaml` runs the script on every master push, every 30 minutes, and on manual dispatch with explicit PR numbers.
It needs:
- the `OPENROUTER_API_KEY` secret;
- the **obs-rust-ai-rebase** GitHub App, installed on this repository only (contents: write, pull-requests: write, actions: write, checks: read), with its id in the `AI_REBASE_APP_ID` variable and its private key in the `AI_REBASE_APP_PRIVATE_KEY` secret. Each job mints a short-lived installation token from it (`actions/create-github-app-token`), so there is no long-lived token to store or rotate. The token cannot be `GITHUB_TOKEN`, for two reasons. A push made with `GITHUB_TOKEN` starts no workflows, so the rebased PR would never get CI. And the repository's maximum `GITHUB_TOKEN` grant is read-only.
Rebased commits keep their authors; the committer becomes the token's identity. Only same-repository PRs are rebased, never forks. A dry run on #4235 (2026-11-09) resolved 3 conflicted files in one step and kept all 455 added lines.
# Cargo-driven OBS native build conversion
Tracking issue: .
The requested final state is a working OBS Rust application built through Cargo
and `cc::Build`, including shared libraries, plugins, generated files, graphics,
Qt, resources, tests and platform packaging. A core-only archive or test fixture
does not complete the conversion.
## Earlier prototype wrap-up
Full conversion work resumed at the maintainer's request on October 21, 2026.
The following records the earlier prototype deferral, not a limit on the resumed
scope: all requirements in #1332 still apply.
The maintainer requested stopping further expansion and deferring remaining
C/Rust parity validation when it delays prototype launch. Follow-up
[#1390](https://github.com/obs-rust/obs-studio/issues/1390) owns that remaining
validation. Existing tests remain intact; this is not a claim of complete
parity, release readiness or completion of the full conversion in #1332.
## Linux development application command
From a native Linux checkout with the existing native build dependencies installed:
```sh
uv run --script ci/native_build.py build --profile relwithdebinfo
uv run --script ci/native_build.py --help
```
The launcher builds the `obs-build` tool through `soldr cargo`, then runs it
outside Soldr's build process. Both Rust build invocations use the existing
native-consumer `SOLDR_RUSTC_WRAPPER=none` safeguard; standalone C/C++ compiler
caching remains available. The tool builds the production hybrid core,
frontend API, OpenGL renderer, Qt application, enabled modules and scripting
bindings through the Rust build graph. It does not build a C reference or ship
compatibility probes. CMake remains the authoritative build while the full
acceptance requirements above are incomplete.
Run the executable printed by the command. Each invocation stages a fresh
`build_cargo//runtimes//` development runtime and writes
`application-build.json` there. The executable and modules search this runtime's
`lib64` before their original build directories; launching does not require
`LD_LIBRARY_PATH`. This layout still relies on the host's native SDK/runtime
libraries and is not a distributable package.
Profiles are `debug`, `release`, `relwithdebinfo` (default) and `minsizerel`.
`--separate-core` and `--core-pch` select core compilation modes. Help lists the
optional plugin/SDK and scripting selections. Native Linux is the only full
application target currently accepted by this command; the macOS/Windows graphs
below are intermediate component coverage. Complete configuration parity,
all-platform application orchestration, packaging and the controlled native
cache/performance acceptance remain open.
NVENC and its capability helper are enabled by default, matching CMake. The
command builds only the existing Rust CUDA loader for production. Install
`ffnvcodec >= 12` headers, or select `--without-nvenc` to omit the module,
helper and Rust archive. `--without-nvenc-ffmpeg-ids` keeps NVENC enabled but
omits its legacy FFmpeg encoder aliases. The manifest records this selection.
The NVENC source inventory is shared with CMake through
`plugins/obs-nvenc/build/source-sets.json`.
On a host without usable NVIDIA driver libraries/devices, the helper reports
`nvenc_supported=false` and OBS logs `NVENC not supported`; software encoders
remain available. The application runtime test checks this outcome separately
from module loading on supported hardware. A software recording does not prove
hardware NVENC encoding.
Frontend source groups are shared by CMake and Cargo through
`frontend/build/source-sets.json`; the Qt wrapper host groups similarly use
`shared/qt/wrappers/source-sets.json`. Generated configuration stays in the build
output directories.
The existing application test category can validate the exact command-produced
runtime, rather than rebuilding its application artifacts:
```sh
OBS_BUILD_APPLICATION_RUNTIME=/absolute/path/to/runtime \
OBS_BUILD_APP_RECORD=1 \
soldr cargo test -p obs-studio-rust --test obs-tests-app \
--features libobs-integration production_command_runtime_runs_saved_scene_and_recording \
-- --nocapture
```
Run with an isolated X display (for example Xvfb) and the existing GUI test
dependencies, including the FFmpeg executables. The test owns a fresh profile in
the runtime directory: startup, the selected staged libraries/modules, saved
scene, Lua/Python callbacks, recording and normal shutdown are asserted. Use a
freshly staged runtime for every test invocation. The separate compatibility
driver retains its C-reference/hybrid, Tools dialog and WebSocket checks.
## Default build mode
The user selected **unity on, compiled PCH off**. Keep both settings optional.
`libobs::Options::default()` uses that mode; bundled `obs-sys` exposes the same
choice as `OBS_SYS_UNITY=1` and `OBS_SYS_PCH=0` when no override is supplied.
Components that already list explicit unity groups preserve those boundaries.
## macOS core graph
The native engine selects macOS core sources from the same
`libobs/build/source-sets.d/` used by CMake. It builds an explicit C reference
and the production Rust/C hybrid, retaining the framework install name and
macOS 13 deployment target. The generated development framework lookup layout
does not supply release metadata, signing, or application packaging.
Set `libobs::Options::native_dependencies` to an explicit prebuilt OBS dependency
bundle. Bundled `obs-sys` accepts the same root through
`OBS_SYS_NATIVE_DEPENDENCIES`, tracking that input for Cargo rebuilds. The outer
Cargo invocation supplies the release Rust archive via `OBS_BUILD_RUST_ARCHIVE`.
Cross compilation additionally needs a target compiler, Apple sysroot and Darwin
linker; the graph does not infer these from host package discovery.
`SourceCompileOptions` applies source overrides after target/language flags and
before PCH generation. `NativeBuild::separate_target_sources` carries those
overrides and explicit PCH assignments to individual group members. This keeps
ARC cocoa groups separate from the non-ARC loader even when they share a header.
Clang PCH now supports macOS as well as Linux; both unity and PCH remain optional.
The existing macOS Tier 2 script also builds the Cargo core pair, compares its
exports to the actual CMake reference, proves dyld selected each Cargo core, and
runs the unchanged CTest suite against each. It checks the bundled crate's build
path separately. These are core checks: they do not establish the macOS frontend,
graphics backends, plugins, complete application, or release package conversion.
## macOS graphics graphs
The macOS OpenGL graph uses the canonical graphics manifest, the original C and
Cocoa groups, GLAD and the Cocoa/IOSurface/OpenGL frameworks. The Cocoa group
keeps manual reference counting. Unity and compiled PCH follow the core options
independently. ARM64 cross builds produce 153 exported symbols; actual CMake
export agreement and native loading require the macOS validation lane.
`graphics::build_metal` consumes all 34 original Swift files and the original
bridging header from the same manifest as CMake. `NativeBuild::swift_shared_library`
accepts typed `SwiftLibrary` inputs, invokes the Swift compiler and emits the
dylib, Swift module and Objective-C compatibility header under the build output.
C-family compilation continues through `cc::Build`. Metal uses Swift 6, optimized
whole-module compilation, debug information and the existing macOS 13 minimum.
Release/configuration overrides and distribution signing remain separate work.
Native Apple builds discover `swiftc` and the macOS SDK through `xcrun`. Override
them with executable-path `SWIFTC` and SDK-directory `SDKROOT`; target-qualified
forms (hyphens or underscores in the triple) take precedence. Cross builds must
supply both paths and an Apple-compatible Swift toolchain. The Clang importer
receives the declared include paths and C definitions. Swift sources, the bridge,
declared native inputs/dependencies and tool-selection environment are tracked;
module caches live beside the generated library. Cache placement alone does not
establish compiler-cache hits or a controlled performance result.
The existing native-build category contains a Swift/C contract requiring results
42, 52, 54, 56 and 58 after header, importer flag, Swift source and C dependency
changes. Each result is checked in a fresh process, preserving dyld's Objective-C
image lifetime behavior. This contract executes on native macOS, not Linux.
`OBS_BUILD_MACOS_GRAPHICS=1` extends the existing core integration contract to
both renderers; `opengl` selects an explicit cross-build subset and does not
establish Metal coverage. `OBS_BUILD_MACOS_OPENGL_REFERENCE` and
`OBS_BUILD_MACOS_METAL_REFERENCE` require exact exports from actual CMake modules.
The macOS Tier 2 script builds those originals and both Cargo renderers, then
checks core/module file identity and public device name/type in fresh processes
against each Cargo core. Wrong-core and wrong-backend controls must fail. The
unchanged CTest suites remain. These loading checks do not create a graphics
device, verify rendered pixels, record media or prove the full application.
## macOS capture module graphs
`LibraryKind::Module` selects a loadable module: Apple linking uses `-bundle`
and omits the dylib install name, while shared libraries retain `-dynamiclib`.
The capture contract verifies `MH_BUNDLE` headers in both Cargo and CMake
artifacts. The existing shared-core/plugin fixture exercises module loading
and observes a rebuilt dependency without relinking the module.
`plugins::build_macos_capture` builds the original `mac-capture`,
`mac-avcapture` and `mac-avcapture-legacy` modules. CMake, its cross checks
and Cargo consume `plugins/mac-capture/source-sets.json`. The screen/audio
Objective-C group keeps manual reference counting; the modern camera uses
ARC and Clang modules, and the legacy camera keeps Objective-C++ with ARC.
Framework dependencies, weak ScreenCaptureKit linking, macOS 13 minimum,
locale data and independent unity/PCH choices are retained. Each development
artifact has the native `.plugin/Contents/MacOS/` layout, staged resources
and an `Info.plist` with its executable and bundle identifier. A snapshot of
binary, resource paths/contents and metadata selects the output directory so
removed resources cannot survive from an older same-named bundle. Release
version metadata, signing and distribution packaging remain incomplete.
`OBS_BUILD_MACOS_CAPTURE=1` extends the existing core integration contract.
The three `OBS_BUILD_MACOS_MAC_CAPTURE_REFERENCE`,
`OBS_BUILD_MACOS_MAC_AVCAPTURE_REFERENCE` and
`OBS_BUILD_MACOS_MAC_AVCAPTURE_LEGACY_REFERENCE` inputs require exact export
agreement with actual CMake binaries. The native macOS Tier 2 script builds
those references and runs each Cargo/CMake module with both Cargo cores in
fresh processes. Checks cover module/core file identity, API version,
description, byte-for-byte resource agreement, CoreFoundation bundle/executable identity,
initialization and all registered source IDs.
Wrong-module and wrong-core controls must return 14 and 12 respectively.
The unchanged CTest suites still run against both cores.
Local ARM64 cross builds pass with unity on/PCH off and separate sources/PCH on.
The Linux cross toolchain lacks Apple's availability runtime; the local check
links LLVM 21.1.5's original `compiler-rt/lib/builtins/os_version_check.c`,
compiled for the target, without altering source availability checks. Native
Apple Clang supplies its own runtime. Cross compilation does not establish
native module initialization. Native execution/export agreement remains a
required CI result. Registration checks do not open screen, microphone or
camera devices, verify captured media, or prove packaged saved-profile behavior.
## Windows core graph
The Windows MSVC graph uses the shared libobs source manifest and existing
`rust-exports.d` fragments. The obfuscation interface group is also selected
from that manifest by CMake. An explicit OBS dependency bundle supplies headers
and import libraries; `w32-pthreads` is built from its existing source and
resource template. Each core retains `obs.dll` and its `obs.lib` import library.
`SharedLibrary::resource_files` contains native `.rc` scripts. Declare their
included headers, icons and other inputs in `resource_input_files` for Cargo
tracking; `resource_compile_options` supplies RC-specific options. The resource
compiler receives the target's definitions and include paths, separately from
C/C++ flags, unity and PCH. Set a target-qualified `RC_` (hyphens or
underscores), `HOST_RC`/`TARGET_RC`, or `RC` to an executable path. Otherwise the
engine discovers the Windows SDK resource compiler, falling back to `llvm-rc`
for clang-cl. Resources link into DLLs or executables; putting resource scripts
in a static archive is rejected instead of silently losing them.
MSVC and clang-cl PCH use the same language and source-specific flags as their
consumers. PCH-generated objects are retained for linking and archiving, with
shared common/variant objects linked only once. The native contracts cover
resource payload changes, DLL/executable loading, C/C++ flag isolation, header
changes, unity modes and PCH objects linked through a static archive.
The existing Windows Tier 2 script builds the Cargo pair with PCH enabled,
compares exports to its CMake reference, and checks bundled `obs-sys` with PCH
disabled. A separate loader probe checks the loaded core's file identity and a
deliberately incorrect expected file before the unchanged CTest suite runs
against each Cargo core. Test-specific runtime paths are checked for shadowing.
Cross builds can use `OBS_BUILD_WINDOWS_DEPENDENCIES`, `OBS_BUILD_WINDOWS_TARGET`,
`OBS_BUILD_WINDOWS_OUTPUT`, and `OBS_BUILD_WINDOWS_RUST_ARCHIVE` with the existing
`native_libobs::windows_tests::core_builds_from_the_canonical_manifest` test.
`OBS_BUILD_WINDOWS_PCH`, `OBS_BUILD_WINDOWS_SEPARATE` and
`OBS_BUILD_DISABLE_HEVC` select additional configurations. Export inspection uses
`OBS_BUILD_WINDOWS_EXPORT_TOOL` (llvm-readobj by default, or dumpbin on Windows).
These are core checks. Resource metadata currently follows the core API version
and existing bootstrap strings; full configuration/release-version overrides,
frontend, graphics, plugins, packaging and controlled compiler-cache measurements
remain required before retiring CMake authority. Cross-built artifacts do not
prove Windows runtime behavior.
## Windows graphics graphs
`graphics::build_d3d11` and `graphics::build_opengl` build the original Windows
renderers against a selected Cargo core. Direct3D uses C++17, the original SDK
libraries and a selectable integer GPU thread priority (zero by default).
OpenGL retains the GL/WGL loader objects and system OpenGL linkage. Both renderers
compile their existing Windows version-resource templates. Release metadata
unification remains required; these resources currently follow the core API
version and bootstrap strings, as the Cargo core does.
The canonical `cmake/graphics-source-sets.json` supplies graphics/GLAD sources to
the original CMake targets, cross checks and Cargo. The existing unity groups
remain in source order; core `Options::unity` and `Options::pch` also select
renderer compilation. GLAD retains separate translation units. Its generated GL
and WGL loaders share a tentative C global; CMake and Cargo both request common
symbols for clang-cl, matching MSVC without editing the generated sources.
Set `OBS_BUILD_WINDOWS_GRAPHICS=1` on the existing Windows core integration
contract to build both renderers. `OBS_BUILD_WINDOWS_GPU_PRIORITY` selects the
D3D11 priority. `OBS_BUILD_WINDOWS_D3D11_REFERENCE` and
`OBS_BUILD_WINDOWS_OPENGL_REFERENCE` require exact exported symbol agreement with
actual CMake renderers. Cross builds produced 171 D3D11 and 151 OpenGL exports
and version-resource sections; they do not prove native loading or rendering.
The Windows Tier 2 path also builds the original CMake renderers and compares
their exports. A fresh-process native probe checks the loaded renderer's file
identity, public device name/type and version-resource description against each
Cargo core, with a wrong-renderer negative control. The same probe exercises the
CMake modules against those cores. These checks do not create a graphics device,
verify rendered pixels or establish complete Windows application coverage.
## Requirements carried forward
- Native C/C++ builds must be very fast. Reuse explicit unity groups, make unity
configurable, and implement optional PCH with compiler-compatible settings and
correct dependency invalidation. The user's instruction that unity and PCH are
optional supersedes BUILD.md's always-on rule for this conversion.
- Build through soldr. Demonstrate real compiler cache hits, cold/warm timings,
no-change builds and correctness after editing source, headers and generated
inputs. A setup-soldr archive restore alone does not prove native cache reuse.
- Preserve the public C ABI, dynamic loading, plugin discovery, library identity,
exported symbols and the existing Rust implementation. Build both libobs
variants and exercise the unchanged compatibility and differential suites.
- Keep the application and bundled crates on one native build description.
- Generate files in build output directories; explicitly consume generated
outputs so stale source-tree files cannot shadow them (PR #1323).
- Preserve the complete feature surface on Linux, Windows and macOS. Verify a
real running application, scenes, recording, plugins, shutdown and applicable
websocket tests. Packaging validation must run packaged artifacts.
- Ordinary Cargo users can provide documented native tools; soldr manages the
toolchain and caching. Do not require a nested soldr invocation inside build.rs.
- Reuse existing CI workflows; no new workflow files are authorized.
## Implementation order and evidence
1. `obs-build`: typed native build inputs, actual cc::Build compilation, shared
linking, plugin loading and unity on/off contracts. Start with failing tests.
2. `obs-sys`: the real libobs graph, native dependencies, generated configuration
and Rust twin; unchanged C tests and symbol parity.
3. Frontend/plugins, Qt code generation and resources, platform linking and
packaging; run the existing application test battery on these artifacts.
4. Optional PCH, cache/incremental performance measurements and existing CI
integration. Retire CMake only when complete feature/test parity is evidenced.
The existing CMake build remains the artifact and behavior reference during the
conversion. Intermediate progress must not be reported as full completion.
## Linux libobs checkpoint
The bundled `obs-sys` feature now compiles the real C libobs through `cc::Build`,
links `libobs.so.30`, and generates configuration, version and core-module source
files under Cargo's output directory. It uses the same canonical source manifest
as the CMake reference. libcaption remains a separate static archive; system
libraries remain dynamically linked, including when pkg-config lists a static
archive directory before its shared-library directory.
Local evidence for this checkpoint:
- The native build engine's three tests pass (dependency selection, generated
source/unity toggle, and a dynamically loaded plugin observing a rebuilt core).
- Bundled libobs passes its public C API version and startup/shutdown tests.
- Editing only the JSON manifest triggers CMake regeneration. Changing a
target-qualified C compiler flag reruns Cargo's bundled native build; compiler
metadata does not add unintended static-library linkage.
- Its 1,766 exported symbols exactly match the local CMake C reference.
- 51 unchanged, already-built C test executables pass against both libraries.
`ldd` confirms each executable loads the intended replacement `libobs.so.30`.
This validates the replacement library; it does not demonstrate a Cargo build
of those test executables or the Rust implementation twin.
This checkpoint is Linux C libobs only. The application and plugins,
full test battery, macOS/Windows graphs, installation/packaging, optional PCH and
controlled build/cache benchmarks remain required. The generated version and
install paths are prototype defaults and still need release configuration.
Native dependencies are discovered using pkg-config; local Nix verification used
`PKG_CONFIG_PATH` and `CPATH` for installed packages and uthash respectively.
## Linux Rust implementation twin checkpoint
`libobs::build_pair` accepts the release `libobs-rust` static archive from an
outer Cargo invocation. It compiles common C objects once, then links the C
reference and production hybrid into separate directories with the same SONAME.
The Rust archive is whole-archive linked and its internal symbols are hidden by
the existing export map. Only the hybrid is installed; the C reference is explicit testing infrastructure.
Build the release archive with `soldr cargo build -p libobs-rust --release`.
With native dependencies available, set `OBS_BUILD_RUST_ARCHIVE` to the absolute
`target/release/liblibobs_rust.a` path and run
`soldr cargo test -p obs-studio-rust --features libobs-integration --test obs-tests-app`.
`OBS_BUILD_TEST_OUTPUT` optionally retains artifacts in a chosen output directory.
The test defaults to a temporary output directory. Set
`OBS_BUILD_DISABLE_HEVC=1` to exercise the disabled-HEVC configuration. GNU `nm`
is required for the Linux export comparison.
Local evidence: both variants pass startup/shutdown and public data API roundtrip
checks, and each exports exactly the same 1,766 symbols (1,762 with HEVC disabled).
The opt-in test compares complete export sets and checks HEVC export availability.
The same 51 unchanged C
executables pass against both newly built variants with their loaded library
paths checked. The rest of the complete application/platform/test/packaging
requirements above remain outstanding.
## Linux transitions and filters checkpoint
`plugins::build_transitions` and `plugins::build_filters` build actual OBS
modules through the native engine and link them to the shared C library.
The filters options preserve independent SpeexDSP and RNNoise switches. The
bundled RNNoise fallback uses a canonical JSON C source list shared with CMake;
the CMake target retains the same 18 source/header entries.
The opt-in integration test loads these modules through `obs_open_module` and
`obs_init_module`, then verifies transition/filter registration against both
libobs variants. Each variant runs in a separate process: the shared SONAME
allows plugin dependencies to retain a previous libobs instance if both variants
are tested in the same process. This matches existing C test isolation and normal
OBS execution. These checks do not yet exercise rendering or audio processing.
All four SpeexDSP/RNNoise combinations pass module registration against both
variants, as does disabled HEVC with the default modules. The actual CMake
RNNoise fallback target also compiles all seven objects after the canonical-list
migration; Clippy, gersemi and the build-group/platform guards pass. System
RNNoise discovery is implemented, but this host exercises the bundled fallback.
## Linux OpenGL checkpoint
`graphics::build_opengl` compiles the original OpenGL unity groups and GLAD loader,
links the shared backend, and creates its unversioned lookup name. It consumes the
same libobs options and generated configuration as the core. The Linux graph
includes X11/EGL and optional Wayland support; other platforms remain unfinished.
With an isolated X server available through DISPLAY, set `OBS_BUILD_RENDER=1` on
the opt-in integration test to exercise real graphics. Local verification used an
owned Xvfb process allocated via `-displayfd`, with `LIBGL_ALWAYS_SOFTWARE=1` and
`GALLIUM_DRIVER=llvmpipe`. Both variants initialize Mesa OpenGL 4.6, create a scene,
and receive at least three 64x64 NV12 frames through the public raw-video callback
API. The callback verifies a valid row and the expected black Y sample (16).
The probe uses the unchanged C headers for video configuration and callbacks;
shutdown and display cleanup happen before its shared libraries unload.
This demonstrates the native renderer and basic frame delivery. It does not yet
validate the full Qt application, recording, capture sources, all plugins,
Wayland runtime behavior or packaged artifacts. The prototype OpenGL version
number remains tied to the current OBS 33 configuration.
## Linux recording checkpoint
The native engine now links executables as well as shared libraries and archives.
Its executable contract runs a program linked to a shared core that consumes a
static helper. Windows dependency mapping preserves archive paths and converts
DLL paths to import-library paths; runtime validation there remains outstanding.
The module graph builds x264, the complete Linux obs-outputs groups and librtmp,
and FFmpeg with media playback, VAAPI, optional MPEGTS/SRT/RIST, logging and legacy
NVENC groups. It also builds the standalone FFmpeg mux executable. Shared
opts-parser, happy-eyeballs, BPM and libcaption dependencies use native archives.
The FFmpeg options follow current CMake defaults; the full option matrix and
hardware-specific behavior remain unverified.
Set `OBS_BUILD_RECORD=1` on the opt-in integration test, with native dependencies,
ffprobe and an isolated DISPLAY available. This implies the graphics probe. Both
variants load the encoder/output modules, verify registration and exactly one
loaded SRT library, then encode an isolated blank scene using real obs_x264,
ffmpeg_aac and mp4_output. The test stops the output, releases encoders, shuts
down OBS, and validates tracks, dimensions, decoded-frame counts and duration
with ffprobe. Local recordings each contain 18 H.264 frames at 64x64 and AAC
audio, duration 0.6 seconds. They contain no desktop or device capture.
`FfmpegArtifacts::deploy_muxer` places the helper beside the running app. The
integration stages its runner with that helper, selects the same libobs variant
for helper subprocesses, and also records through `ffmpeg_muxer` to Matroska.
All four files (MP4 and Matroska, C and Rust cores) pass the same ffprobe checks. The full Qt application, capture sources, other
modules/platforms, complete test battery, packaging and controlled performance
measurements remain required. Do not treat this checkpoint as a CMake retirement.
## Linux sources and services checkpoint
`plugins::build_source` provides typed selections for image sources, FreeType
text, PulseAudio, ALSA, V4L2, X11 capture and RTMP services. V4L2 preserves its
independent UDEV switch. RTMP service updates are configurable and remain off in
the integration smoke test to keep it offline. The default plugin behavior keeps
updates enabled when requested through its typed option. X11 capture and OpenGL
share the GLAD archive builder.
Set `OBS_BUILD_SOURCES=1` on the integration test with an isolated X display and
an EWMH window manager. Local checks use Xvfb plus an isolated KWin session;
XComposite correctly declines registration on bare Xvfb without EWMH. Both cores
load these seven modules and expose their thirteen expected input/output/service
registrations. The graphics probe also creates a 64x64 white color source,
adds it to the scene and requires three NV12 frames with Y=235 after draining
previous black frames. Both cores still record validated MP4 and Matroska files.
Disabled UDEV also passes registration and rendering against both cores.
The test does not open camera or microphone devices. Hardware capture, text
rasterization, streaming and service-update behavior remain to be validated with
the full application and packaged artifact tests.
## Linux PipeWire checkpoint
`SourceModule::PipeWire` builds the original Linux PipeWire unity group and
includes the camera group when the discovered PipeWire version is at least
0.3.60. It enforces CMake's PipeWire 0.3.33 and Gio 2.76 minimums and uses the
shared GLAD archive. Enable its opt-in build/load check with
`OBS_BUILD_PIPEWIRE=1`. Both cores load and initialize the module after graphics
initialization, then render and shut down. Portal availability, camera
permissions and actual screen/camera capture remain unverified; module load alone
does not establish those capabilities.
## Linux frontend API and Qt checkpoint
`frontend::build_api` builds the original C++ frontend API as a shared library.
It preserves Linux's SONAME 30 and creates its unversioned lookup name. C++17 and
hidden inline visibility match the CMake compiler configuration. Local symbol
comparison finds exactly 101 exports in both frontend libraries, with no missing
or extra symbols. `OBS_BUILD_FRONTEND_REFERENCE` optionally enables this complete
comparison against an existing CMake artifact in the integration test.
`qt::moc` runs Qt's meta-object compiler with the native target's include paths and
definitions and compiles its generated translation unit explicitly. It preserves
unchanged output contents/mtime. Host tools come from explicit Qt SDK inputs
(see [Explicit Qt SDK inputs](#explicit-qt-sdk-inputs)). Application builds
still need UI/resource generation and complete build-script input tracking.
Enable `OBS_BUILD_QT=1` to build the real VST module and frontend API. Both cores
load the VST module and expose its filter; the frontend API's no-callback defaults
are callable. VST editor/audio behavior, the full Qt application and resources,
other platforms and packaging remain outstanding.
## Mixed native languages checkpoint
Native targets now accept common compiler options plus separate C and C++ option
vectors. OBS modules use C17 for C sources and C++17/hidden inline visibility for
C++ sources. Mixed targets compile each language independently and link with the
C++ driver. The regression builds and executes a C++ standard-library program
that calls a C helper; each translation unit rejects flags intended for the other
language. All five native integration tests pass, as does the combined
core/source/Qt/PipeWire/MP4/Matroska check with frontend export comparison.
## Qt UI, resources and widgets checkpoint
`qt::uic` generates UI headers with the generated include directory first.
`qt::rcc` embeds resource collections as explicit C++ sources and records every
resource listed by RCC as a Cargo input. Both preserve unchanged generated files.
`OBS_QT_UIC` and `OBS_QT_RCC` select host tools for cross builds, alongside MOC.
`frontend::add_spinbox` adds the original shared spinbox unity source, Qt Widgets
and all three generated metaobjects, with C++17 required explicitly. The Qt opt-in
integration now runs a real QApplication using the offscreen platform: construct
OBS's virtual-camera dialog from its original UI, find its controls, decode an
embedded OBS PNG, exercise both OBS spinbox types and their metaobject, process
UI events and accept the dialog through its OK button. This passes locally.
This widget test does not yet start the complete OBS application or validate a
packaged runtime/plugin path.
## Explicit Qt SDK inputs
`OBS_QT_TARGET_PREFIX` names the Qt SDK the target links, and
`OBS_QT_HOST_PREFIX` names the SDK whose `moc`, `uic` and `rcc` run on the build
host (`libexec/` on Linux and macOS hosts, `bin/*.exe` on Windows hosts).
`OBS_QT_MOC`, `OBS_QT_UIC` and `OBS_QT_RCC` still override one tool each. A
native build may give only the target prefix, which then also supplies the
tools. With neither prefix, a native build keeps the system Qt6 pkg-config
path. A cross build must name both SDKs: `qt::package` and `qt::Tools` refuse
to fall back to the host's pkg-config, which would select host libraries. The
inputs are read, never written back to the process environment.
`qt::Sdk` reads the SDK's own exported CMake targets
(`lib/cmake/Qt6*/Qt6*Targets*.cmake`) as data. CMake is never run. For a module
and its `Qt6::` dependencies it evaluates the include directories, definitions,
compile options and link libraries for the Cargo target. It evaluates only the
generator expressions Qt exports (compiler, language, configuration, unset
consumer properties) and fails on any other. `libobs::add_package` and
`Dependency::package` route every `Qt6` package through it when a target
prefix is given. Before anything compiles it checks:
- **Architecture:** the module binary's ELF, PE or Mach-O header (every slice of
a universal framework) must contain the target architecture.
- **Version:** `QT_VERSION_STR` in QtCore's `qconfig.h` must be Qt 6, and every
host tool's `--version` must report the same release as the target SDK.
- **Configuration and CRT:** only configurations with a
`Qt6Targets-.cmake` export count; Qt's AdditionalTargetInfo
aliases are skipped. Rust's MSVC targets always link the release CRT, so a
Windows SDK whose only configuration is DEBUG (`/MDd`) is rejected, as is
`crt-static`. Multi-configuration SDKs use their release configuration.
Linux links the versioned `libQt6*.so` with an rpath to the SDK. Windows links the
import libraries (`lib/Qt6*.lib`) and the system libraries Qt exports, and
returns the DLL directory as the `PATH` runtime prepend for graph tests. macOS
links the framework binaries, Qt's exported system frameworks (each once) and an
rpath to the frameworks' directory.
The Linux, Windows x86_64 and macOS universal2 SDKs published in
`obs-rust/obs-studio-libs` (`qt6-6.11.1`) all resolve.
`qt_sdk_resolves_published_sdks` checks them when `OBS_QT_TEST_LINUX_PREFIX`,
`OBS_QT_TEST_WINDOWS_PREFIX` and `OBS_QT_TEST_MACOS_PREFIX` name the extracted
archives. With `OBS_QT_TARGET_PREFIX` set to the Linux SDK and no Qt visible to
pkg-config, the metaobject/UI/resource graph test and the unchanged remux queue
test compile and pass through Cargo and CMake. Qt is never built in CI; SDKs come
only from obs-studio-libs. Compiling against the Windows and macOS SDKs on those
hosts, Windows ARM64, MinGW and Linux distribution (multiarch) layouts as explicit
prefixes are not yet covered.
## Linux frontend executable checkpoint
`frontend::build_application` compiles and links the frontend executable using an
explicit source inventory, shared Qt interfaces, an Idian archive, JSON11, BPM,
libcaption, the frontend API and a caller-provided Rust GPU status archive. It
creates UI/plugin-path configuration in the output tree. This initial frontend
configuration is Linux with browser panels disabled; other feature/platform
configurations and release paths remain under conversion.
Build the GPU archive with
`soldr cargo build -p obs-frontend --release`, then enable the integration
check with `OBS_BUILD_APP=1` and `OBS_BUILD_GPU_ARCHIVE` pointing to the resulting
`target/release/libobs_frontend.a`. The executable runs and reports
`--version` identifies the OBS-Studio-Rust application version as `0.1.0`,
based on OBS `33.0.0-cc-build`.
This establishes compilation, linking and CLI execution; GUI startup, runtime
staging and complete application behavior still need validation.
The inventory includes two forms that CMake AUTOUIC discovered through header
includes. Generated metaobjects are combined into one translation unit with the
same textual header closure CMake supplies to its moc compilation. This preserves
complete Qt types without changing original headers or requiring precompilation.
Compiler include paths and identical definitions are deduplicated while retaining
order. Build/profile/version/install settings are still prototype defaults, and
controlled performance measurements have not been completed.
## Linux staged GUI runtime checkpoint
Set `OBS_BUILD_APP_GUI=1` with `OBS_BUILD_GPU_ARCHIVE`, native dependencies,
an isolated X display and an EWMH window manager to run the complete current
Linux graph. This implies the frontend, Qt widget probe, fourteen implemented
modules, OpenGL, source rendering and the MP4/Matroska API recording checks.
The GUI test stages the executable, selected core, frontend API, renderer,
modules, shaders, application/plugin data and FFmpeg helper under a retained
`app-runtime-*` directory in the native output tree. Each core starts in a fresh
process with its own saved profile and white color-source scene. The test checks
startup, a mapped normal main window, the staged library and module paths in
the process map, restored source, screenshot, normal window-close shutdown and
persisted scene. Logs, process maps and screenshots remain in that runtime.
Both C and Rust cores pass these checks locally; both screenshots show the
restored white preview. The combined run also validates four H.264/AAC files
(MP4 and Matroska for each core). This is runtime evidence, not a controlled
build-performance comparison.
The isolated test clears desktop-session Qt plugin paths and themes so a host
desktop built with another Qt installation cannot override the linked Qt's
platform plugins. It retains the linked Qt's default plugin discovery and uses
Fusion styling. System native dependencies remain installed on the host; this
development layout does not establish portable release packaging. Hardware
capture, browser/websocket features, remaining modules/platforms,
full test tiers and controlled performance measurements are still required.
Add `OBS_BUILD_APP_RECORD=1` alongside `OBS_BUILD_APP_GUI=1` to exercise the
frontend's real recording path. Its private profile selects x264/AAC and
Matroska at 640x360/30fps; `--startrecording` starts the frontend output. The
probe requires the recording-start log, records for three seconds and closes
the window normally. ffprobe must decode at least sixty video frames and find
H.264, stereo AAC at 48kHz and the expected dimensions/duration. FFmpeg decodes
the first video frame and checks that it contains the restored white scene.
The finalized recording and ffprobe JSON remain under the retained runtime.
Both cores pass locally: each file has 98 decoded H.264 frames, 48kHz stereo AAC
and a 3.366-second container duration. Both screenshots show recording active
with the white preview. The private headless session's desktop portal backend
does not remain healthy; these checks establish no screen/camera portal capture.
## Linux NVENC checkpoint
`plugins::build_nvenc_pair` compiles common NVENC objects once, then links the C
CUDA loader and Rust CUDA loader variants separately. The latter accepts the
outer Cargo build's `obs-nvenc-plugin` archive and hides its Rust symbols. The
capability helper is a separate C++17 executable with thread/dynamic-loader
linkage. FFnvcodec headers must be version 12 or newer. The FFmpeg compatibility
encoder IDs remain independently configurable.
Build `soldr cargo build -p obs-nvenc-plugin --release` and set
`OBS_BUILD_NVENC=1` on the native integration test. This opt-in check requires
a working NVIDIA driver/GPU: the helper must report support, and both plugin
variants must load and register their H.264 encoders against their corresponding
core. `OBS_BUILD_NVENC_RUST_ARCHIVE` overrides the default archive location;
`OBS_BUILD_NVENC_REFERENCE` optionally compares all exports to a CMake module.
The local comparison finds exactly eight exports in all three modules.
`OBS_BUILD_DISABLE_NVENC_FFMPEG_IDS=1` disables the compatibility IDs.
Add `OBS_BUILD_NVENC_ENCODE=1` with recording mode to exercise the soft-frame
hardware encoder and therefore the actual CUDA driver loader. This uses 640x360
because NVENC rejects the tiny 64x64 software probe. Both variants produce
validated H.264/AAC MP4 and Matroska files locally. Source cleanup explicitly
removes public sources from their canvas, releases owned references and drains
the destruction queue before shutdown, matching the frontend sequence.
Nix verification provides the installed driver libraries through
`LD_LIBRARY_PATH=/run/opengl-driver/lib`. This checkpoint covers native module
loading and soft-frame H.264 encoding. OpenGL texture interoperability,
HEVC/AV1 encoding and other platforms still
need validation.
## Linux staged GUI NVENC checkpoint
Combining `OBS_BUILD_NVENC=1`, `OBS_BUILD_APP_GUI=1` and
`OBS_BUILD_APP_RECORD=1` now stages fifteen modules and the NVENC capability
helper. Explicit runtime variants select the C loader with the C core and the
Rust loader with the Rust core. The core's bundled-module whitelist includes
NVENC when this option is requested.
The private frontend profile selects NVENC. In addition to the existing GUI
checks, the test requires the staged NVENC module in the process map and the
actual recording encoder's NVENC settings log. Both variants pass locally,
producing 99/100 decoded H.264 frames at 640x360 with AAC audio and white images;
screenshots show recording active and both apps shut down normally. On the
isolated Mesa display, NVENC reports its expected fallback to frame upload.
This demonstrates frontend hardware encoding through both loaders; it does
not establish direct NVIDIA OpenGL texture interop.
## Linux Lua/Python scripting checkpoint
`scripting::build` compiles the original shared scripting unity groups and
C++ string cache. Lua and Python remain independent options, and a supplied
frontend API enables the original frontend scripting groups. SWIG 4 or newer
generates separate language runtimes and wrappers; `OBS_SWIG` selects the host
tool. The build tracks SWIG environment/input trees, writes generated sources
and headers only when their contents change, and explicitly compiles them.
Bindings are placed under a retained runtime root with a configurable relative
module directory (default `lib64/obs-scripting`). The scripting library uses
executable-relative discovery. Artifacts identify the enabled Lua module,
Python extension and Python wrapper explicitly; disabled-language files from
an earlier build are not an installation manifest. Release packaging must use
the selected artifacts.
Enable the opt-in check with `OBS_BUILD_SCRIPTING=1`. It builds a native probe
against the unchanged scripting API, then runs it with each core from an
unrelated working directory and private module configuration. Real Lua and
Python scripts exercise defaults, update, properties, save, reload and unload
callbacks. Process maps must contain the intended core and generated binding,
and the supported-language list must match the build options. Logs remain in
`script-scenarios/` under the native output directory.
`OBS_BUILD_SCRIPTING_FRONTEND=1` enables frontend bindings and verifies their
default callable behavior; the disabled mode checks that they are absent.
`OBS_BUILD_DISABLE_LUA=1` and `OBS_BUILD_DISABLE_PYTHON=1` select the independent
language cases. Local checks pass both languages with and without frontend
bindings, Lua-only with a relative native output path, and Python-only with
frontend bindings, against both cores. The environment uses SWIG 4.4.1,
LuaJIT and Python 3.13 development packages discovered through pkg-config.
The shared-library check remains separate from the frontend Tools application
check below. Other platforms and release packaging still require conversion
and validation.
## Linux frontend Tools and saved GUI scripts
`plugins::build_frontend_tools` compiles the original scene-switcher,
output-timer and optional scripting groups, their Linux/POSIX host sources,
shared Qt widgets, generated forms and moc units. Supplying scripting artifacts
enables the matching Lua/Python UI definitions and shared-library dependency.
The graph reuses the application's shared Qt interface inventory.
Set `OBS_BUILD_FRONTEND_TOOLS=1` with `OBS_BUILD_APP_GUI=1` to stage the plugin
and enabled scripting artifacts in each private runtime. Saved Lua/Python
scripts are restored from the scene collection. The app test checks their
load/update/save/unload callbacks and persisted settings, as well as the
actual staged scripting libraries in the process map. It copies only the
selected language artifacts, excluding stale disabled-language output.
A test-only Qt module opens Automatic Scene Switcher, Output Timer and Scripts,
checks the saved script count and each script's description/Seed property,
captures each dialog and closes it. Inspection
runs inside Qt's event loop, including Scene Switcher's nested modal loop.
The probe is part of the development test runtime and is not a release plugin.
`OBS_BUILD_DISABLE_SCRIPTING=1` exercises Tools without the scripting library.
Combine `OBS_BUILD_APP_RECORD=1` to retain the actual frontend recording checks.
Local dual-language and scripting-disabled app checks pass against both cores,
including real frontend H.264/AAC recording and the four native API recordings.
The combined Tools, Lua/Python and NVENC configuration also passes against
both cores, with the selected C/Rust NVENC loaders and helper staged together.
All six dual-language dialog screenshots and the recording main window were
visually inspected. The disabled case requires the Scripts action to be absent.
Both configurations can print one outstanding allocation during shutdown in
this headless desktop session. An allocation tracker identifies the original
portal sleep-inhibitor object (`portal_inhibit_info_create`); a diagnostic
nonblocking GLib main-context drain releases its pending callback and changes
`bnum_allocs()` from one to zero. The diagnostic is external to the production
build and app probe. This checkpoint establishes normal app exit and scripting
cleanup, not a zero-allocation shutdown log or portal capture support.
Windows/macOS Tools, remaining modules, full application/capture coverage and
release packaging are still required.
## Linux websocket server and protocol checks
`plugins::build_websocket` compiles the pinned original obs-websocket 5.7.5
server, its 52 C++ sources, generated moc/UI inputs and resources. Dependencies
include Qt Widgets/Svg/Network, Asio, nlohmann-json, websocketpp and qrcodegencpp.
Header/library overrides support dependencies outside the system prefixes.
The submodule source and pin are unchanged.
Enable `OBS_BUILD_WEBSOCKET=1` with `OBS_BUILD_APP_GUI=1`. The staged application
loads the server with each core, rejects a wrong password, authenticates a real
client and exercises scenes, inputs, settings, events, batches, errors and a
decoded white source screenshot. With `OBS_BUILD_APP_RECORD=1`, the wire client
starts recording after those checks; the retained H.264/AAC recording is then
decoded and checked. A Qt probe opens Server Settings and Connect Info, checks
that the QR image contains dark and light pixels, and captures both dialogs.
`OBS_BUILD_DISABLE_WEBSOCKET_UNITY=1` compiles the 52 separate C++ sources.
Both modes pass the GUI, wire and recording checks against both cores. Their
11 public `obs_module*` entry points agree; incidental exported C++ template
symbols differ. The core has a separate typed unity option, described below.
The existing `test/websocket-tier4` suite also passes against both staged cores:
193/193 checks and 147/147 documented request types. The external fixture
adapter aliases its private `obs-studio` configuration directory to the renamed
product's `obs-studio-rust` directory; protocol assertions remain unchanged.
The combined websocket, Tools, Lua/Python and NVENC application passes with
17 production modules plus the test-only Qt probe. Settings/Connect Info
screenshots from both cores were visually inspected.
These are functional checks, not controlled build-speed measurements. Browser,
remaining plugins, real capture profiles, Windows/macOS native graphs,
production packaging and configurable unity/PCH across the remaining graph
remain required.
## Shared source inventory and Linux Tier 2
`rust/tools/ported_sources.py` reads `libobs/build/source-sets.d/` and expands
the selected unity groups for Tier 2's native-object exclusion checks. CMake
and Cargo share the optional HEVC group in that manifest. The reader matches
the actual CMake inventory exactly: 46 Linux objects with HEVC and 45 without.
The existing minimum inventory size and Ninja graph checks remain in force.
The local validation image includes pinned uv and checks offline system-Python
startup while building the image, matching the repository's Python policy.
This fixes the CI reader that found only one object after the source lists
moved out of CMake. Linux Tier 2 CI passes on `ca331a93d`; local source parity
and HEVC on/off lifecycle/symbol checks also pass (1766/1762 exports
respectively, identical between cores).
## Individual libobs source compilation
`libobs::Options::unity` defaults to true, preserving the selected explicit
groups. Set it to false to compile each implementation separately. The native
engine expands C/C++ BUILD.md groups into generated one-member translation
units, preserving their group headers and keeping the source tree unchanged.
Ordinary and explicitly generated sources retain their original paths.
Wrappers are rewritten only when their contents change. Cargo rerun metadata
tracks the groups, their headers and their implementation members; compiler
includes retain direct dependency on the original contents.
The expander rejects conditional or otherwise unsupported group directives
instead of flattening them into a different source selection. It also rejects
duplicate members and includes outside the source root. Objective-C groups
still require platform implementation.
`OBS_BUILD_DISABLE_CORE_UNITY=1` selects this mode in the native integration
driver. Local checks pass lifecycle/export parity with HEVC on and off against
both cores. With HEVC enabled, all 1766 exports match the retained unity-built
core exactly, and 51 existing C test executables pass against each core with
loader resolution verified. The browser-disabled GUI, websocket wire checks,
white preview/screenshot and real frontend/API recordings also pass against
both cores. These C executables were built by CMake; their build migration is
still required. The direct native fixture also verifies member/header edits
change the loaded result; that is compiler invalidation evidence, not a full
Cargo scheduling experiment.
This establishes the core option. Other targets still need to expose it
consistently, and optional compiled PCH and controlled performance comparisons
remain outstanding.
The subsequent stock-container CI run exposed a separate missing-uv dependency:
unlike the local Docker image, both Tier 2 jobs start from stock Ubuntu. The
existing build and test jobs now provision the same pinned uv before invoking
validation. No workflow files or jobs were added; remote verification remains
required for subsequent conversion commits. This provisioning fix passes the
build and both test modes on `ca331a93d`.
## Building the C tests through Cargo
Native graph parity notes live in [one file per slice](native-graph/), sorted by PR number.
Add future slice notes there instead of appending shared prose here. Registration contracts
live in `rust/obs-build/tests/native/registration/`, included as modules of the existing
Application category binary; keep each slice in its own file and sort module declarations.
The current shared inventory is `test/cmocka/build/test-graph.json`, consumed by
both `validation::build_c_tests` and `test/cmocka/native-test-graph.cmake`. The
independent Linux manifest described in the initial results below was retired
in #1805. The graph remains a subset of the repository's native tests; target and test
selection depends on the evaluated platform and feature requirements. Cargo
compilation of the full selected test graph currently runs on Linux.
The scene bounds placement characterization also uses the shared core graph.
Both consumers compile its original C test and two private C helper sources,
retaining libobs/cmocka linkage and non-MSVC libm. All 16 alignment, crop, flip
and rounding cases run without a display; the separate CMake Rust-static-symbol
check is preserved. The private helper header is tracked as a build input. This
closes one inventory gap, not complete scene or application parity (#3702, #1390).
The unchanged texture-creator mipmap data test also uses the shared core
inventory. It retains all four 2D/cube render-target, non-power-of-two and
unchanged-data cases, with unconditional libobs/cmocka linkage and no display
wrapper. Its fake device records calls through real exported graphics APIs;
this scoped coverage does not establish complete graphics or application parity
(#3692, #1390).
Targets may specify `"cpp_standard": "17"` or `"cpp_standard": "20"`.
The typed native model passes the requested ISO mode to `cc::Build` only for
C++/Objective-C++ compilation. The CMake consumer requires the same standard
and disables C++ extensions, matching the OBS compiler configuration. Omitting
the field retains the existing compiler settings; invalid values fail graph
configuration. A mixed C/C++20 executable contract compiles and runs through
both consumers and checks that C compilation retains its own language mode.
The Qt-free disk-space monitor, scene-collection migration, crash-sentinel
directory, settings migration, output-start logging and unclean-launch tests
now use this model with their original C++17 sources, includes and library
links. Their indirect frontend utility headers are tracked as build inputs.
Existing C/C++ test sources and public headers remain unchanged.
The unchanged Qt-free product-name and volume-meter snapshot tests also use
this shared inventory. The product-name target retains its frontend utility
include path and cmocka dependency; the C++17 meter target retains its conditional
thread dependency. A focused contract builds and runs both original test sources
through Cargo and the canonical CMake consumer. Their header inputs participate
in native build invalidation. This closes two inventory gaps in #1390; it does
not establish complete application or platform parity.
The Qt-free frontend stream-service selection, saved-transition lookup, recording
space decisions, multitrack ladder and encoder override tests also use the shared
graph. The standalone caption round-trip suite also uses the shared graph,
retaining its vendored libcaption and cmocka dependencies without needing libobs.
The display-free XComposite presence and search-backoff decision suites retain
unconditional cmocka linkage, helper-header tracking and 30-second timeouts.
`canonical_caption_and_frontend_utility_tests_run_unchanged` compiles and runs
all eight original C tests through both the Cargo and CMake consumers and compares
the evaluated CTest inventory. Native macOS and Windows Rust lanes run this contract
alongside the existing remux contract; it proves these standalone helpers, not
full frontend/application parity (#1390).
The QtCore-only frontend API dispatch test is also in the shared Qt suite.
Its unchanged four cases exercise worker-thread profile creation/removal,
immediate UI-thread calls and nonblocking libobs-thread calls. The graph keeps
its 60-second CTest timeout, QtCore runtime setup and indirect helper-header
input. Core-only selection does not require Widgets. The native Qt contract
runs it through Cargo and CMake and compares the evaluated CTest inventory;
this helper coverage does not establish full frontend or protocol parity (#1390).
The Qt hotkey Backtab test also uses this graph, preserving its original Qt
Widgets and Qt Test requirements, frontend helper/header inputs and Qt runtime
setup. The existing native Qt contract builds and runs all eight unchanged
key/focus cases through Cargo and CMake and checks the evaluated CTest inventory.
Without Qt Test, this target remains excluded even when Widgets is available.
The published Windows and macOS SDKs omit Qt Test. In that configuration
the native contract retains remux/API coverage and verifies Backtab exclusion;
a Qt Test development package enables the unchanged eight cases (exercised
locally on Linux).
This standalone compatibility check does not prove full frontend parity (#1390).
The Linux-only Qt undo-stack test is also registered in the shared Qt graph.
Its two unchanged cases compile the real undo-stack implementation with the
existing stub headers and generated Qt metaobject. Both Cargo and CMake retain
the original Linux/Widgets guard, stub include precedence, Qt runtime setup and
120-second timeout. The Qt contract runs it on Linux and compares the evaluated
CTest inventory; other hosts exclude it, preserving the original offscreen
plugin limitation. This helper coverage does not establish full frontend parity
(#1390).
The Linux-only Qt hotkey mnemonic capture test also uses the shared graph.
Its five unchanged cases exercise Alt+C, Alt+O, Ctrl+W, normal-field mnemonics
and Tab focus through both Cargo and CMake. Selection retains the original
Linux/Widgets/Qt Test guard, helper-header input and Qt runtime setup. The
wall-clock fixture takes the `timing` resource lock. Hosts without Qt Test
exclude this target; this helper coverage does not establish full frontend
parity (#1390).
The Linux QtCore volume-meter ticker test is also in the shared Qt graph. Its
nine unchanged settling, repaint and cross-thread wake cases build and run
through Cargo and CMake, retaining the frontend header input, conditional thread
linkage and QtCore runtime setup. Core-only selection includes it on Linux;
other hosts exclude it. The original wall-clock fixture holds the `timing`
resource lock. This standalone helper coverage does not establish full frontend
or application parity (#1390).
The settings audio-track row test also uses the shared Qt graph. Its three
unchanged cases generate the real settings UI and verify streaming, advanced
recording and simple recording layouts at three window heights. Both consumers
retain Widgets selection, stub include precedence, Qt runtime setup and the
120-second timeout. The native Qt contract runs the cases through Cargo and
CMake and checks the evaluated CTest inventory. This standalone UI layout
coverage does not establish full frontend or application parity (#1390).
The Linux-only replay-buffer memory-estimate test also uses the shared Qt graph.
Its four unchanged cases check warning colours above the limit, clearing the
warning below the limit or for an unknown estimate, and normal estimates. The
native Qt contract builds and runs the real helper through Cargo and CMake,
retaining the original Linux/Widgets guard, offscreen execution and Qt runtime
setup. Other hosts exclude it; evaluated inventory checks cover that boundary.
This standalone helper coverage does not establish full frontend parity (#1390).
The top-level window-close helper also uses the shared Qt graph. Both Cargo
and CMake run all five unchanged cases for never-shown, shown and handle-free
windows, including refused closes. The graph retains Widgets selection on all
hosts, explicit C++17 compilation, the 120-second timeout and QtCore runtime
setup, and tracks the indirect
helper header. The evaluated inventory is compared by the existing native Qt
contract. This closes one coverage gap, not full frontend parity (#1390).
### Initial native test migration (historical)
`validation::build_c_tests` builds the 51 previously selected, unchanged C test
executables through the native engine, using an explicit source/dependency
inventory in `rust/obs-build/manifests/c-tests-linux.json`. It invokes no CMake.
Private implementation files get generated C translation units; test bodies
and public headers remain unchanged. Caption, happy-eyeballs, MbedTLS and
other target dependencies are explicit. Header-only fixture dependencies stay
header-only, including the fake PulseAudio test.
`OBS_BUILD_C_TESTS=1` enables the build and execution checks in the native
integration driver. Each binary runs against both cores from a private working
directory and HOME. Loader resolution must identify the selected core;
stdout/stderr and JSON results are retained. A 60-second limit applies to each
process.
Per-target sanitizers default on for the same four cases selected by the
original CMake configuration. The central platform helper suppresses them if
global compiler flags already select a sanitizer. The two address/undefined
cases retain their frame-pointer and no-recovery options. ELF checks confirm
the expected ASan/UBSan runtime dependencies. Set
`OBS_BUILD_DISABLE_C_TEST_SANITIZERS=1` to select the disabled option.
Local results: 51 compiled executables and 102 successful runs with HEVC and
per-target sanitizers enabled; 50 executables and 100 successful runs with
HEVC/sanitizers disabled and individual-source libobs compilation enabled.
The disabled HEVC target is excluded and disabled sanitizer runtimes are
absent from the selected executable dependencies. This is the selected
51-test inventory, not the repository's complete C test graph; the remaining
targets and their platform/feature conditions still require conversion.
PR CI on `ca331a93d` completed successfully, including the repaired Linux
Tier 2 build and both C/Rust test modes. Run `39078605291` on `4369949a7`
also completed successfully after the VLC and native-test builder changes,
including both Linux test modes and the selected Windows/macOS checks.
These jobs do not automatically exercise the opt-in native application driver.
## Linux VLC media source
`SourceModule::Vlc` builds the original VLC core and POSIX host groups.
It discovers headers through pkg-config, `OBS_VLC_INCLUDE_DIR`, `VLC_PATH`
or standard include directories. Header discovery adds no libVLC link edge:
the original plugin still loads the optional runtime dynamically. The native
check inspects the ELF dependency list to enforce that distinction.
Set `OBS_BUILD_VLC=1` with the staged GUI and websocket checks. The real app
creates a VLC playlist source, decodes a six-second local H.264 clip, returns
a white source screenshot, reports its duration and handles pause/play/restart.
Normal shutdown saves the playlist path in the scene collection. Process maps
must contain the staged plugin and dynamically loaded libVLC.
Both cores pass those checks, frontend recording and the four API recordings.
The combined VLC, Tools, Lua/Python, websocket and NVENC application also passes
with individual-source libobs compilation: 18 production modules plus the
test-only Qt probe. That run uses an explicit include directory with libVLC's
pkg-config lookup disabled, exercising header discovery independently.
`OBS_BUILD_VLC_ABSENT=1` selects the runtime-absence check. In an environment
without libVLC, both cores log that the source is disabled, leave `vlc_source`
unregistered, retain the loaded plugin and exit normally. Process maps must
confirm the runtime is absent; a discovered system installation fails this
fixture rather than weakening the check. This does not establish packaging
of VLC, every codec/playlist mode or actual audio-device output.
### Unchanged VLC compatibility tests through Cargo
`validation::build_vlc_tests` builds all six original Linux VLC cmocka
executables: drain gate, host path, channel order, audio tracks, audio pacing
and playlist gaps. The pacing executable retains its FFmpeg dependencies.
The C sources and their assertions are unchanged. Select the lane with
`OBS_BUILD_VLC=1 OBS_BUILD_VLC_C_TESTS=1` and provide the real libVLC runtime.
It does not require the staged GUI or websocket lane.
The integration driver runs every executable against each core, checks the
selected library with `ldd`, stages the original effects, and isolates each
working directory and temporary/configuration/data/cache directory. It retains
the original 60/120-second limits and rejects skipped tests, including exit 77.
It clears inherited cmocka filters and forces standard output formatting so
external settings cannot silently select fewer cases or hide skipped cases.
Paths are canonicalized before changing the child working directory, including
when `OBS_BUILD_TEST_OUTPUT` is relative. Results and raw logs are retained
under the output directory in `vlc-c-tests.json` and `vlc-c-test-runs/`.
RED `a616f3c57` fails at the missing native test builder. The implemented graph
passes all twelve executions (50 cmocka cases) without skips using libVLC
3.0.23. The combined core/module/render and four MP4/MKV recording validation
took 188.79 seconds. This is runtime compatibility evidence, not a build-speed
benchmark. A local pass does not resolve the playlist audio-integrity failure
seen in prior-head PR CI and tracked by #838.
### Graphics-dependent unchanged C tests
`OBS_BUILD_GRAPHICS_C_TESTS=1` adds the original
`test_group_hide_transition_audio` executable to the Cargo graph. It retains
the original core/caption/cmocka/math dependencies, graphics-module definition,
effects and 120-second timeout. RED `60beca399` fails at the missing builder.
The implemented lane passes all four cases against each core (eight total),
with no skips, in a 40.15-second core/module/render invocation. The native
compiler cache reports 62 hits and two misses for that invocation. This is not
a controlled build benchmark.
The VLC and graphics lanes share the same runner for canonical paths, core
selection, isolated directories, cmocka environment, skip rejection and logs.
The graphics lane writes `graphics-c-tests.json` and
`graphics-c-test-runs/` under the selected output directory.
The combined graphics/VLC run passes all fourteen executable/core combinations
(58 cmocka cases), without skips, plus the lifecycle/render checks and four
validated MP4/MKV recordings. It took 222.04 seconds including runtime checks;
soldr reports 112 cache hits and zero misses. Formatting, all-target/all-feature
Clippy and the primary review pass. This validates the shared runner extraction.
The prior-head CI run `39091137249` fails this executable against the Rust
core: all four cases report no program audio at line 216. Its log shows audio
buffering growing from zero to the 960 ms maximum before the failures. The
C-core Linux lane and Windows/macOS Tier 2 lanes pass. The local pass above
does not resolve that failure.
An isolated diagnostic of the original `add_audio_buffering` function found
that a positive delay below one sample rounds to zero frames/ticks, leaving
`new_ts.end` uninitialized before copying it to the caller. With GCC's pattern
initialization enabled, verbatim function extraction reproduces invalid
intervals for 1, 10000 and 20833 ns delays at 48 kHz. A second probe directly
includes the original source, uses the real headers and links the native core
with no dependency stubs; it reproduces all three invalid intervals and the
valid one-frame case. A scratch copy with the local interval initialized from
the incoming interval corrects all diagnostic cases while retaining the
one-frame case, with the same real headers/core and compiler flags. This
establishes a function-level defect, not causation of the full CI failure.
No production audio source or existing C test is changed at this checkpoint.
Reproduction source and results are retained in the local reports
directory under `audio-buffering-probe/` for follow-up.
### Audio interval regression and scoped fix
Draft [#1385](https://github.com/obs-rust/obs-studio/pull/1385) carries the
follow-up to that diagnostic, and this branch carries the same change.
RED `a720d011f` adds a new C regression that directly includes the original
private audio implementation. Two of its five cases fail in each linked-core
mode: empty and pending buffers with a sub-sample delay. The positive one/two
tick and full-buffer controls pass. GREEN `52c577638` initializes the local
interval from the incoming interval; all five cases then pass in both modes.
Existing C tests and public headers remain unchanged. The CMake fragment
configures, builds and passes CTest locally with real imported core/caption
artifacts and headers, without dependency stubs.
The Cargo test manifest adds the same regression. RED `d6388ca86` requires the
missing executable and observes 51 instead of 52. The manifest supports
compiler-checked optional flags and explicit linker options, preserving the
test's optional pattern initialization and section garbage collection.
The core battery now has 52 executables (51 with HEVC disabled). A full enabled
run passes all 104 executable/core combinations, with 832 reported cmocka cases
and no skip markers; the two standalone video-statistics executables do not
emit cmocka summaries. The new regression contributes five cases per mode.
This direct-include regression checks the original C algorithm even when it
links the Rust core. It does not establish a Rust replacement for that helper,
nor that the entire intermittent CI failure in #838 is resolved. The unchanged
runtime tests and full CI remain necessary.
With the source fix, the combined core battery, unchanged group-audio test and
browser-enabled OBS GUI pass against both cores. The app verifies actual
browser pixels/JavaScript, websocket behavior, saved configuration, frontend
H.264/AAC recording, rendering and clean OBS shutdown; the API fixture verifies
four additional MP4/MKV recordings. Runtime directories are
`app-runtime-VCOfty` and `app-runtime-BwMSdi`. The whole invocation takes
489.49 seconds, with 164 compiler-cache hits and 165 misses; it includes native
compilation and runtime tests and is not a controlled build benchmark.
A subsequent run of all six unchanged VLC executables against both fixed cores
passes all 50 cases without skips: 180.83 seconds including runtime checks,
52 cache hits and eight misses. Formatting, Clippy and primary review pass.
The prior parent-head CI run `39092443140` (`b547ea121`) fails the unchanged
recording-shutdown wait test in mode OFF (one failing executable out of 296,
lines 121/142, tracked by #1283); three PulseAudio tests are skipped in that CI
environment. This audio interval fix does not claim to fix that separate wait
race or to explain all intermittent audio failures.
The separate fix PR CI run `39093013032` also finishes with a failed gate:
mode ON passes, while mode OFF fails the same two recording-shutdown wait
cases at lines 121/142 (one executable out of 299). The interval regression
passes. This is not a green CI result and no retry was used to hide it.
## Optional compiled PCH for Linux cores
`libobs::Options::pch` defaults to false and is independent of `unity`.
Set `OBS_BUILD_PCH=1` in the native integration driver to compile the explicit
group headers with GCC or Clang on Linux. This currently covers libobs;
other targets and Windows/macOS PCH remain required work.
The native engine accepts explicit `PrecompiledHeader` source assignments.
It compiles each header through the same `cc::Tool` and flags as its consumers,
keeping C and C++ settings separate. Artifact directories distinguish host,
target, header path, language, compiler command and environment. Compiler
invocations retain the soldr wrapper. GCC rejects invalid PCH and uses an error
header to detect fallback; Clang consumes an explicit PCH artifact. Requested
PCH therefore cannot silently fall back to parsing a normal header.
Compilation batches preserve source order, including interleaved assignments
to different headers. A regression fixture caught constructor order changing
from 123 to 213 when assignments were initially sorted; ordered batches pass
with unity enabled and disabled. Mixed C/C++ fixtures also verify direct and
transitive header edits and language-specific flag changes affect the loaded
result. GCC 15.2.0 passes
all nine native contracts; Clang 21.1.8 passes both PCH contracts.
The real Clang core pair with unity and PCH enabled also passes the lifecycle,
public data, module registration and exact C/Rust export comparisons. The
Clang run does not include the C-test executable or GUI matrices.
The real GCC core pair passes export/lifecycle checks and all 102 selected
C-test runs with PCH enabled, with unity enabled and disabled. PCH artifacts
are currently requested on every direct native build; repeated invocations
depend on compiler-cache behavior. These checks establish correctness for the
tested configurations, not a speedup or complete Cargo invalidation coverage.
The combined browser-disabled Linux GUI passes against both individual-source,
PCH-built cores with VLC, frontend Tools, Lua/Python, websocket and NVENC enabled.
It exercises the saved white scene, VLC playback controls, dialog and wire
checks, frontend hardware recordings and four API recordings, then normal
shutdown. The complete build/validation invocation took 571.94 seconds; this
includes native compilation and runtime checks and is not a build benchmark.
### Scoped core build measurements
Corrected local GCC measurements explicitly set `NUM_JOBS=4` for the standalone
native integration process and `CARGO_BUILD_JOBS=4`. The active process
environment was inspected: both values were 4 and no Cargo jobserver was
inherited. The earlier wrapper only set Cargo's limit, so its claim of four
native jobs is withdrawn; its original observations are retained separately.
The corrected matrix uses fixed opt-level 2 with debug information, one fresh
output directory per mode and three repeated builds. The interval covers the
C/Rust core pair and caption, excluding plugin builds, GUI checks and Cargo
startup. The host and compiler cache were shared; no cache was reset. Fresh
output is therefore not a cold-cache measurement. Trials ran in table order.
The integration driver writes `core-build-timing.json` under
`OBS_BUILD_TEST_OUTPUT`; repeat that invocation with the same directory for
additional samples.
| Unity | Compiled PCH | Fresh output | Repeat median | Repeat range |
| --- | --- | ---: | ---: | ---: |
| On | Off | 12.60 s | 2.55 s | 2.50–2.94 s |
| On | On | 38.39 s | 5.72 s | 4.70–8.67 s |
| Off | Off | 26.38 s | 5.82 s | 5.30–6.34 s |
| Off | On | 44.18 s | 9.83 s | 9.07–11.65 s |
All twelve repeat invocations reported zero compiler-cache misses. Cache
summaries cover the whole integration invocation, not just the timed core pair.
These results support unity on / PCH off as the default for this measured core
case. PCH preparation and per-header compilation batches still need performance
work. This does not establish full application build time, clean-cache
performance, a CMake comparison or Cargo no-op behavior.
### Audit of duplicate PCH generation
At the user's request, the GCC Linux core-pair build was audited with temporary
request tracing and forwarding C/C++ compiler wrappers. Both audited invocations
passed the real core integration test. The first invocation used the audit
wrappers' compiler identity; the next reused the same artifacts and flags.
| Invocation | PCH requests | Distinct PCH artifacts | Compiler executions |
| --- | ---: | ---: | ---: |
| Initial audited build | 18 | 14 | 14 |
| Warm repeat | 18 | 14 | 0 |
Some headers recur in nonadjacent source batches and across the common/C/Rust
variant stages. There are four redundant compiler-cache requests per core-pair
build, but the trace did not find duplicate compiler generation: each initial
artifact was compiled once, and soldr served every warm request from cache
(the whole warm invocation reported 64 hits and zero misses).
The PCH path signature selects an artifact namespace; it is not a freshness
check. Generation must not be skipped merely because that file exists: direct
headers, transitive headers, flags and compiler identity still require correct
dependency validation. An optimization can deduplicate requests within an
immutable build invocation while preserving source/constructor order. Persistent
reuse needs a separate validity check. Temporary tracing was removed after the
audit. The earlier PCH timings describe this implementation, including cache
request and batch overhead; they do not establish an intrinsic PCH speed limit.
## Bundled obs-sys configuration and Cargo scheduling
The `bundled` feature exposes the core build modes through environment variables:
Bundled native optimization and debug symbols follow Cargo's effective
`OPT_LEVEL` (`0`, `1`, `2`, `3`, `s`, `z`) and `DEBUG` (`true` or `false`),
including custom profiles. Cargo's `PROFILE` name is not used. Set
`OBS_SYS_NATIVE_PROFILE` to `debug`, `release`, `relwithdebinfo` or `minsizerel`
to select the corresponding standalone native policy explicitly.
Native assertions default on at optimization level `0` and off otherwise.
`OBS_SYS_NATIVE_ASSERTIONS=0|1` overrides this independently of debug symbols
and named native profiles. This is a native policy: Cargo does not expose a
reliable target debug-assertion setting to build scripts, so custom Rust
assertion settings are not discovered. Swift receives the same native
assertion policy explicitly. All four configuration inputs are tracked for
Cargo rebuilds; invalid values fail before compilation.
| Variable | Values | Default |
| --- | --- | --- |
| `OBS_SYS_UNITY` | `0` or `1` | `1` |
| `OBS_SYS_PCH` | `0` or `1` | `0` |
The options are independent. Empty, non-text or other values fail configuration
before native compilation. PCH currently requires Linux GCC or Clang, as above.
With the native dependencies installed, for example:
```sh
OBS_SYS_UNITY=0 OBS_SYS_PCH=1 soldr cargo test -p obs-studio-rust --features bundled-native --test obs-tests-app
```
The build script tracks both variables and passes them to the shared libobs
builder. Four bundled contracts cover parsing/validation, requested versus
compiled settings, the public API version and native startup/shutdown. Tests
read the inherited environment without mutating process-global settings.
A local fifteen-invocation Cargo experiment used a separate target directory,
four compilation jobs and the shared host/compiler cache. All four mode
combinations passed. Changing either option made Cargo mark `obs-sys` dirty
for that variable. An invalid PCH value failed the build script before changing
the native library. Five no-change invocations reported the package fresh and
kept the native library's nanosecond timestamp unchanged, including PCH modes.
The experiment then made successive temporary edits to three private inputs,
changing one additional file per step with unity and PCH enabled. Each change
made Cargo rerun the build script.
A separate process loaded the resulting library and asserted its changed
public API return value or version string:
| Input | Observable change | Invocation time | Reported cache hits/misses |
| --- | --- | ---: | ---: |
| `libobs/obs.c.h` | API version increment | 14.15 s | 52 / 1 |
| `libobs/build/libobs.pch.h` | Further API version increment | 19.54 s | 47 / 6 |
| `libobs/obsversion.c.in` | Generated version string suffix | 11.07 s | 52 / 1 |
Times and cache summaries cover the whole Cargo/test invocation, not just
native compilation. These are observed incremental cases on a shared host,
not isolated benchmarks. All temporary inputs were restored; a final build
returned the original API values and its subsequent no-change run stayed fresh.
This verifies selected core input scheduling, not every generated frontend,
plugin, SDK or packaging dependency. The full conversion remains incomplete.
PR CI run `39080352730` on `5f04b9f0a` completed successfully after the PCH
checkpoint, including both Linux core test modes and the selected Windows/macOS
lanes. Run `39081209344` on `352bac56d` also completed successfully for the
bundled-mode changes, including both Linux modes and selected Windows/macOS lanes.
## Linux browser build
`plugins::build_browser` builds the pinned `obs-browser` module and its
`obs-browser-page` subprocess helper. It uses the existing CEF SDK's shared
library and wrapper archive; it does not build Chromium. The SDK must provide
`include/`, `Release/`, `Resources/` and the prebuilt CEF wrapper archive.
`BrowserOptions` selects the SDK directory, Qt panels and unity compilation.
The Linux implementation requires CEF >=95, nlohmann_json >=3.11, X11 and libdrm.
The pinned browser source unconditionally includes `QApplication` and uses
`QToolTip`, so Qt Widgets headers and libraries are required even with panels
disabled. That mode omits panel sources and exports. Enabled panels use the
original Qt sources and generated MOCs.
Browser unity compilation uses three explicit, ordered groups to avoid duplicate
Base64 declarations and default arguments in the untouched submodule sources.
Individual compilation uses the same source inventory. The helper has its own
source list and CEF dependencies. `BrowserArtifacts::deploy_runtime` copies the
CEF Release and Resources trees and the helper beside the browser module,
including locales, data packs and auxiliary shared libraries. These SDK resource
directories are Cargo build inputs.
`frontend::build_application_with_options` enables the original custom-browser
dock implementation and generated Qt interfaces through `browser_panels`.
The existing `build_application` entry point retains its default configuration.
For the integration driver, set `OBS_BUILD_BROWSER=1` and `OBS_CEF_ROOT` to the
SDK root. `OBS_BUILD_DISABLE_BROWSER_UNITY=1` selects individual browser
compilation; `OBS_BUILD_DISABLE_BROWSER_PANELS=1` disables the panel interfaces.
The GUI browser tests also require `OBS_BUILD_WEBSOCKET=1` to exercise the
JavaScript bridge through the public source and scene APIs.
The SDK used locally is the Linux x86_64 CEF 7871 archive pinned by
`CMakePresets.json`, with SHA256
`8ffc64d06ea74da613eeda7f2aa5d4e98661af6fa3ed8c68724c9a6e4e89ea8e`.
Its CEF header reports 150.0.19. Host verification supplies installed CEF runtime
dependencies through a private loader path; it does not modify system libraries.
This browser implementation currently targets Linux. Other platforms, production
SDK acquisition, installation and packaged runtime validation remain unfinished.
Browser validation is in progress. The module/helper build contracts pass with
unity and panels independently enabled or disabled, including helper execution,
CEF linkage and panel export selection. The panels-enabled unity and individual
modules each export the same 22 symbols. In the staged GUI, the original custom
dock editor accepts real delegate edits, creates a browser dock, navigates to a
local page and receives its JavaScript-generated readiness title.
During development, the full browser GUI test failed at the browser source's
local-file navigation. The input is active and showing at the requested 128×72 dimensions,
but its screenshots remain transparent. A diagnostic CEF DevTools session finds
the requested `http://absolute/…` target with an `about:blank` page context; an
owned-process trace observes the initial paint but no call to the local-file
scheme handler. Individual compilation reproduces this failure. An additional
diagnostic run caught `CefTask_0_CToCpp called with invalid version -1` during
cold panel initialization. The dependency fix and isolated credential-store
fixture correction below resolve these observed failures in the tested Linux
runtime; this does not establish all-platform or packaged application parity. The new checks
retain their rendering, JavaScript bridge, helper-process and saved-profile
requirements. Existing C tests and public headers remain unchanged.
### Browser startup investigation
A CMake reference build of the original browser module and helper reproduces
the local-file failure inside the same Cargo-built frontend and core. This
rules out browser unity compilation as its cause; it does not establish what
a complete CMake-built application does. Explicitly selecting the global CEF
request context did not fix it and was discarded.
The cold-start API-version abort has a separate focused regression in a sister
`obs-browser` checkout. Linking the real browser objects and queuing a task
before initialization aborts with the original module and safely rejects the
task with the proposed fix. Real module startup followed by immediate unload
also aborts with the original module and exits successfully with the fix.
The dependency draft [obs-browser#1](https://github.com/obs-rust/obs-browser/pull/1)
proposes commit `0c3b700` (the current experimental pin). It waits for context readiness for ordinary tasks,
handles source destruction before readiness, and coordinates unload with
initialization success or failure. A follow-up dependency test at `4f26bda`
now exercises real CEF initialization failure: a second process shares the
first process's locked profile, waits for the actual initialization-failure
message, then unloads cleanly. Both the original and fixed modules pass this
failure-path characterization; it does not distinguish the startup-race fix.
The parent's production pin is now `7bab463` (obs-browser 2.27.3, which includes #1 and `4f26bda`). Browser-source rendering is
verified in the disposable Linux test profile described below.
### Isolated browser credential store
A CEF network trace narrows the blank local source to an unfinished global
persistent-cookie key load in the isolated desktop session. The custom panel's
separate cookie store completes. Selecting Chromium's basic password store
inside a fresh disposable test profile completes the global cookie load and
passes the existing browser source color/JavaScript callback, WebSocket,
recording, saved-scene and shutdown checks. A second runtime-only run with the
basic store and no network tracing also passes. This diagnoses the isolated
credential-service integration; it does not verify normal desktop keyring
integration. No production credential-store option is changed. Full native
Cargo GUI validation now passes against both C and Rust core variants, including
the original dock editor, actual native dock pixels, local source HTML/JavaScript
callback, staged helper subprocesses, saved configuration, recordings and normal
shutdown. The full invocation took 510.62 s and reported 27 cache hits / 199
misses; it used the earlier uncapped native test environment and is not a
controlled build benchmark. A warm repeat with both job limits explicitly set
to 4 passes in 77.56 s, with 226 cache hits and zero misses. Its interval includes
GUI checks and recordings against both cores; it is not a compile-only timing.
## Optional FDK AAC encoder checkpoint
`plugins::build_fdk` builds the original `obs-libfdk` unity group as a dynamically
loaded module through `cc::Build`, discovering the `fdk-aac` SDK through
pkg-config. This optional encoder remains disabled by default, matching the
original CMake option. Set `OBS_BUILD_FDK=1` in the native integration driver to
build, load and exercise it. GUI selection alone does not enable FDK.
The RED commit `a0bc15642` fails at the unimplemented native builder. With the
builder implemented, the integration test passes against both the C and Rust
cores in 24.77 s. Each core records MP4 and MKV with the actual `libfdk_aac`
encoder; ffprobe verifies AAC LC, 48 kHz stereo, decoded audio frames, H.264 video
frames and recording duration. No usable soldr statistics were available for
that invocation, so it does not establish cache performance. The existing
headless path with FDK disabled also passes (12.80 s), using `ffmpeg_aac` for
all four recordings.
A reference build invokes the original `plugins/obs-libfdk/CMakeLists.txt`,
using the same FDK 2.0.3 SDK and Cargo-built core. Both modules export exactly
the same six dynamic symbols. This verifies module exports; it is not a
complete CMake application or a cross-platform runtime comparison. The default
GUI/browser path is checked separately to ensure adding this optional encoder
does not make it mandatory.
## Optional JACK and sndio audio modules
`SourceModule::Jack` and `SourceModule::Sndio` build the original Linux unity
groups as dynamic modules through `cc::Build`, with pkg-config dependencies
`jack` and `sndio`. Both remain disabled by default, including ordinary GUI
runs. Select them independently with `OBS_BUILD_JACK=1` and
`OBS_BUILD_SNDIO=1` in the integration driver. The GUI core-module whitelist
includes each only when explicitly selected. The sndio target retains the
original `-Wno-error=vla` option.
RED `452911b5c` fails at the unimplemented optional audio module graph. With
that graph implemented, both modules load and register their original
`jack_output_capture` and `sndio_output_capture` input IDs against both C and
Rust cores; the existing graphics and four-recording checks also pass (20.52 s).
Reference builds invoke each original CMake target with the same SDKs (JACK
1.9.22 and sndio 1.10.0). Each module exports exactly the same seven symbols as
its Cargo-built counterpart. The JACK reference needs an explicit include path
because its original finder's pkg-config include hint uses the singular name.
No CMake source list was recreated for these reference builds.
### Actual input capture
The new C fixture uses unchanged public OBS headers and real audio clients. It
sends distinct stereo samples (left 0.25, right -0.125) through each original
source, requiring at least three matching packets at the public source audio
capture callback. Event waits are bounded; JACK clients close, the sndio writer
thread joins, callbacks are removed and sources are released before the local
probe state is destroyed. No existing upstream C test or public header changes.
- JACK: start a separately named non-realtime `jackd` dummy server, export its
`JACK_DEFAULT_SERVER`, and set `OBS_BUILD_JACK=1 OBS_BUILD_JACK_CAPTURE=1`.
The fixture connects its writer to the real OBS source's two JACK ports.
- sndio: start an owned `sndiod` with playback/monitor mode (`-m play,mon`) and
a named sub-device, set `OBS_BUILD_SNDIO=1`, and pass its descriptor as
`OBS_BUILD_SNDIO_CAPTURE_DEVICE` (for example `snd,11/capture` for server
unit 11 and sub-device `capture`). The fixture writes through the real sndio
client API and observes the monitor source. Use a clocked audio backend.
- Either capture flag requests the existing graphics probe and initializes
stereo audio; recording is optional. The existing probe still requires an
X11 display and an OpenGL implementation. These are Linux integration tests.
A direct ALSA null backend did not drive sndiod: its watchdog timed out and the
sample test failed. Keeping the assertions intact, the validated fixture routes
sndiod through ALSA's PulseAudio plugin into a private PulseAudio null sink.
No desktop audio service or physical input is used. The combined run passes
against both cores, exercises both input captures in each of the four recording
processes, and validates all recordings (33.67 s, 96 cache hits / zero misses).
That interval includes runtime capture and recordings; it is not a compile-only
benchmark. Capture-only validation with recording disabled also passes against
both cores (15.53 s), exercising both inputs without relying on recording to
initialize audio. Real physical-device routing, platform graphs and packaged audio
runtime remain separate requirements of the full conversion.
Independent JACK-only and sndio-only configurations also pass. The staged
GUI/browser invocation with both optional modules selected passes against both
cores, including native dock/source rendering, JavaScript/WebSocket checks,
recordings, saved configuration and shutdown (102.18 s, 226 cache hits / two
misses). This is a combined build/runtime interval, not a controlled compiler
benchmark or proof of physical-device capture.
## Intel QSV native module
`plugins::build_qsv` builds the original Linux x86_64 QSV C/C++ groups in CMake source
order, using oneVPL >= 2.9, libva and libva-drm. It retains the host-definition
header, language standards, switch warning exception and inline visibility.
`QsvOptions` supports HEVC, unity and compiled PCH independently; its default is
HEVC on, unity on, PCH off. The integration driver selects the target with
`OBS_BUILD_QSV=1`, with `OBS_BUILD_DISABLE_QSV_UNITY` and `OBS_BUILD_QSV_PCH`
controlling its compilation. Its HEVC setting follows `OBS_BUILD_DISABLE_HEVC`.
The full CMake graph enables QSV by default; the integration driver's opt-in is
not a change to that product default.
RED `3f0a49d4f` fails at the missing builder; implementation `5c511b9d2` adds the
native graph and isolated CMake runtime comparison. The initial build/load and
four H.264/AAC recordings pass against both cores (34.56 s). The controlled
reference uses each original QSV CMake target, matching the project's inline
visibility and optimization, against the same SDKs (oneVPL 2.16 and libva 2.23).
The finder needs the pkg-config include root explicitly on this Nix host.
`OBS_BUILD_QSV_REFERENCE` requires exact dynamic exports and compares encoder
registrations after loading that actual reference module with each core in a
fresh process. Reference runs preserve the real graphics/module/lifecycle
checks; their recording is omitted to avoid overwriting the validated clips.
The first unity/PCH-off case passes with seven matching exports and matching
registrations. Both cores and the CMake reference expose no QSV encoders on this
host. This proves graceful loading without a detected implementation; Intel
hardware encoding and texture interoperability remain unverified. The complete option matrix passes, with seven matching exports and four fresh
CMake reference runtime comparisons per row:
| QSV unity | QSV PCH | HEVC | Full invocation | Cache hits / misses |
| --- | --- | --- | ---: | ---: |
| On | Off | On | 25.46 s | 96 / 1 |
| Off | Off | Off | 25.98 s | 97 / 1 |
| On | On | On | 30.56 s | 93 / 8 |
| Off | On | Off | 29.90 s | 91 / 12 |
Each invocation includes both cores, native compilation, real MP4/MKV recordings
and reference runtime checks. These are functional validation intervals with a
shared cache, not controlled PCH performance measurements. Disabled rows also
check the public MP4/MOV codec lists. Compiled PCH remains off by default.
### HEVC-disabled MP4 build regression
The QSV matrix's HEVC-disabled recording case exposed unconditional HEVC calls
in the existing MP4 muxer. Both Cargo and the original CMake output target fail
to link against the disabled core, with unresolved `obs_parse_hevc_header` and
`obs_parse_hevc_packet`. The original CMake reference uses its actual target,
SDK libraries and shared dependencies, and `--no-undefined` to require a valid
module. The failure is not QSV-specific.
RED `0c73e4776` additionally requires MP4/MOV advertised codecs to agree with the
build option. The fix gates the HEVC-only helpers, call sites and recognition
with `ENABLE_HEVC`, and removes HEVC from the disabled outputs' codec lists,
following the existing FLV output pattern. Enabled source bodies remain intact.
The original CMake output target now links successfully with HEVC disabled.
The next disabled recording run exposes one VA-API codec switch case calling
`vaapi_device_hevc_supported` despite that helper's declaration and definition
being conditional. Guarding the case with the same feature macro makes it use
the existing unsupported-codec fallback when disabled. Enabled behavior stays
unchanged. These regressions were found by keeping real recordings in the
HEVC-disabled option matrix.
No public header or existing upstream C test is edited. Full application,
physical Intel hardware, cross-platform and release packaging parity remain
requirements of the complete conversion.
The full staged GUI/browser invocation with global HEVC disabled and QSV
selected passes against both cores (424.83 s, 110 cache hits / 118 misses).
It verifies native dock/source pixels, JavaScript/WebSocket behavior, saved
configuration, frontend recording and normal shutdown. With
`OBS_BUILD_MOV_RECORD=1` (requiring recording/FFmpeg targets), the API fixture
also records and decodes MP4, MKV and MOV against each core. Both MOV artifacts
contain H.264/AAC and the QuickTime `qt ` major brand. Six additional CMake QSV
reference runtime comparisons pass. This interval includes native compilation
and application checks; it is not a compile-only or controlled cache benchmark.
Intel hardware encoding remains unverified.
## Linux WebRTC / WHIP Cargo graph
RED `2923db820` requires the real WebRTC output and service module and fails
at the missing builder. `plugins::build_webrtc` now compiles the original
POSIX and core C++ groups in their original order through `cc::Build`, links
to the selected shared libobs, libdatachannel SDK and libcurl, and retains the
original module data. Unity defaults on and compiled PCH defaults off; both
can be selected independently through `WebRtcOptions`. Its HEVC setting
follows the global option. The integration fixture checks WHIP's advertised
video/audio codecs as well as the output/service registrations.
The explicit `DataChannelSdk` supplies include/library paths and the media
and websocket interface definitions from that SDK's build. Media support is
required and the headers must report libdatachannel >= 0.20, matching the
original dependency requirement. The tested SDK is the shared build of
libdatachannel version 0.24.1 with both interface features enabled. Linux is
implemented; other platforms return an explicit unsupported-graph error.
Static SDK linkage and other SDK feature combinations have not been validated.
Enable the existing opt-in integration driver with `OBS_BUILD_WEBRTC=1`,
`OBS_DATACHANNEL_INCLUDE_DIR` and `OBS_DATACHANNEL_LIBRARY`.
`OBS_DATACHANNEL_DISABLE_WEBSOCKET` describes an SDK built without that feature;
it must match the supplied SDK. `OBS_BUILD_DISABLE_WEBRTC_UNITY` and
`OBS_BUILD_WEBRTC_PCH` select the module's build modes.
The new `tests/libobs/whip_receiver.py` wraps the native test command and
provides a real localhost WHIP receiver using pinned aiortc/aiohttp/numpy.
It authenticates the SDP POST and resource DELETE, negotiates a real peer,
and decodes received media. The native fixture uses the public OBS service,
output and encoder APIs, x264 video and FFmpeg Opus audio; no transport stub
or mocked encoder is involved. Each core sends a rendered 64x64 scene and a
48 kHz stereo 1 kHz tone. The receiver checks decoded pixels, advancing
media timestamps, audio format, tone frequency/RMS, connected state and
resource deletion. The existing four MP4/MKV recording assertions remain.
The wrapper propagates command failures and bounds its owned process group
with a configurable timeout; it does not stop shared services.
The first stream run passes against both cores (20.71 seconds, 96 compiler
cache hits and zero misses). An actual reference module built using the
original `plugins/obs-webrtc/CMakeLists.txt` has the same 26 dynamic exports
as the native module, including seven public OBS module entry points.
Both link dynamically to libobs, libdatachannel and libcurl. The integration
driver compares those exports when `OBS_BUILD_WEBRTC_REFERENCE` is supplied;
`OBS_BUILD_WEBRTC_USE_REFERENCE` explicitly selects that module for a separate
reference runtime run. That flag requires a reference path and never counts
as native-module streaming coverage.
This checkpoint validates H.264/Opus streaming on Linux. Actual HEVC/AV1
streaming, simulcast, external services, Windows/macOS and release packaging
remain required work; codec registration alone does not prove those paths.
The four unity/PCH combinations each pass two native-module WHIP streams and
four MP4/MKV recordings. The separate CMake reference run passes the same
receiver and recording checks against both cores:
| WebRTC unity | WebRTC compiled PCH | Module used at runtime | Native invocation | Cache hits / misses |
| --- | --- | --- | ---: | ---: |
| On | Off | Cargo | 56.62 s | 12 / 84 |
| Off | Off | Cargo | 25.73 s | 94 / 4 |
| On | On | Cargo | 29.10 s | 93 / 4 |
| Off | On | Cargo | 25.17 s | 96 / 4 |
| On | Off | CMake reference | 19.52 s | 95 / 0 |
These are complete native test invocations including runtime/recording checks,
using a shared host/cache in table order. They do not measure isolated compile
time, a cold cache or an intrinsic PCH performance difference. Each native
mode compares its complete export set with the original CMake module before
runtime; the reference row explicitly substitutes that original module.
With global HEVC disabled, a further native-module run passes the advertised
`h264;av1` video/`opus` audio codec checks, two real H.264/Opus streams and four
recordings against both cores (55.70 seconds, 41 cache hits / 54 misses).
This does not exercise actual HEVC or AV1 media. The original WHIP service's
own codec list remains unchanged; it advertises HEVC independently of the
output option, which is existing behavior rather than a newly fixed path.
### Existing standalone WHIP tests
A focused test in the existing opt-in Cargo target `libobs` builds the unchanged
`test_whip_rtp_timestamp.c` and `test_whip_host_os_name.cpp` sources using
`validation::build_webrtc_tests`. RED `a425f96d8` fails at the missing builder;
the implemented graph passes all six RTP-clock cases and both POSIX host-name
cases, with no skips, in 1.27 seconds. These helpers require neither libobs
nor libdatachannel. They run once, not once per core, and do not establish
coverage of a Rust replacement. C and C++ language options are separate,
matching the original test source languages. Each executable has a bounded
60-second runtime; cmocka filters are removed and explicit case totals are
checked. The helper graph currently supports Linux.
```sh
soldr cargo test -p obs-studio-rust --features libobs-integration --test obs-tests-app -- native_libobs::webrtc_tests::original_whip_clock_and_host_tests_pass_without_a_core_or_sdk --exact --nocapture
```
The selected native graph now contains 52 core executables, six VLC tests,
one graphics test and two standalone WHIP tests. It is not the complete OBS
test battery. A static inventory of this worktree's `test/cmocka/tests.d`
finds 238 literal executable declarations before evaluating platform/option
conditions; recent reference CI runs contain 299 configured tests. That
inventory is a gap-finding aid, not an evaluated replacement for CTest.
The consolidated helper test passes all eight cases again in 0.69 seconds,
with one unrelated integration test filtered out. The workspace remains at
its existing cap of 25 Cargo integration binaries; no cap increase is needed.
A broader app/VLC/browser invocation exposed a harness error after 480.98
seconds: it tried to copy its own integration executable only after lengthy
native compilation, and that path no longer existed following concurrent
Cargo rebuilds. All 104 core executable runs had completed before this
failure; no GUI or WHIP-stream pass is claimed from that invocation. The
fixture now snapshots its executable at parent startup, before native builds,
and deploys FFmpeg/NVENC helpers beside that snapshot later. Review and Clippy
pass for this staging change. The failed log is retained, and the full runtime
battery is rerun with no overlapping Cargo commands in this worktree.
The next broad invocation reaches renderer setup, then catches a second
fixture bug: the WHIP guard required `OBS_BUILD_RECORD` to be explicitly set,
while the parent enables recording implicitly for `OBS_BUILD_APP_GUI`.
The guard now uses the parent's existing `enabled` helper, preserving the
same recording requirement for both entry paths. That failed invocation
passes all 104 core executions and both standalone WHIP executables first;
it does not reach GUI, VLC/group-audio or streaming validation.
At the user's request, the remaining conversion and broad validation are
being deferred. A final focused app/streaming attempt is interrupted after
the shared Soldr daemon loses its control connection; final Clippy also
reports a daemon connection reset rather than a source diagnostic. The
previous completed Clippy/review runs and streaming matrix remain valid for
the code they exercised. The final guard change is reviewed locally, but a
successful final-head app run and lint rerun remain outstanding. No shared
broker or daemon is restarted. Keep the PR draft.
Deferred work retains the original scope: remaining plugin graphs and full
native test coverage; Windows/macOS graphs and runtime; physical capture and
hardware codec paths; SDK acquisition, standalone obs-sys publishing and
release installation/packaging; graph-wide unity/PCH controls and controlled
full-app performance measurements. This checkpoint is not the completed
CMake replacement and must not be merged as one.
# Shared registration conflicts
Oracle ports register complete-source extracts in
`rust/obs-c-oracle/oracle.d/.list`, one extraction per file:
```text
hotkey_register.inc|libobs/obs-hotkey-register.c.h|auto
```
The fields are the output filename, repository-relative source path and PCH
marker. `auto` uses the existing libobs/graphics PCH selection; an explicit
`#include "libobs/build/example.pch.h"` strips that exact marker instead.
Extraction still uses the original source and the same `#line` directive.
Do not append complete-source registrations to `build.rs`. Wrapper `.c` files
continue to be discovered from `oracle/`; field adapters keep their discovery
rule. Special multi-function extracts and transformations remain in the script.
The build watches the fragment directory, including additions and removals,
and each source. Its native input hash includes fragment names and contents,
the reader and every selected source. Duplicate outputs, malformed fragments
and paths outside the repository fail the build rather than omit an oracle.
The Utilities test category checks entry discovery, editing, removal and invalid
registrations; the Python lint checks reject new shared extraction blocks.
Two native registration snapshots are mechanical slices of the canonical graph:
`headless_characterizations_expected.json` and `portal_output_expected.json` in
`rust/obs-build/tests/native/registration/`. After editing their graph entries,
regenerate them with:
```sh
uv run ci/native_expectations.py --fix
```
Running without `--fix` checks for drift; the same check runs in `./lint`'s
Python self-tests. The selected cases, array order, complete target/test fields
and independent Rust host-selection/count assertions are preserved. A missing
canonical case is an error. Do not hand-merge these snapshots. `ci/ai_rebase.py`
resolves the canonical graph first, checks that source resolution, regenerates
conflicted snapshots and stages them. Generated-only conflicts need no model;
invalid graph JSON or missing cases refuse the rebase. Other expected files
remain independent fixtures and are outside this regeneration allowlist.
The canonical graph's independent-fragment migration is tracked separately in
PR #4655. Until it lands, a graph conflict still needs source resolution before
snapshot regeneration. README rows and unity groups also remain shared files.
Measurements for Refs #4896 were captured on 2026-11-17 UTC at master
`21d62feeb8010da3a1b1de85206e71bd4018953e`, using
`git log origin/master --since=2026-11-01 --format= --name-only` and
`git merge-tree --write-tree --name-only` on 36 pairs of current heads of PRs
#4915, #4920, #4921, #4922, #4925, #4931, #4933, #4935 and #4939.
There were 9 conflicting pairs: all 9 hit `obs-c-oracle/build.rs`, and 8 also
hit `libobs/build/libobs.graphics+.h.c`. #4920/#4922 hit only the oracle script.
November churn was 244 commits for `rust/README.md`, 210 for `test-graph.json`,
143 for the core-source unity group, and 50 for the oracle script. Current heads
already include mechanical rebases, so this is a lower bound on past conflicts.
Replaying #4931's pre-rebase head `e5399c639334b01325afd0e6a114ae88ac13d8ce`
against master `aace99f022e7` reproduces the reported graph and both snapshot
conflicts. The fix removes the whole-source oracle append point and replaces
manual recovery for those two snapshots with deterministic regeneration. It does
not claim to eliminate the remaining graph, unity-group or README conflicts.
# Control API
Extend obs-mcp; preserve existing tool names, successful text/image payloads,
headless stdio and the unchanged C++ obs-websocket plugin. New tools use
`domain_verb`: `vcam_start`, `vcam_stop`, `vcam_status`, `vmic_status`,
`media_restart`, `media_status`, `stats_get`, `stats_reset`, `wait_for`,
`pipeline_dump`.
## Contract
TypedTool declares serde/schemars input/output structs, NAME and ANNOTATIONS.
Inputs reject unknown fields and default optional fields. The Tool adapter
publishes inputSchema/outputSchema and returns structuredContent alongside JSON
text (and screenshot image content). The committed schema snapshot must match
schemas generated from the registered types. Backend additions use request and
response structs, never positional multi-argument methods.
Malformed requests and typed arguments are JSON-RPC errors. Domain failures
return isError and ToolError {code, category, message, retryable}, using
obs-websocket v5 codes: 600 ResourceNotFound, 207 NotReady, 604 InvalidResourceState
and 702 RequestProcessingFailed. Categories are independent of numeric ranges.
Read operations have readOnlyHint; start/stop are idempotent.
## State and measurements
`wait_for {condition, timeout_ms}` first checks, then waits within the deadline;
it returns {satisfied, elapsed_ms, last_value}. Condition is a typed enum:
OutputState {output,state}, SourceActive {name}, MediaState {name,state},
StatAtMost {metric,value}. Start accepts optional wait for bounded auto-wait.
Media uses obs_source_media_*; vcam uses virtualcam_output and its private
proc_handler. stats_get reports per-stage render/vcam/vmic {live,
latency_min_ns, latency_max_ns, frames_total, frames_dropped, xruns}, render
counters and {av_offset_ms, measured_from}. Unmeasured values remain unavailable;
queue estimates never masquerade as end-to-end measurements. stats_reset defines
a new counter baseline. pipeline_dump reports the current graph.
## Attachment
A loadable in-app module serves the same newline-delimited JSON-RPC Server on
$XDG_RUNTIME_DIR/obs-studio-rust/control.sock (0600). It uses the running OBS
instance; headless stdio still owns its own instance. `--mcp-attach [socket]`
proxies stdio to that socket. Socket ownership and cleanup follow module
lifecycle. OS code stays in src/platform or src/ffi. Windows named pipes require
a follow-up; unsupported attachment returns a clear error.
## Delivery
Parent #4444 has ordered native sub-issues: #4445 typed tools/errors/schema,
#4446 device/media/stats, #4447 waiting, #4448 socket/module/proxy, #4449 fluent
Rust client and ci/vcam_av_sync.py MCP transport. Each slice targets master
from a fresh infra/control-api-* branch with RED then GREEN shared MCP tests.
The client reuses server types; Python retains websocket and adds --transport
mcp plus fallback. Real GUI/device validation runs only in bosn containers.
## Attach to the application
Build `soldr cargo build -p obs-mcp-module` and install the resulting
`libobs_mcp_module.so` in OBS's normal module search path. The module binds
`$XDG_RUNTIME_DIR/obs-studio-rust/control.sock` with mode 0600 in a private
directory. It shares the app's libobs and stops its worker on frontend scripting
shutdown, before scene cleanup (EXIT is a fallback). It never starts a second
OBS instance or changes the application's global coordinate mode.
`obs-studio-rust --mcp-attach [socket]` relays stdio to that instance. The same
newline JSON-RPC Server handles both transports. At most 32 clients share the
control thread; requests are serial, bounded to 16 MiB per buffered frame.
`wait_for` blocks the control thread, while OBS render/audio threads continue.
Windows named pipes are unsupported pending #4455.
For headless CI use `obs-studio-rust --mcp-listen [socket]` (native build).
Keep its stdin open for the test's lifetime; EOF stops the socket and libobs.
The attached backend resolves frontend scenes and output names on each call,
preserves coordinate settings, and queues scene changes through the graphics
thread so the frontend's UI mutation path cannot block shutdown.
## Clients and the A/V probe
```rust,ignore
let obs = obs_mcp::client::Client::attach(Default::default())?;
obs.vcam().start(obs_mcp::tools::control::StartInput {
wait: true, ..Default::default()
})?;
obs.wait_for(condition).timeout_ms(5000).call()?;
```
`uv run --script ci/vcam_av_sync.py measure --transport mcp --mcp-socket PATH`
creates a uniquely named media probe in the program scene, waits for playback,
starts independent ffmpeg v4l2/PulseAudio capture, restarts the clip and reports
A/V offset, per-path latency and `stats_get`. `source_remove` cleans up the probe.
`--transport auto` (default) falls back to MCP only when the websocket connection
cannot be opened. `--transport websocket` preserves the original path. Auth and
protocol failures are surfaced rather than retried with a second transport.
Capture timing is relative to the media restart response wall clock; the server
keeps end-to-end offset null until an independent capture probe measures it.
Run actual device capture only inside bosn. No GUI interaction is required.
# Coordinating work: issues, claims and pull requests
Many contributors here are AI agents working in parallel, including the
maintainer's own automated runs. Every rule below exists because its absence has
already cost duplicate work: two PRs for the same issue (#115/#119,
#116/#118, #121/#123), five PRs superseded by a bot run porting units another
agent had announced, and a PR merged into a feature branch instead of
master (#68). Read [testing-policy.md](testing-policy.md) for *how* to port;
this document covers *who does what, and when*.
## 1. Before starting anything
1. Search for existing work:
- open PRs: `gh pr list --repo obs-rust/obs-studio --search ""`
- the issue and its comments, including claim comments
- the tracking issue's checklist (#4 lists the trackers)
2. If someone has claimed it and the claim is fresh (see 3), pick something
else, or comment offering help. Do not open a parallel PR.
3. If there is no issue yet, file one first (section 5) and claim it.
## 2. Claiming
The org-wide rules, commands and the definition of Ready are in
[WORKFLOW.md](https://github.com/obs-rust/.github/blob/master/WORKFLOW.md); the claim bot is the org's reusable workflow
(`.github/workflows/claim-bot.yaml` calls it). In short:
- Only an issue labeled `ready` can be claimed for implementation (`P0`
issues never wait). An underdefined one is researched first: comment
`Claiming: investigation`, then `/ready` once it meets the definition of
Ready. Maintainers (and the coordinator) triage new issues with `/ready` or
`/investigate`.
- Comment on the issue: `Claiming: - ` followed by a short numbered plan
(one unit per issue, one to three similar issues per PR, a big one alone; a call-site-wide warning class is one unit in any number of
directories, see section 4) and when you expect to open the first PR.
- The claim bot then **assigns you** and reacts 🚀 to your comment; you don't
need any rights. It replies only to refuse: an issue that is not Ready, is
blocked by an open issue, waits on a decision or is claimed by someone
else, a takeover of a claim that isn't stale, or a `/reassign` from a
non-maintainer. Automated runs skip issues that are assigned or have an
open PR.
- On a tracking issue, claim one checklist item, not the whole issue.
- Claim only what you are working on now. There is no per-account limit
(several agents may share one account); stale claims expire (section 3).
- **Feature issues with open questions:** answer each open question in the
claim comment under **Decisions:** (the default you will build and why),
and order the PRs so the first one does not depend on an unresolved
answer. A question with no safe default is posted as **Decision needed:**
on the issue, and the work that depends on it waits for an answer. Use it
only for that; a question with a safe default goes under **Decisions:**.
- **Open decisions:** a line that starts with `Decision needed:` (bold or a
heading marker before it is fine) makes the claim bot add the
`decision-needed` label (🚀, silent), from anyone. From the claimant it
also counts as `Blocked:` (section 3). Only a maintainer clears it, with a
`Decided:` or `Decision:` comment (first line) or by removing the label;
nobody else's progress and no sweep removes it. That answer also clears
`human-review-needed`, and on a blocked claim it removes `claim-blocked`
and mentions the claimant with the decision quoted, so the work resumes
(#2212). The coordinator (obs-coordinator skill
§3b) researches each open decision every tick: it answers with `Decided:`
when the rules, docs or earlier decisions settle it, and otherwise moves
the issue to `human-review-needed`, the list that waits on the human
maintainer. The list of open decisions is
[issues labeled `decision-needed`](https://github.com/obs-rust/obs-studio/issues?q=is%3Aopen+label%3Adecision-needed+sort%3Acreated-asc),
oldest first. Non-public work never posts `Decision needed:` on a public
issue; use a general `Blocked:` reason.
## 3. Keeping or releasing a claim
- A claim goes stale after a period with no progress: no comment from the
claimant on the issue, and no commit, comment or review on an open PR they
opened that references it (a draft counts).
| Issue | Stale after |
|---|---|
| normal | **24 hours** |
| labeled `P0` or `critical` (crash, data loss, broken release or CI-blocking; maintainers set it) | **8 hours** |
| labeled `claim-blocked` (the claimant set it; see below) | **7 days** after the last `Blocked:` comment |
The hourly sweep then unassigns the claimant, without a comment. Anyone may take
a stale claim by commenting `Taking over stale claim from @x`; the bot
accepts it (🚀) only if the claim is stale. Commits on the old draft PR stay
available: carry them over with `Co-Authored-By` (section 6).
- When the work waits on something you don't control (a maintainer
decision, another PR, coordinated non-public work), comment
`Blocked: ` (or `/blocked `). Only the claimant can; the bot
adds `claim-blocked` (🚀) and the claim lasts 7 days from that comment. A
new `Blocked:` comment renews it; a takeover in the meantime is refused.
A claimant's `Decision needed:` comment (section 2) blocks and renews the
same way.
Keep the reason general ("waiting on a maintainer", "waiting on #N",
"waiting on non-public work"). Any other progress (an issue comment, a
commit, comment or review on your PR) removes the label and the normal
timer applies again, as do a release, handoff or `/reassign`. When the
7 days end without a renewal the sweep removes both labels, silently.
- Maintainers (owner, member, collaborator) can move any claim with
`/reassign @user`. The bot leaves issues labeled `claim-locked` alone;
`claim-locked` wins over `claim-blocked`.
- To stop, comment `Releasing
- ` and link any partial branch; the bot
unassigns you (🚀). To hand the claim to someone instead of dropping
it, name them in the same comment — `Releasing
- — handing it to
@user`, `Handing
- over to @user`, `It's yours, @user` or
`/handoff @user` — and the bot assigns `@user` instead (🚀), so nobody
else can take the item in between.
## 4. Pull requests
- **Base is `master`.** A stacked PR starts its description with
`> **Stacked:** builds on #N; the new commits are …` and is retargeted to
master before merge. Check the base before asking for a merge.
- **One unit per PR.** Branch names: `port/`, `fix/-`,
`test/`, `infra/`.
- **Batch one to three similar issues into one PR.** A worker takes up to
three issues that share a platform or an area (crate, plugin, workflow,
test binary) and lands them as one PR, a RED then GREEN commit pair per
issue, `Refs` naming each. Each issue stays one unit for review and
revert; the batch only shares the PR, queue and master-push runs, so it
costs a third of the CI. A big issue (a large port or subsystem such as
the CEF work, `size:L` or larger) and breakage that blocks others go
alone. See the `obs-worker-loop` skill §2.
- **Mechanical warning work is one PR per warning class, in any number of
directories.** A call-site-wide compiler warning (#516) is a single class:
fix it in one PR, with the flag that surfaces it removed in the same change,
and put a findings table grouped by directory in the description so the diff
can still be reviewed in slices. A per-directory series is not a rule that
appears anywhere else in these docs, it costs a full `Pull` run (~35 min)
plus a merge-queue run per directory, and every flag-list edit invalidates
the compile cache (#2689). Measure the class with
`uv run ci/warning_findings.py --compdb --drop `:
it replays only the affected translation units with `-fsyntax-only` and
prints the findings grouped by directory, which is both the RED evidence and
the inner loop. The default `--language c` keeps its C units; add
`--language cxx` (or `all`) for a C++ class such as the frontend's, whose
units the C-only selector filters out. The limits do not move — explicit
casts or widened types
only, no behaviour change, no per-file `-Wno-*`, never an existing C test or
public header, and the pin goes away in the same PR as the fixes.
**A PR lane's tree is not the whole set.** Many plugin and platform sources
compile only in the app builds (#2678, #2710), so a pin-drop that is clean on
a Tier 2 tree can still fail a `Scheduled` run. Enumerate the app's C units
from its own build tree — configure only, seconds, no compile:
`uv run build-aux/appimage/build.py --steps version,configure`, then
`ninja -t compdb` in `build_ubuntu/` (or the app build's volume) and replay
that compdb. Vendored trees the tree exempts with a target-scoped `-Wno-*`
(`librtmp`, `libcaption`) report nothing while their pin is in the flag
list; re-run with `--drop` on it to check them.
- **Commit order:** characterization test (if the unit had none), then RED
(failing test or `todo!()` core), then GREEN. The PR description names the RED
commit, how it fails (test names or counts), and the GREEN result.
- **Bug fixes need a failing test first.** If the bug needs live services
(PipeWire, ScreenCaptureKit, a server), factor the decision into a small
plain-C or Rust function and test that (as #109 did).
- **Rebase on origin/master when you start.** Before claiming, coding or
reviewing, run `git fetch origin && git rebase --autostash origin/master`
so the work starts from current master. Later master changes are handled
by the merge queue (below).
- **PR CI is the merge gate.** Open the PR (a draft is fine) as soon as the
RED test exists; a red CI run on a PR is expected. The local gate
(AGENTS.md) is recommended, not required. Complete self-reported client gates
and verified org-member author/final signer allow base-owned PR admission;
forks, non-members, unverified heads, invalid/partial proofs and API/verifier
errors run real selected checks, including all-six-target clippy/Dylint.
Stamp first, then sign final HEAD. Strict client enforcement is opt-in. Do not
build fork or self-hosted CI to pre-validate PRs. Local errors from your
environment (soldr permissions, disk, Docker, host packages):
[troubleshooting.md](troubleshooting.md).
For a focused CI/configuration bug fix, local RED evidence plus a separate
GREEN commit is sufficient: push both together when ready rather than
requiring a remote RED run. Record both commands/results in the PR. This
exception changes push timing, not the RED → GREEN requirement or the
required gate. Documentation-only updates do not need RED → GREEN tests.
- **Merge queue:** master merges go through GitHub's merge queue. Queue a
green PR with `gh pr merge ` (or the "Merge when ready" button); the
queue reruns PR CI on the merge result with current master, and the
required `CI Gate ✅` check decides. You do not need to rebase by hand for
unrelated master changes; rebase only when GitHub reports a conflict.
The coordinator (obs-coordinator skill, §2) acts for the maintainer and
also rebases a PR that was ejected from the queue, a stacked PR whose base
landed, a PR about to go in behind the queue head that touches the same
files, and a `docs/features.md` ledger conflict. A rebase changes the head,
so it drops a local-gate stamp and PR CI runs the full Linux suite again.
- **Submodules move forward only.** PR CI fails when a PR moves a submodule
pointer (for example `plugins/obs-websocket`) to a commit that does not
descend from master's pointer, which usually means a stale checkout. Run
`git submodule update` before committing, or put `submodule:` in the PR
title for a deliberate move back. Locally: `uv run ci/submodule_direction.py origin/master`.
- **Fork PRs:** Actions asks a maintainer to approve workflow runs only for a
first-time contributor's first PR (repository setting "Require approval for
first-time contributors"). Once a PR of yours has merged, later fork PRs
start CI as soon as they are opened. On a first PR, a maintainer approves
the run; ping one in the PR if it waits more than a few hours.
- **User-facing features need one real run.** A change to UI, protocol
output or logging is not complete until the real app has run once with it
(its Tier 4 test, or by hand), and the PR shows the observed output. #846
closed with every test green while the light it added called llvmpipe
green (#929). Without such a run, use `Refs #N`.
- **User-visible changes get a ledger line.** A PR that changes what a user
sees or can do (behavior, a setting, UI, log output, a protocol field, a
platform or package, or a fix for a bug a user can notice) adds or
updates its line in [docs/features.md](../features.md) in the same PR.
CI, tests, ports with no change in behavior and refactors do not (#1250).
- `Fixes #N` only when the PR completes the issue; otherwise `Refs #N`, and
tick the tracking-issue checkbox when it merges.
- **Draft status:** mark the PR ready when it is ready. If you move a PR back
to draft, say why in a comment.
- **Rebasing someone else's PR** (maintainers, and the coordinator acting
for them, may, for the rebases above and for mechanical fixups such as
lint or formatting): push with `--force-with-lease`, and name the replaced
head SHA in a comment.
## 5. Filing issues
- **Security bugs:** apply the tiers in
[SECURITY.md](../../SECURITY.md) ("Two tiers"). A high-risk one (a remote
party can reach it, or it leaks credentials) is not an issue: don't file,
claim or push it; report it privately and work on the private fork the
maintainers open on the advisory. If unsure, report privately. A low-risk
one is a normal public bug and may carry the `security` label.
- **Bug:** use the bug template. Title `bug: : `; for a
security bug, name the class in the symptom (`bug: obs-ffmpeg:
use-after-free on seek`). Include file:line, a short excerpt, the class
(OOB read, UAF, overflow, …), how it is reached, a proposed fix and a
failing-test sketch.
- **Upstream OBS bugs:** add `(upstream #N)` to the title and credit the reporter.
- **Port:** use the port template. Title
`rust: Port .c to `; state the phase, its position in the
policy's port order, its dependencies and whether a characterization test
exists.
- **Meta, tracker and parent issues:** every work item is its own issue,
linked as a native GitHub sub-issue of the parent
(`gh api -X POST repos/obs-rust/obs-studio/issues//sub_issues -F sub_issue_id=`,
where the id is `gh api repos/obs-rust/obs-studio/issues/ --jq .id`).
Don't put the work into one big body as a tier list or checklist: nobody
can claim, measure or close one line of it. The parent body says what
the group is for, the rules that apply to every child and the suggested
order, naming the sub-issues by number. A finding that comes later
becomes a new sub-issue, not a new line in the parent (#3176).
- **Oracle differences** (a stand-in behaving unlike libobs): their own issue,
fixed before any port relies on that oracle (#79, #84, #145).
- **Feature ideas and questions** are not issues: post ideas in
[Discussions → Ideas](https://github.com/obs-rust/obs-studio/discussions/categories/ideas)
and questions in Q&A. Issues are for bugs and claimable port or task work;
an idea becomes an issue once it is agreed and someone can pick it up.
## 6. Collisions
- If two PRs address the same issue, the claimed one wins; without a claim,
the earlier one wins. The other author closes theirs with a link and offers
any useful pieces (tests especially). Maintainers carry those over with
`Co-Authored-By`.
- Conflicting design choices between open PRs (for example U+FFFD substitution
vs. rejecting a path) go to the tracking issue under a **Decision needed:**
heading before either PR merges.
## 7. Closing
- When an issue closes, leave a comment: what fixed it, what is left, and the
follow-up issue for the rest.
- A superseded PR is closed by its author (or a maintainer) with a link to the
replacement.
## 8. Master branch protection (decisions for #139, #692 and #699)
`master` blocks force pushes and deletion, including for administrators.
By default, changes reach master through GitHub's merge queue (ruleset "master
merge queue (#692)", whose merge method is squash: each PR lands as one
commit). Queue a green PR with `gh pr merge `. Workers and contributors
do not use `gh pr merge --admin` without explicit maintainer authorization
under the bypass policy below, and never push to master. The coordinator
never merges outside the queue, with `--admin` or otherwise.
The queue reruns PR CI on the merge result with current master, and the one
required check is `CI Gate ✅` (`ci.yml`). That job always reports: it
requires selected queue jobs to execute successfully regardless of trailers or
hosted proofs. PR skips require the immutable-base per-gate contract or proven
path scope; missing verifier, fallback work or selected queue legs fails it.
The cache janitor is maintenance and is excluded from this gate; see
[the pre-work policy](../ci-tooling.md#pre-work-cache-maintenance-and-cancellation).
Why the queue and not rebase-and-merge per PR (#699): over a day of queue
runs (58 runs, 37 PRs), 57 runs were green and one PR was removed for a
failed check, so a queued PR goes through on the first try. The delay came
from 11 administrator merges that bypassed the queue: each moved master under
it and rebuilt every queued group (up to 5 runs for one PR, about 65 minutes
from queueing to merge against a 16-minute run). Requiring branches to be up
to date instead would make every agent rebase and rerun CI after every merge,
which gets slower with each agent added. So the queue is the normal path,
and compiler/dependency caches (docs/ci-tooling.md) reduce rebuild cost while
selected heavy checks always rerun.
**Maintainer bypass.** It belongs to the maintainer, or to a worker the
maintainer explicitly authorizes; never to the coordinator. The ruleset lets the repository admin role bypass it
for pull requests only (`gh pr merge --admin --squash`; direct pushes
stay blocked). It is for a maintainer landing a small, low-risk PR (docs, a
bot or CI tweak) that should not wait for a CI run. It skips CI, and it moves
master under every queued group, which then rebuilds. So bypass only when
the queue is empty (`gh pr list --search "is:queued"` shows nothing);
otherwise queue the PR and, if it must go first, jump it to the front,
keeping CI (#930 E2):
`uv run --no-project --script ci/gh_graphql.py -f query='mutation{enqueuePullRequest(input:{pullRequestId:"",jump:true}){mergeQueueEntry{position}}}'`
(the PR's own `CI Gate ✅` must already be green; GitHub refuses a PR whose
checks are pending or failing).
Explicit maintainer instructions to admin-merge authorize an agent to use
this exception; do not ask for the same authorization again. Recheck the
queue immediately before merging. If it has entries, use the queue and
jump-to-front path above to preserve their work. With an empty queue, a
small docs or CI fix may use the authorized bypass. Run focused checks
first; for a change to the workflow graph, wait for its PR `CI Gate ✅` to
pass before bypassing the redundant merge-group run. Record the
authorization, queue state and validation in the PR. Authorization for one
landing does not grant a standing bypass for unrelated work.
Each queue run's `CI Gate ✅` job summary shows its wall time, runner time
and attempt number (`ci/queue_report.py`); an attempt 2 or later is a
rebuild. If rebuilds after bypasses show up there, tighten this rule.
In an emergency an administrator may set the ruleset's enforcement to
"disabled", land the fix, and enable it again, saying so in the PR.
The queue squash-merges, but the repository still allows merge commits
(older history and an admin bypass may use them), so do not require linear
history.
Review this policy again if direct pushes are retired or the gate's CI
reporting changes. Every PR still targets `master` as section 4 requires;
GitHub branch protection cannot prevent an author from choosing another
base, so check the base before merging.
# FFmpeg orientation metadata selection characterization
Prerequisite #4431; Rust follow-up #4432. The unit is
`ffmpeg_image_get_orientation` in `libobs/graphics/graphics-ffmpeg.c.h`.
The existing, unchanged `test/cmocka/test_image_exif_orientation.c` generates
32 by 16 JPEG fixtures with four distinct color quadrants and EXIF orientation
values 1–8, plus a JPEG with no EXIF block. It calls the public
`gs_create_texture_file_data()` API and checks the resulting dimensions and
four corner colors. Thus it exercises metadata selection through real decoding,
without exposing the static function or requiring a graphics backend.
On 2026-11-09, before extraction at b431a40b6da74ed753af4dc4faa0f3637ba2b5a5,
`ctest --verbose -R '^test_image_exif_orientation$'` passed with each of
`libobs-c-reference` and hybrid `libobs` selected through `LD_LIBRARY_PATH`.
The test also runs PNG and WebP cases; PNG EXIF orientations 2–8 skip on this
FFmpeg version. No existing C tests or test graph registrations are changed.
The Linux Tier 2 container uses FFmpeg 8.0 (libavcodec 62.11.100, libavutil 60.8.100). This selects
`!FFMPEG_HAS_EXIF_API` (libavcodec before 62.13.100). The JPEG decoder reports
the case-sensitive `Orientation` frame metadata for values 1–8; the no-EXIF
case exercises absence of metadata and display matrix. These public image
fixtures do not independently test precedence when metadata and a matrix
coexist, lowercase metadata keys, or an undersized side-data allocation.
They do not exercise the FFmpeg 8.1 `av_exif_matrix_to_orientation` branch.
Those limits must remain explicit when the Rust follow-up adds safe-core
and differential coverage.
After the verbatim extraction into `graphics-ffmpeg-orientation.c.h`, the same
command passed against both libraries again: 20 cases passed and seven PNG
cases skipped in each run. Every JPEG orientation case passed before and after.
The exported symbol lists of hybrid and C-reference libraries were identical
before and after. The extracted block includes the existing small static
`display_matrix_to_orientation` adapter, so alphabetical unity inclusion needs
no forward declarations or changes to its Rust math dependency. Decoder
selection, initialization, cleanup, and decode orchestration remain untouched.
Reproduction: configure the normal Linux Tier 2 tree with
`OBS_BUILD_C_REFERENCE=ON` and `OBS_LIBOBS_BACKEND=HYBRID`, build `libobs`,
`libobs-c-reference`, and `test_image_exif_orientation`, then run the CTest
command above once per library with that library's directory first in
`LD_LIBRARY_PATH`. The version branch is determined by the headers used to
build libobs, not by running the same binary with a different shared library.
## Pool resume on 2026-11-16
Resumed the earlier characterization and extraction on master
`94fa7ce85868c3604cf8fd31a458a4cf641061c7`, using branch
`test/4431-ffmpeg-orientation-pool`. Before extraction, the unchanged
`test_image_exif_orientation` passed against both libraries again: 20 cases
passed and seven PNG cases skipped in each run.
RED commit `d73d4736f93b7790841256e985671099029dabfe` replaces orientation
selection with a zero-returning stub. The same C test failed against both
libraries: JPEG and WebP orientations 2–8 failed (14 failures per library),
with wrong corner colors or unswapped dimensions. Six cases passed and
seven PNG cases skipped. No C test was edited for this check.
The GREEN commit restores the original selection block verbatim in the
extracted file, byte-identical to the earlier extraction at `73c84078d`.
The same CTest command passed against both libraries after extraction:
20 cases passed and seven PNG cases skipped in each run. Before and after,
the hybrid and C-reference dynamic export lists were identical (1,768
symbols). FFmpeg remains 8.0, with libavcodec 62.11.100 and libavutil
60.8.100; the coverage limits above still apply. No Rust, existing C tests,
public headers, test graph, or sibling image initialization/cleanup code
changed. Delivery is branch-only; no PR or auto-merge was created.
# Scheduled differential fuzzing
The cargo-fuzz differential targets in `rust/obs-codec/fuzz/` compare the Rust
ports with the original C (via `obs-c-oracle`). They run nightly from a local
cron job, not from GitHub Actions.
| Target | Compares | Documented exclusions |
|---|---|---|
| `avc_diff`, `hevc_diff`, `av1_differential` | bitstream parsers | listed in each target's header comment |
| `nal_diff` | `obs_nal_find_startcode`: C, Rust C ABI, safe Rust | NULL, near-zero and reversed ranges are not generated (C UB). Inputs sit inside a padded allocation at four alignments. |
| `config_ini_diff` | `config_open_string`, section order and string lookups | Duplicate section names and keys are compared (uthash model, #681). File I/O and NULL handles are not exercised. |
AMF has no Rust port yet. Add a target when it lands.
## Requirements
- Linux (the runner uses `flock`), `soldr`, `uv`, and a C toolchain for
`obs-c-oracle`.
- The pinned nightly and cargo-fuzz:
```sh
soldr rustup toolchain install nightly-2026-10-14 --profile minimal
soldr cargo install cargo-fuzz --locked
```
## Running
```sh
uv run rust/tools/fuzz/run.py --state-dir ~/.local/state/obs-fuzz # 1 h per target
uv run rust/tools/fuzz/run.py --state-dir /tmp/f --seconds 60 --target nal_diff
```
The runner builds every target, then runs each one in turn with
`-max_total_time`, `-max_len=4096`, `-timeout=30` and `-rss_limit_mb=2048`. A
failing target does not stop the run. The runner exits 1 if the build or any
target failed, and 75 if another run holds the state directory's lock.
Nightly cron entry (01:00 local time, all targets). Cron has a minimal
`PATH`, so set one that finds `uv` and `soldr`:
```cron
PATH=/home/you/.cargo/bin:/home/you/.local/bin:/usr/local/bin:/usr/bin:/bin
0 1 * * * mkdir -p $HOME/.local/state/obs-fuzz && cd $HOME/dev/obs-rust/obs-studio && git pull --ff-only -q && uv run rust/tools/fuzz/run.py --state-dir $HOME/.local/state/obs-fuzz >> $HOME/.local/state/obs-fuzz/cron.log 2>&1
```
## State directory
- `corpus//`: the libFuzzer corpus, kept and grown across runs. Back
it up. Never delete it to "fix" a run.
- `artifacts//`: crash, timeout and OOM inputs.
- `runs//`: `build.log`, one log per target, and `summary.json`.
The summary records HEAD, dirty files, toolchain, `rustc -V`, the cargo-fuzz
version, and each command with its exit code.
## Handling a finding
```sh
cd rust/obs-codec
soldr cargo +nightly-2026-10-14 fuzz run /artifacts//crash-... # replay
soldr cargo +nightly-2026-10-14 fuzz tmin /artifacts//crash-... # minimise
```
Find out whether the mismatch is a port bug or a harness bug before changing
anything. For a port bug, file an issue with the minimised input and
regression-test it in Tier 3. Exclude it from the target only with a comment
that links the issue.
# Hybrid default validation (#1587)
Implementation PR: [#1588](https://github.com/obs-rust/obs-studio/pull/1588).
The developer default is hybrid libobs. Release approval remains pending;
this report does not waive release-criteria.md or authorize publication.
## Build timing
[Raw commands and measurements](benchmarks/hybrid-build-2026-10-20.json)
compare baseline `90e4edc41` with hybrid implementation `174109fad`. Both use
one Linux dependency image, GCC 15.2.0, Rust 1.98.1, CMake 4.2.3,
RelWithDebInfo native code, release Rust code, and four compilation jobs on
a Ryzen 7 3700X. Each variant starts with a separate empty compiler cache and
fresh output tree; crate downloads can be warm. Configuration is timed
separately. The baseline builds the two default libobs products (`libobs`,
`libobs-with-rust`); the hybrid builds only production `libobs`.
| Scoped libobs operation | Baseline | Hybrid |
| --- | ---: | ---: |
| Configure | 8.223 s | 7.544 s |
| Fresh outputs and initially empty compiler cache | 11.406 s | 14.041 s |
| No changes, median of three runs | 0.115 s | 0.120 s |
| Touch generated configuration header, warm cache | 7.970 s | 5.995 s |
| Append a comment to that header | 11.184 s | 5.779 s |
The fresh build was slower; the warm and edited-header rebuilds were faster
in these samples. The shared host was busy (load averages are recorded), and
there is only one sample for each rebuild type. These figures cannot establish
a general build-speed improvement. They exclude frontend/plugins, packaging,
image setup and full-application build time. An earlier exploratory pass used
a shared compiler cache and is deliberately excluded from this comparison.
The raw child-CPU fields exclude detached cache-daemon work and are not total
compiler CPU measurements.
To reproduce, create baseline and hybrid source snapshots, mount them read-only
as `/baseline` and `/source` in the recorded image, and use separate `/build`
output and compiler-cache directories for each variant. Execute the recorded
configure/build commands. After the fresh build, run the same build three times;
then touch its generated `config/obsconfig.h` and rebuild. Finally append an
otherwise inert comment to that header and rebuild. Keep the same toolchain,
profile, job count and source snapshots; record host load and all outcomes.
## Compatibility and test time
- The real Linux production and C-reference libraries export identical sets
of **1,766 symbols**. Their SONAMEs match. The Ninja graph confirms all
**61 selected ported C implementations** are absent from production and
present in the explicit reference.
- With HEVC disabled, a separate real build exports **1,762 identical symbols**,
with no HEVC symbols leaking from the aggregate Rust archive.
- The unchanged C suite registered **341 tests per backend**, with no failures
and the same three hardware-dependent skips. Loader-path checks verified
the C reference for OFF and production hybrid for ON. Wall times were
**392.31 s** and **390.62 s**, respectively. These are backend runs of the
same suite, not before/after test-speed evidence.
- The full Rust workspace unit, differential and documentation tests pass.
The opt-in native integration category also passed with `libobs-integration`:
The normal native production entry point also built a hybrid with 1,766
exports and no C-reference output. The explicit pair ran
**59 unchanged C executables per backend** (118 runs), selected-library
loader checks, matching exports, data lifecycle and plugin checks. This run
disabled per-target native sanitizers; the separate CMake Tier 2 run kept
its existing sanitizer configuration.
An obsolete NVENC test requiring the installed C loader was updated to
require the production Rust loader and explicit C reference instead.
- `./lint` passed after the platform/packaging fixes (60.5 s); subsequent native
validation fixes and final PR results are recorded on the PR.
Compatibility test coverage has not been reduced to create a speed claim.
Ordinary application builds avoid the C reference; an explicit compatibility
run still builds and exercises both implementations. No test-time reduction
is established by these measurements.
## Packaged application and remaining release evidence
A production glibc-2.28 AppImage built successfully through the existing bosn
`appimage-228` task, including the unchanged C++ websocket plugin. Its first
attempt encountered a compiler-cache daemon outage; the successful retry
used four compilation jobs with caching disabled and reused completed objects.
This is functional build evidence, not a clean full-app timing comparison.
The AppImage passed the saved-profile scenario on Debian 13: screen capture,
camera and microphone reached streaming state and produced a recording. The
recording verifier decoded 437 frames at 320x240 (14.6 seconds) in the first run,
found no screen/camera freezes, and measured the 440 Hz microphone tone without
silence. A second run also passed and retained `/proc` maps proving libobs loaded
from inside the extracted package. AppImage SHA-256:
`218f8f17afd4eb51daebb913a51983778e4f27166abe5d1b4f849995e3d6584a`.
The unchanged websocket suite passed **206/206 checks**, exercising all
**147 documented request types**, against the real executable extracted from
that artifact. Running the suite against the AppImage wrapper initially gave
three process/library false failures: its PID checks found the wrapper rather
than the OBS executable. No protocol assertions were weakened. The saved-profile
scenario separately exercised the actual AppImage entry point. SRT reconnect
checks requiring a host ffmpeg with SRT support were skipped in that container.
An explicit C rollback build also linked successfully without the libobs Rust
archive. Substituting that library into a copy of the same AppDir and rebuilding
the AppImage made the packaged saved-profile check fail with
`packaged libobs does not contain the production Rust implementation`. This is
the negative control for the shipping-library regression; the C reference tests
remain valid independently.
Verification-only CI exposed two integration problems, now fixed: the macOS
script still explicitly requested the removed `libobs-with-rust` target, and
Flatpak debug extraction corrupted the prebuilt Rust compiler's ELF libraries.
The compiler module now disables stripping and debug extraction, as described by
the [Flatpak build options reference](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html).
Local locked Cargo vendoring also succeeded and its generated configuration parsed.
A further cold-CI run found rustup's welcome text in soldr's stdout before Cargo's
TOML. Preparation now separates raw console output, extracts source configuration,
and validates the rewritten TOML before entering Flatpak. A focused cold-output
regression failed before that fix and passes afterward.
## Platform CI evidence
[PR CI 39531640340](https://github.com/obs-rust/obs-studio/actions/runs/39531640340)
passed at implementation commit `4ea443714da0befcaf79418d5046e8fb6766e1e4`,
including the Linux shards, macOS/Windows Tier 2, Rust tests and cross lint.
The platform logs establish:
| Compatibility host | Tests per backend | Matching exports | C / hybrid wall time |
| --- | ---: | ---: | ---: |
| Windows x64 | 165 | 1,794 | 77.40 / 77.09 s |
| macOS arm64 | 191 | 1,877 | 124.13 / 124.10 s |
[Verification-only run 39531699676](https://github.com/obs-rust/obs-studio/actions/runs/39531699676)
built Linux, Windows x64/arm64 and macOS x64/arm64 packages, the AppImage and
offline Flatpak. Native packaged startup passed on both Windows and both macOS
architectures. The first attempt also passed AppImage checks on NixOS, Arch and
Ubuntu. Two independent failures require targeted retries: the known real-time
VLC audio timing flake [#838](https://github.com/obs-rust/obs-studio/issues/838)
in the C-reference Linux shard, and an AlmaLinux ImageMagick mirror download
failure before its bundle scenario. The targeted C-reference shard retry passed
without code changes. AlmaLinux's targeted retry also passed its bundle and
first-start scenarios. The verification workflow finished **successfully** after
these two targeted retries; no assertions were changed to accommodate either
failure. It ran with `verify_only=true` and published no release.
Hardware recording performance and fourteen consecutive daily stability
builds remain separate release requirements. The checked-in release evidence
remains unapproved, and both publication workflows fail closed until its review
is recorded.
The native-engine compatibility run additionally exposed stale test-build
metadata: a missing output-delay accessor stub and an old 52-test expectation
for a manifest that now lists 59. The metadata/count are synchronized without
changing C test bodies. Static archives precede shared dependencies, and the
selected libobs remains a declared runtime dependency even for standalone C
characterizations with no core imports. Explicit comparison helpers reject
identical backend paths, preserving C-versus-Rust validation.
The unrelated Windows `cm_print_error` link failure is fixed upstream by
[#1591](https://github.com/obs-rust/obs-studio/pull/1591), tracked as
[#1580](https://github.com/obs-rust/obs-studio/issues/1580). Final platform
verification incorporates that upstream fix rather than rewriting the C test
in this migration.
# Hybrid application build
The default `libobs` is one shared library containing completed Rust ports and
remaining legacy C/C++. Frontend, plugins, installation and packaging use it
through the unchanged `OBS::libobs` target and public C headers. Rust and its
pinned toolchain are required. There is no automatic C fallback.
Use the normal platform preset and build commands. `OBS_LIBOBS_BACKEND=HYBRID`
is the default. `OBS_BRAND_RUST=ON` selects OBS-Studio-Rust identity independently
of implementation; the deprecated `ENABLE_RUST_LIBOBS` input supplies the initial
branding default for existing callers. For an existing build cache, set branding
explicitly when changing it.
## Compatibility tests and temporary rollback
`./unittest` retains Rust unit/differential coverage and the unchanged C tests
against both implementations. The Tier 2 harness explicitly configures:
```sh
cmake --preset ubuntu-ci -DOBS_BUILD_C_REFERENCE=ON
cmake --build build_ubuntu --target libobs libobs-c-reference cmocka-tests
```
The C reference is excluded from `all` and never installed. It has the same
filename and ABI identity in `build_ubuntu/libobs-c-reference`; the test harness
selects that directory for `OFF`, and production hybrid libobs for `ON`, verifying
which library the loader actually chose. Unported objects are shared, and both
complete test suites and export comparisons remain required on supported hosts.
Temporary first-release rollback uses a separate build directory configured with
`-DOBS_LIBOBS_BACKEND=C`. It builds and installs the original C implementation
without the libobs Rust archive. This is an explicit recovery path, not a second
normal application configuration. Keep it until the release retirement criteria
are met. Other Rust features may still require Rust tooling.
## Cargo native build (#1332)
The Cargo build engine uses the same `libobs/build/source-sets.d/` as CMake.
Build `libobs-rust` externally in release mode, then supply its archive through
`OBS_BUILD_RUST_ARCHIVE` to normal `obs-build`/bundled `obs-sys` builds. A nested
Cargo build inside a build script would deadlock on Cargo's build lock.
`build_hybrid_with_options` accepts the archive directly; `build_pair` explicitly
builds both variants for compatibility tests. `build_c_reference_with_options`
and bundled `OBS_SYS_C_ROLLBACK=1` are explicit reference/rollback entry points.
## Flatpak and packaged validation
Before flatpak-builder, run `build-aux/prepare_flatpak_rust.py` to vendor the
locked Cargo inputs. The existing workflow does this before entering the offline
sandbox. The manifest supplies checksum-pinned Rust and Corrosion, and retains
Flatpak's existing application identity through `OBS_BRAND_RUST=OFF`.
Run packaged artifacts with saved profiles, screen capture, camera and microphone
as required by AGENTS.md. `test-appimage.sh` also checks that bundled libobs
contains Rust code; branding alone cannot prove which implementation shipped.
Keep the existing C++ obs-websocket plugin unchanged and run its Tier 4 suite
against the real hybrid application.
## Migrating another unit
Follow testing-policy.md: claim, characterize if needed, RED, GREEN, ABI/layout
and differential coverage. Move the original C include into a ported group in
the canonical manifest; link its Rust shim through `libobs-rust`. Confirm the
production build excludes that C implementation and the explicit reference still
includes it. Preserve C oracle sources and all required tiers. Remove originals
only under release-criteria.md after the rollback retirement gates pass.
Nightlies publish the hybrid build automatically; a public release happens
when the maintainer dispatches certify and the automated CI gates pass (see
release-criteria.md, #1818).
# MCP control server
From the repository root, build the libobs-enabled application with:
```sh
./mcp --build
```
The command prints the executable path, `target-mcp/debug/obs-studio-rust`.
It first builds the release `libobs-rust` archive, then builds the application
with `bundled-native`, passing the archive automatically. This separate target
directory prevents an ordinary featureless application build from overwriting
the MCP application. Install soldr as described in [CI tooling](../ci-tooling.md).
On NixOS the launcher automatically enters the declared `ci/mcp-shell.nix`
environment. This requires nix-shell and an available nixpkgs channel. The shell
provides the compiler, FFmpeg, X11 development metadata and other native SDKs;
no X server is required. Other hosts must have the native libobs development
dependencies installed. Nix may fetch dependencies on the first invocation.
`OBS_MCP_TARGET_DIR` optionally selects another build directory.
`.mcp.json` runs `./mcp --mcp`. The launcher builds incrementally before starting
the server; build diagnostics go to stderr and protocol traffic stays on stdout.
With no arguments `./mcp` also starts the stdio server. For example:
```sh
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | ./mcp --mcp
```
The same launcher accepts socket arguments:
```sh
./mcp --mcp-listen /run/user/1000/obs-control.sock
./mcp --mcp-attach /run/user/1000/obs-control.sock
```
Keep the listening process's stdin open. The socket uses mode 0600; its parent
directory must already exist. Attach proxies newline-delimited JSON-RPC over
stdio. See [the control API](control-api.md) for tools, schemas and metrics.
GUI/device validation belongs in bosn containers; these headless examples do
not open a GUI or require a camera device.
Run bootstrap regressions with:
```sh
uv run --no-project python -m unittest ci.test_mcp_build
```
The launcher also builds EGL/Wayland OpenGL, linux-v4l2 (including its Pulse/PipeWire virtual mic), obs-ffmpeg (media source and AAC), and obs-x264 through obs-build. It sets OBS_MCP_GRAPHICS_MODULE, OBS_MCP_MODULE_BIN, OBS_MCP_MODULE_DATA and OBS_MCP_DATA_PATH from target-mcp/runtime/manifest.json; explicit overrides are preserved. Graphics/plugins are installed atomically so rebuilding for an attach client does not overwrite a listener's mapped libraries.
Video requires a reachable Wayland compositor or X server. For display-free CI, run against a headless Wayland compositor (for example Weston with its headless backend); the EGL renderer is built with Wayland support. A container also needs explicit v4l2loopback device access and an isolated PipeWire server for an A/V measurement. A successful tools/list response alone does not prove video or device readiness. Record and stream tools require their corresponding output/service modules to be configured.
Closing stdin shuts down the server cleanly. Existing Tier 4 coverage remains
in `obs-tests-app` (`mcp_stdio`, feature `bundled-native`).
# Naming
One name per thing, so releases, crates and tags can't be confused (#320).
`ci/test_naming.py` checks the crate rules in `./lint`.
## Product
- Display name: **OBS-Studio-Rust**. Slug: **`obs-studio-rust`**.
- Release titles, artifact names and the app tag `obs-studio-rust-vX.Y.Z[-pre]`
use them. `--version` keeps the upstream OBS version ("based on OBS ...").
- The command-line client (an obs-websocket v5 client for streaming control)
is part of the product: crate and binary `obs-studio-rust` in
`rust/obs-studio-rust/`. It gets no tag family of its own: published
binaries go on the app's `obs-studio-rust-v*` releases.
## Repository layout (#1051)
- **The upstream tree stays where upstream has it:** `libobs/`, `libobs-*/`,
`frontend/`, `plugins/`, `shared/`, `deps/`, `cmake/`, `test/`. We still
merge `upstream/master`, so C/C++ files are never moved to restructure;
fixes and ports edit them in place. The only rename is in place, to the
build-role names in [BUILD.md](../../BUILD.md) (`foo.c` to `foo.c.h`,
same directory and stem, in a `git mv`-only commit), which merges and
`git log --follow` still track. A path whose OS its name
doesn't say gets an entry in `ci/platform_paths.py`, not a rename.
- **All Rust lives in the `rust/` Cargo workspace**, one crate per ported
component (`rust/tools/` is excluded). The table below is where a port goes.
- **Host code in C** stays in the OS-named files upstream already has. Each
libobs area has one host facade: `util/platform.h` for `libobs/util/`, and
`libobs/obs-host/` for the libobs core, with one header per capability
(`com.h`, `graphics-thread.h`, `shared-texture.h`, ...). A host that has
the capability defines it in its own file (`obs-windows.c`, `obs-nix.c`,
`obs-cocoa.m`). A host that lacks it includes `obs-host/noop/.hpp`
at the end of its host file (`obs-nix.c.h`, ...; see [BUILD.md](../../BUILD.md)),
so no `#ifdef` picks between them.
This is the C form of a crate's `src/platform/mod.rs`.
- **When a C component is fully ported**, its C sources are deleted and its
CMake target links the Rust staticlib. No moved copy of the C is kept in
the product tree; the one exception is the differential-test oracle copy
under `rust/obs-c-oracle/legacy/` that the
[testing policy](testing-policy.md) (Tier 3) requires.
- **Later, not now:** once we stop merging upstream, the remaining C/C++
(mostly `frontend/` and `plugins/`) may move under one root directory in a
single mechanical PR (only `git mv` plus CMake, CI and docs paths), landed
in a quiet window, under a neutral name (libobs is C, not C++). That gets
its own issue.
| C/C++ component | Rust crate |
|---|---|
| `libobs/util/` | `rust/obs-util` |
| `libobs/graphics/`, and the units extracted from `libobs/graphics/graphics.c.h` (`graphics-sprite.c.h`, `graphics-immediate.c.h`, `texture-planar-creators.c.h`, `indexbuffer-create.c.h`, `present-entrypoints.c.h`, `raster-state-entrypoints.c.h`, `state-blend-setters.c.h`, `matrix-entrypoints.c.h`), `libobs/graphics/effect-parser.c.h` (`effect-param-types.c.h`, `effect-param-numbers.c.h`, `effect-parser-blocks.c.h`, `effect-parser-compile.c.h`, `effect-parser-entry.c.h`, `effect-parser-funcs.c.h`, `effect-parser-params.c.h`, `effect-parser-passes.c.h`, `effect-parser-writer.c.h`), `libobs/graphics/shader-parser.c.h` (`shader-param-values.c.h`, `shader-parser-blocks.c.h`), `libobs/graphics/graphics-ffmpeg.c.h` (`graphics-ffmpeg-orient.c.h`, `graphics-ffmpeg-rgba64.c.h`, `graphics-ffmpeg-route.c.h`, `texture-file-data2.c.h`) and `libobs/graphics/graphics-ffmpeg-host-windows.c.h` (`graphics-ffmpeg-host-pq.c.h`, `graphics-ffmpeg-host-wic-checks.c.h`) | `rust/obs-graphics` |
| `libobs/media-io/` | `rust/obs-media-io` |
| `libobs/obs-nal.c`, `obs-avc.c`, `obs-hevc.c`, `obs-av1.c` | `rust/obs-codec` |
| `libobs/obs-data.c` | `rust/obs-data` |
| `libobs/obs-properties.c` | `rust/obs-properties` |
| `libobs/obs-hotkey-name-map.c`, `obs-hotkey-bindings.c.h`, `obs-hotkey-translations.c.h`, `obs-hotkey-owned-translations.c.h`, `obs-hotkey-press.c.h`, `obs-hotkey-pair.c.h`, `obs-hotkey-save-load.c.h`, `obs-hotkey-binding-press.c.h`, `obs-nix-hotkey-state.c.h`, `obs-nix-portal-shortcut-ids.c.h`, `obs-nix-portal-shortcut-sets.c.h`, `obs-nix-portal-shortcut-status.c.h`, `obs-nix-wayland-key-names.c.h`, `obs-nix-wayland-keys.c.h`, `obs-nix-wayland-seats.c.h`, `obs-nix-x11-hotkeys.c.h`, `obs-nix-x11-input.c.h`, `obs-nix-x11-keys.c.h`, `obs-cocoa-keys.c.h`, `obs-windows-keys.c.h`, `obs-key-combination-host-posix.c.h` | `rust/obs-hotkey` |
| `libobs/callback/` | `rust/obs-callback` |
| in-process MCP server (no C original, #3283) | `rust/obs-mcp` |
| `libobs/obs-missing-files.c.h` | `rust/obs-missing-files` |
| `libobs/obs-encoder-configuration.c.h`, `libobs/obs-output-delay.c.h`, `obs-output-interleave.c.h`, `obs-output-caption-text.c.h`, `obs-output-protocols.c.h`, `obs-service-getters.c.h`, `obs-encoder-roi.c.h`, `obs-encoder-clear-roi.c.h`, `obs-output-video-checks.c.h`, `obs-encoder-size.c.h`, `obs-encoder-audio-start.c.h`, `obs-output-stop-stats.c.h`, `obs-output-raw-audio.c.h`, `obs-output-slots.c.h`, `obs-encoder-gpu-gates.c.h`, `obs-encoder-bind.c.h`, `obs-encoder-lifecycle.c.h`, `obs-encoder-packet-ts.c.h`, `obs-encoder-pause.c.h`, `obs-encoder-group-reconfig.c.h`, `obs-encoder-gpu-rescale.c.h`, `obs-output-start.c.h`, `obs-output-begin.c.h`, `obs-output-stop.c.h`, `obs-output-reconnect.c.h`, `obs-output-pause.c.h`, `obs-output-caption.c.h`, `obs-output-raw-audio-trim.c.h`, `obs-encoder-audio-start-frames.c.h`, `obs-encoder-set-name.c.h`, `obs-output-conversion-setters.c.h`, `obs-output-packet-callbacks.c.h`, `obs-output-reconnect-callback.c.h`, `obs-output-encoder-getters.c.h`, `obs-output-update.c.h`, `obs-encoder-audio-buffers.c.h`, `obs-encoder-group-lifecycle.c.h`, `obs-encoder-init.c.h` | `rust/obs-output` |
| `libobs/obs-encoder-error-ownership.c.h`, `libobs/obs-encoder-packet-ownership.c.h` | `rust/obs-encoder` |
| `libobs/obs-encoder-registry-queries.c.h` | `rust/obs-output` |
| `libobs/obs-scene*.c.h` | `rust/obs-scene` |
| `libobs/obs-source*.c.h` | `rust/obs-source`; the C shims of the ports that call back into libobs through a seam (`libobs/obs-source-transition-access.c.h`, `libobs/obs-source-transition-restore.c.h`, `libobs/obs-source-transition-settings.c.h`, `libobs/obs-source-transition-size.c.h`, `libobs/obs-source-transition-slots.c.h`, `libobs/obs-source-transition-stop.c.h`, `libobs/obs-source-transition-switch.c.h`, `libobs/obs-source-transition-video.c.h` and `libobs/obs-source-transition.c.h` over `libobs/obs-source-transition-seam.h`, the rest of `libobs/obs-source-deinterlace.c.h` over `libobs/obs-source-deinterlace-seam.h`, and `libobs/obs-source-async-decoupled.c.h` over `libobs/obs-source-async-decoupled-fields.c.h` and the audio output shims) in `rust/obs-source-seam` |
| `libobs/audio-monitoring/` | `rust/obs-audio-monitoring` |
| `libobs/obs-audio-controls.c.h` | `rust/obs-audio-controls` |
| `libobs/obs.c.h` and the units extracted from it (`obs-video-plan.c.h`, `obs-context-names.c.h`, `obs-source-load.c.h`, `obs-core-setup-rules.c.h`, `obs-core-setup-rules-ms.c.h`, `obs-core-setup-rules-task.c.h`, `obs-shutdown-detach.c.h`), and those extracted from `libobs/obs-module.c.h` (`obs-module-init.c.h`, `obs-module-paths.c.h`, `obs-module-names.c.h`, `obs-module-locale.c.h`, `obs-module-source-rules.c.h`, `obs-module-type-rules.c.h`, `obs-module-load-rules.c.h`, `obs-module-load-rules-skip.c.h`, `obs-module-register-copy.c.h`, `obs-module-lists.c.h` (over `libobs/obs-module-lists-seam.h`), `obs-module-load-metadata.c.h`), `libobs/obs-view-api.c.h`, and `obs-video-copy-plan.c.h`, `obs-video-frame-copy.c.h`, `obs-video-frame-timing.c.h`, `obs-video-graphics-tasks.c.h`, `obs-video-output-step.c.h`, `obs-video-pacing.c.h`, `obs-video-stop-requested.c.h` and `obs-video-unmap-last-surface.c.h`, extracted from `libobs/obs-video.c.h`, and `obs-canvas-draw.c.h`, extracted from `libobs/obs.c.h` and `libobs/obs-display.c.h`, and `obs-canvas-rules.c.h`, extracted from `libobs/obs-canvas.c.h`, and `obs-nix-system-info.c.h` and `obs-nix-log-rules.c.h`, extracted from `libobs/obs-nix.c.h` (the second also holds the os-release rules from `libobs/obs-nix-os-release.h`), and `obs-win-crash-report.c.h`, extracted from `libobs/obs-win-crash-handler.c.h`, and `obs-windows-symbol-paths.c.h` and `obs-windows-system-info.c.h`, extracted from `libobs/obs-windows.c.h`, and `libobs/obs-audio.c.h` (the audio tick, over `libobs/obs-audio-seam.h`), and `libobs/obs-display.c.h` (the display, over `libobs/obs-display-seam.h`) | `rust/obs-core` |
| `plugins/obs-nvenc/` (CUDA/NVENC loader) | `rust/obs-nvenc`, linked through `rust/obs-nvenc-plugin` |
| GPU acceleration status (frontend, #846) | `rust/obs-gpu-status`, linked through `rust/obs-frontend` |
| Dock layout model (frontend, #5230) | `rust/obs-dock-layout`, linked through `rust/obs-frontend` |
| all libobs ports, as one C ABI drop-in | `rust/libobs-rust` |
A new libobs area gets a new `obs-` row here in the PR that starts it.
## Rust crates (`rust//`, directory name = package name)
| Kind | Name | Examples |
|---|---|---|
| libobs port | `obs-`, named after the libobs directory | `obs-util`, `obs-graphics`, `obs-media-io`, `obs-codec` |
| libobs staticlib (C ABI drop-in) | `libobs-rust` | |
| Plugin staticlib | `obs--plugin` | `obs-nvenc-plugin` |
| Frontend staticlib (the C ABI of the frontend's Rust crates) | `obs-frontend` | |
| C shims of a port that call back into libobs (linked only through `libobs-rust`) | `obs--seam` | `obs-source-seam` |
| Test oracle (dev-only) | `obs-c-oracle` | |
| Product binary | `obs-studio-rust` | |
No other crate takes a `-rust` suffix. A new tool is `obs-`.
## Tags
- OBS version tags (`X.Y.Z`, `X.Y.Z-betaN`, ...) come from upstream; every
`git describe` that names an OBS version matches only those
(`ci/test_describe_match.py`).
- `obs-studio-rust-v*` is the only tag family this fork adds. The retired
`obs-stream-rust-v*` tag (0.1.0, the CLI's old name) stays for history; no
new ones are cut.
# Public-header platform conditional audit (#878)
> The `docs/ci-evidence/` snapshots linked below are retired from `master`
> (#2686); each link resolves to the commit that last held the file
> (`c2af3f9c3`), and the commands quoted below name those paths as they were
> then.
Audited base: `c9b06b371e45833fb55b686b78904ae246311be9`. All 33 issue-listed platform conditionals remain in
14 headers. This change records their interface reasons and existing ratchet
protection; it changes no header, declaration, layout, inline implementation,
export or build option. The [machine-readable inventory](https://github.com/obs-rust/obs-studio/blob/c2af3f9c3e7945566b88440dffb14c255aeebd96/docs/ci-evidence/2026-10-21-public-header-conditionals.json)
records exact Git blobs, expressions and current line numbers.
## Protection and scope
- Seven headers already have reasoned entries in
`ci/platform-ifdef-exceptions.toml`. Those entries are unchanged. The exception
list only shrinks; this audit adds no exemption.
- The remaining seven have per-file limits in `ci/platform-ifdef-baseline.json`.
Keep these stricter bounds: device-exports.h (2), audio-math.h (2), base.h (1),
curl-helper.h (1), dstr.h (1), pipe.h (1), profiler.h (1). Their reasons are
recorded below and alongside the exception configuration.
- `graphics/device-exports.h` and `util/curl/curl-helper.h` are **not** in
`libobs/CMakeLists.txt`'s common `public_headers` list. The issue includes them
as header interfaces; this audit does not reclassify them as installed public
API or grant them a broad public-header exemption.
- The 33 count is the issue's host-conditional inventory, using the ratchet's
macro families. The ratchet also counts `` in graphics.h, giving
**34 findings**. Compiler-only branches such as nested `__MINGW32__` printf
archetype selection are retained too, but are outside that host count.
- Rust replacements do not remove the C header contract: external C/C++ callers
still compile these declarations and inline helpers. No header is rewritten
to accommodate a Rust implementation.
## Inventory
Line numbers refer to the audited base and are observations, not permanent IDs.
Expressions are recorded verbatim; the JSON retains unescaped text.
| Header and line | Conditional | Interface reason retained |
| --- | --- | --- |
| `libobs/graphics/device-exports.h:137` | `#ifdef __APPLE__` | Apple IOSurface/shared-texture device exports |
| `libobs/graphics/device-exports.h:142` | `#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)` | Linux/FreeBSD/DragonFly dma-buf device exports |
| `libobs/graphics/graphics.h:22` | `#ifdef __APPLE__` | Apple Objective-C runtime types |
| `libobs/graphics/graphics.h:481` | `#if defined(_WIN32)` | Windows gs_window hwnd member |
| `libobs/graphics/graphics.h:483` | `#elif defined(__APPLE__)` | Apple gs_window NSView id member |
| `libobs/graphics/graphics.h:485` | `#elif defined(__linux__) || defined(__FreeBSD__)` | Linux/FreeBSD gs_window X11 id/display members |
| `libobs/graphics/graphics.h:819` | `#ifdef __APPLE__` | Apple IOSurface/shared-texture API |
| `libobs/graphics/graphics.h:828` | `#elif defined(_WIN32)` | Windows GDI/shared-texture API |
| `libobs/graphics/graphics.h:890` | `#elif defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)` | Linux/FreeBSD/DragonFly dma-buf API |
| `libobs/media-io/audio-math.h:23` | `#ifdef _MSC_VER` | MSVC float declarations and warning push for inline audio math |
| `libobs/media-io/audio-math.h:41` | `#ifdef _MSC_VER` | MSVC warning pop paired with the push |
| `libobs/obs.h:431` | `#ifdef _WIN32` | Windows-only obs_init_win32_crash_handler export |
| `libobs/util/base.h:79` | `#if !defined(_MSC_VER) && !defined(SWIG)` | Format attributes on public variadic logging functions; disabled for MSVC/SWIG |
| `libobs/util/c99defs.h:26` | `#ifdef _MSC_VER` | Compiler-specific deprecation, noreturn and force-inline declarations |
| `libobs/util/c99defs.h:48` | `#if defined(_MSC_VER) || defined(__MINGW32__)` | Windows dllexport versus ELF/Mach-O default visibility |
| `libobs/util/c99defs.h:54` | `#ifdef _MSC_VER` | Compiler-specific diagnostic pragma macros |
| `libobs/util/curl/curl-helper.h:21` | `#if defined(_WIN32) && LIBCURL_VERSION_NUM >= 0x072c00` | Windows Schannel revocation-option macro for supported libcurl versions |
| `libobs/util/dstr.h:42` | `#ifndef _MSC_VER` | Format attributes on public string formatting declarations |
| `libobs/util/pipe.h:41` | `#ifndef _MSC_VER` | Format attribute on process_args_add_argf |
| `libobs/util/platform.h:37` | `#ifdef _WIN32` | Windows exported os_stat function versus stat macro elsewhere |
| `libobs/util/platform.h:203` | `#ifdef __APPLE__` | Apple ARCH_BITS selection |
| `libobs/util/platform.h:206` | `# ifdef _WIN32` | Windows ARCH_BITS selection inside non-Apple branch |
| `libobs/util/platform.h:207` | `# ifdef _WIN64` | Windows 64-bit versus 32-bit ARCH_BITS selection |
| `libobs/util/profiler.h:43` | `#ifndef _MSC_VER` | Format attributes on public profiler declarations |
| `libobs/util/sse-intrin.h:22` | `#if (defined(_MSC_VER) || defined(__MINGW32__)) && ((defined(_M_X64) && !defined(_M_ARM64EC)) || defined(_M_IX86))` | Native x86 MSVC/MinGW intrinsics versus SIMDe, excluding ARM64EC |
| `libobs/util/sse-intrin.h:29` | `#if defined(_MSC_VER) && defined(__cplusplus)` | MSVC C++ cmath dependency for SIMDe |
| `libobs/util/sse-intrin.h:33` | `#if defined(__APPLE__)` | Apple simd/base.h dependency |
| `libobs/util/threading.h:29` | `#ifndef _MSC_VER` | Non-MSVC errno dependency |
| `libobs/util/threading.h:41` | `#ifdef _MSC_VER` | MSVC intrinsics versus POSIX threading inline implementation |
| `libobs/util/threading.h:98` | `#ifdef _MSC_VER` | MSVC __declspec(thread) versus __thread storage declaration |
| `libobs/util/util_uint64.h:19` | `#if defined(_MSC_VER) && defined(_M_X64)` | MSVC x64 intrinsic declarations |
| `libobs/util/util_uint64.h:25` | `#if defined(_MSC_VER) && defined(_M_X64) && (_MSC_VER >= 1920) && !defined(__clang__)` | MSVC >=1920 native x64 _umul128/_udiv128 implementation excluding clang-cl |
| `libobs/util/util_uint64.h:30` | `#elif defined(_MSC_VER) && defined(_M_X64) && defined(__clang__)` | clang-cl x64 unsigned __int128 fallback |
## ABI preservation evidence
The audit has no compiled-code change. For this PR, exact Git identity of the
**entire libobs tree** against the audited base proves that its public headers,
implementation, exports and libobs build configuration are unchanged. This is
stronger than checking a subset of symbols or layouts for this documentation
change; it is not a claim that all possible C/Rust ABI parity is independently
revalidated here.
```sh
git diff --exit-code BASE HEAD -- libobs
uv run ci/platform_ifdef_ratchet.py
uv run python -m unittest ci.test_platform_ifdef_ratchet
```
Replace `BASE` with the audited commit above. Compare each recorded header's
blob with `git rev-parse HEAD:path` and the recorded `libobs_tree` with
`git rev-parse HEAD:libobs`. No public-header ABI checker is invented or skipped:
byte-for-byte identity is the ABI-preservation check for this no-code-change
PR. Native build and Rust port tiers are not applicable to documentation and
TOML comments.
## Outcome
All 33 issue-listed conditionals are recorded with their reasons and existing
per-file protection. No condition is moved, no broad exception is added, and no
baseline is raised. These branches remain under the documented public/header
interface policy; the wider #847 facade cleanup continues independently.
# Rust implementation release criteria
This is the decision for #141. A port is **complete** when the applicable
four testing tiers in [testing-policy.md](testing-policy.md) pass. It is
**shipped** when a release artifact uses that Rust implementation by default.
The normal developer/application build now links and installs the hybrid
`libobs`: completed Rust ports plus unported legacy C/C++. The C reference is
explicit testing infrastructure (`OBS_BUILD_C_REFERENCE=ON`), excluded from
normal builds and installation. `OBS_LIBOBS_BACKEND=C` is temporary rollback;
product identity (`OBS_BRAND_RUST`) does not select an implementation.
## Releasing the hybrid default
There is no manual approval file and no manual evidence review (#1818). A
release is published when the maintainer dispatches it and the automated CI
gates pass:
- **Nightly:** the daily `release-rust.yaml` run publishes a GitHub
**pre-release**, the rolling `continuous` AppImage and the nightly update
feed. Nightlies always build the hybrid backend (`OBS_LIBOBS_BACKEND`
default `HYBRID`); the packaging step fails if Rust is not linked into the
production libobs. Pre-releases are never Latest, so `releases/latest` and
the stable feed never offer them.
- **Public (blessed) release:** happens only when the maintainer dispatches
`release-rust.yaml` with `certify=`. That dispatch is the decision to
release; the `certify` job then runs only its automated checks
(`check-certifiable`) before marking the release Latest and updating the
stable feed. Agents never dispatch certify.
- **Stable release (1.0 and later):** the maintainer dispatches
`gh workflow run release-rust.yaml -f stable=true` on master. It tags
`obs-studio-rust-v` (the version in `rust/libobs-rust/Cargo.toml`,
no beta date) and runs the same gate, builds, smoke tests and AppImage as a
nightly, then publishes a pre-release. It refuses when the tag already
exists unless `repair=true`. Then certify it as above:
`gh workflow run release-rust.yaml -f certify=obs-studio-rust-v`
(the crate is 1.0.0 for the first stable release)
(`-f min_age_days=0` to skip the two-day wait). Nightlies keep
`-beta.`, which sorts *before* `` in semver; that is
harmless because nightlies are never certified, so the updaters never
compare one with a stable release. Bump the crate (for example to 1.0.1)
in a follow-up PR so later nightlies sort after the stable release. The
release `check` job enforces that ordering (`ci/check_release_version.py`):
a run whose version does not sort strictly after the newest stable release
fails before anything builds, with the crate bump that fixes it. macOS
`CFBundleVersion` is `YYYY.M.D` of the beta date, or of the UTC build date
for a stable release, so Sparkle always sees a newer build.
- **AppImage tag push:** attaches to the tag's release after the AppImage
build and its automated tests pass.
Every automated gate stays: the builds, Tier 2, the packaged-app smoke tests
and `check-certifiable`. The `OBS_LIBOBS_BACKEND=C` rollback stays available.
If something is broken, fix it forward fast with a new release. A failure a
release let through is a coverage gap: close it by adding an automated test
that would have caught it, not by adding a manual review step.
### Coverage targets without automated gates yet
The checks below were once manual release criteria. They are goals for new
automated tests, not release blockers:
1. **Compatibility:** Tier 2 with OFF and ON on Linux, macOS and Windows, x64
and arm64, plus identical exported public libobs symbols.
2. **Running application:** the unchanged obs-websocket Tier 4 suite against
the release artifact; a full-app launch on every release platform.
3. **Performance:** hot-path benchmarks within 10% and the full-app recording
workload within 5% of C (#142), checked automatically per release.
4. **Stability:** multi-day crash-signature tracking of nightly artifacts.
## Record C/Rust benchmark evidence (#142)
The Criterion suite lives in the test-only `obs-c-oracle` crate. It compares
production C ABI shims with the original C sources, compiled in the same
optimized benchmark executable. Run the fixture and ownership checks first:
```sh
soldr cargo bench -p obs-c-oracle --bench port_comparison -- --test
```
Record five complete runs and their median times, run-to-run ranges, and
per-run confidence intervals:
```sh
uv run rust/tools/benchmarks/record.py --cpu 7 --output baseline.json
```
`--cpu` pins the runner on Linux; omit it on systems without that affinity
API. The report records the CPU, affinity, OS, Rust/LLVM and C compiler
versions, relevant environment flags, command, and a SHA-256 fingerprint of
the benchmark and implementation sources. It also records `c_flags`, the
optimization and floating-point flags the oracle's C was compiled with.
The recorder refuses incomplete paired measurements and source changes during
measurement. Criterion's raw samples remain under
`target/criterion///`.
The bench profile is opt-level 3 for the Rust, as the shipped `release` static
library is, but the oracle's C is clamped to the level the shipped libobs C
gets (`-O2 -g` for GCC/Clang, `/O2` for MSVC; `rust/obs-c-oracle/build.rs`).
A `-O3` oracle vectorized audio loops that the shipped C leaves scalar, so a
baseline taken without the clamp made the Rust look 3–4× faster than the C
users run (#3127). `-ffp-contract=off` stays: Tier 3 compares bits with the
Rust, which never fuses, and a fused oracle would differ on arm64. The shipped
macOS arm64 C does fuse `a * b + c`, so a small shipped-C advantage there is
expected and is not a regression.
A full run needs every category in `record.py`'s `CATEGORIES`; the bench
units of the ports add their own groups, which are recorded too. For the
before and after numbers of one kernel (#3009), `--category` (repeatable)
runs and requires only the named categories:
```sh
uv run rust/tools/benchmarks/record.py --cpu 7 --category format --output format.json
```
`--max-ratio R` turns that report into a check: a pair whose median Rust/C
ratio is above `R` is printed and the run exits 1, so a known breach is
reproducible instead of a row to read (#3138). A pair the maintainer exempted
from the ratio bound is named in `record.py`'s `BOUND_EXEMPTIONS` with its
absolute cost, the machine it was measured on and the deciding issue; it stays
in the report, the gate prints it as exempt, and the 5% full-app bound above
still applies to it.
The SIMD candidates of #3009 are categories of their own: `format` (each
format conversion on a 1080p frame, against the shipped C and against the
same C on the plain-C SSE stand-ins), `volmeter` (sample and true peak of
one tick) and `audio_mix` (the mix add, and one output tick with the clamp
of 6 mixes).
The suite covers all exported bmem and vec2/3/4 shims, CRC at 64/4096/65536
bytes, dstr concatenation/safe formatting/replacement at 128/4096 bytes,
and the AVC/HEVC/AV1 parser entry points on structured synthetic packets.
AVC start-code cases scan a 256/16384-byte prefix. Packet comparisons include
the allocation's reference-count prefix and metadata. Allocating batches
hold at most 64 live outputs; allocation/free and reallocation have separate
timings. Setup and output cleanup for batched string/reallocation operations
are excluded, while codec timings include output cleanup.
Variadic `dstr_printf` remains C in both OFF and ON. Its two control cases
are labeled `printf_control` and excluded from Rust regression decisions.
The C string and codec oracles use the shared libobs allocator; bmem cases
compare the independent original C allocator with the Rust allocator. The
standalone oracle uses Cargo's optimized C build, without the full OBS C IPO
configuration. These measurements describe shim costs and synthetic inputs;
they do not establish full-application performance or caller inlining.
The report flags medians above the existing **1.10 Rust/C time ratio**. That
classification is descriptive, not a claim of statistical significance.
Inspect confidence intervals and run-to-run variation, and reproduce on
release hardware before making a default-flip decision. The 5% recording
workload bound and the other release gates above still apply.
### Recorded baseline
The [2026-10-14 baseline](benchmarks/baseline-2026-10-14.json) records five
runs of 70 paired comparisons on a Ryzen 7 3700X, pinned to CPU 7, using
Rust 1.98.1 and GCC 15.2.0. Twenty-one measured medians exceed the 10%
bound. The largest is `dstr/safe_printf/4096`: 59.47 times the C median,
with paired run ratios from 57.96 to 67.83. These results identify work
needed before the default flip; they do not satisfy its performance gate.
### Cross-language LTO investigation
The Linux x86_64 ON probe used Rust 1.98.1 (LLVM 22.1.8), Clang/LLD
22.1.2, ThinLTO on C/C++, and Rust linker-plugin LTO. This follows the
[rustc cross-language LTO instructions](https://doc.rust-lang.org/rustc/linker-plugin-lto.html).
With the usual OBS Linux build dependencies installed, reproduce with:
```sh
printf '#!/bin/sh\nexec soldr cargo "$@"\n' > /tmp/obs-cargo-soldr
chmod +x /tmp/obs-cargo-soldr
export RUSTUP_TOOLCHAIN=1.98.1
export RUSTFLAGS='-Clinker-plugin-lto -Crelocation-model=pic'
cmake -S . -B build-lto -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang-22 -DCMAKE_CXX_COMPILER=clang++-22 \
-DCMAKE_C_FLAGS=-flto=thin -DCMAKE_CXX_FLAGS=-flto=thin \
-DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=lld-22 \
-DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=lld-22 \
-DRust_CARGO=/tmp/obs-cargo-soldr \
-DENABLE_FRONTEND=OFF -DENABLE_UNIT_TESTS=ON \
-DENABLE_BROWSER=OFF -DENABLE_WEBSOCKET=OFF -DENABLE_AJA=OFF \
-DENABLE_WEBRTC=OFF -DENABLE_NVENC=OFF -DENABLE_FFMPEG_NVENC=OFF \
-DENABLE_QSV11=OFF -DENABLE_VST=OFF -DENABLE_SCRIPTING=OFF \
-DENABLE_VLC=OFF -DENABLE_NEW_MPEGTS_OUTPUT=OFF
cmake --build build-lto --target libobs -j4
```
The stock configuration stops on Clang warnings treated as errors:
double promotion in `obs-data.c` and a missing format attribute in
`graphics.c`. To investigate the linker independently, the experiment
added `-Wno-error=double-promotion -Wno-error=missing-format-attribute` to
both C/C++ flag strings. This reached the shared-library link, which failed:
```text
ld.lld: error: relocation R_X86_64_TPOFF32 against thread_graphics
cannot be used with -shared
```
The linker command included `-fPIC` and `-shared`; inspected C and Rust
bitcode both recorded PIC level 2. Repeating with
`--target=x86_64-unknown-linux-gnu` in both C/C++ flag strings to match
Rust's target triple produced the same relocation failure. Its cause is
unresolved. Cross-language LTO is therefore not enabled by this change,
and no LTO performance improvement or successful full ON build is claimed.
The warning downgrades were confined to the probe. A future LTO change
must resolve the build failures and pass the normal compatibility gates
before its performance can be compared with this baseline.
## Record full-app recording evidence (#1305)
The 5% recording bound needs runs of the real application on release
hardware, not shim benchmarks. Use a hardware renderer (never llvmpipe or
Xvfb), one saved scene and profile, the same build for both backends (the
explicit C reference or installed hybrid `libobs`, selected by the
library path), and no profiler in the timed runs.
1. Before each run, OBS must be running with the backend under test. The
run checks the OBS log and the mapped libraries first
(`ci/recording_evidence_check.py`) and refuses a software renderer, the
other backend or libraries from outside `--prefix`.
2. Record one run:
```sh
uv run rust/tools/benchmarks/recording.py run --log --pid \
--libobs rust --prefix --encoder obs-nvenc --seconds 120 \
--ws-config --delete-recording --output rust-1.json
```
3. Restart OBS with the other backend and record again. Interleave the
backends (C, Rust, C, Rust, ...) until each has at least five runs.
4. Compare:
```sh
uv run rust/tools/benchmarks/recording.py report c-*.json rust-*.json --markdown report.md
```
The report refuses runs with different conditions (video settings,
recording profile, scene, source version, renderer, graphics module) or
two builds of one backend. It gives the median and range of the frame
render time, CPU, and the render, output and encoder skip rates per
backend, and the Rust/C ratio. Exit code 2 means the gate failed. Each run
JSON also keeps the raw per-second samples and the encoder log lines.
## Retire the C implementation of a unit
Keep the original C file while reference testing and temporary rollback need it.
After one stable hybrid release, a separate PR may retire the
C fallback for a unit only when the supported C rollback build remains linkable
through another implementation or the C rollback option itself is retired. That PR
must show the unchanged C tests, public symbol/layout checks, and Tier 3
parity on the supported configurations. Move the original C source to
`rust/obs-c-oracle/legacy/` in the same PR, update the oracle wrapper to use
it, and keep differential tests running. Preserve the file's upstream
copyright and license notices. Removing a production C file must not silently
remove the behavioral baseline used to test its Rust replacement.
## Certified releases (in-app updates)
Every daily beta from `release-rust.yaml` is published as a GitHub
**pre-release**, after the release gate and every platform build pass. It is
never marked Latest, and the in-app updaters never offer it.
A **certified** release is a daily beta a maintainer promotes to a full
release:
```sh
gh workflow run release-rust.yaml -f certify=obs-studio-rust-v
```
The `certify` job accepts only a published `obs-studio-rust-v*` release
(published only after the gate). Its "Check the release" step runs
`ci/update_feed.py check-certifiable` (#1757), which refuses the tag unless:
- the `release-rust.yaml` run that published it (the newest run for the
tag's commit whose "Publish pre-release" job succeeded) concluded success,
with every job successful. Only the certify job and a reusable workflow's
own jobs (`Release gate 🚦 / ...`, `AppImage 📦 / ...`) may be skipped;
- the release has been out at least `min_age_days` days (default 2), so a
daily gets two days of use as a beta first. For an emergency,
`-f min_age_days=0` skips the age check and logs a warning.
It then checks its assets against `SHA256SUMS`, and
runs `ci/update_feed.py`. That script writes the Sparkle appcasts
(`updates__v2.xml`, DMGs signed with `OBS_RUST_SPARKLE_PRIVATE_KEY`),
the Windows `manifest.json` (ZIP URL, SHA-256 and size) and `branches.json`,
both with `.sig` files signed by `OBS_RUST_UPDATE_RSA_PRIVATE_KEY`. The job
uploads them to the release, and only then clears the pre-release flag and
marks it Latest. Both updaters read
`https://github.com/obs-rust/obs-studio/releases/latest/download/`, which
GitHub resolves to the newest full release. Certify a build only after a
maintainer has run it. Certifying an older release makes it Latest again,
but an app newer than that release won't downgrade.
### Stable, nightly and certify
| Channel | Who gets it | Feed | Written by |
|---|---|---|---|
| `stable` (default) | everyone | `releases/latest/download/` (the Latest release) | the `certify` job, on a maintainer's dispatch |
| `nightly` (opt-in) | users who pick **Nightly** under Settings > General > Updates > Update Channel | `releases/download/continuous/` (the rolling `continuous` pre-release) | the `nightly_feed` job, after every published daily |
1. **Daily:** each day `release-rust.yaml` publishes `obs-studio-rust-v`
as a pre-release once the gate and every build pass. Its `nightly_feed`
job then runs `ci/update_feed.py build --channel nightly` and uploads the
result onto `continuous`: Sparkle appcasts whose items carry
`nightly`, and a `manifest.json` (+
`.sig`) with `"channel": "nightly"`, all naming the daily's own assets. It
is signed with the same two secrets. Without them the job skips with a
warning and the daily still succeeds (#1759).
2. **Certify:** at least two days later, a maintainer runs
`gh workflow run release-rust.yaml -f certify=` (add
`-f min_age_days=0` only in an emergency). The gate above checks the run
and the age, then the stable feed goes up and the release becomes Latest.
3. **In the app:** the update channel lives in the global config
(`[General] UpdateBranch`, default `stable`). `nightly` is built into the
app, next to `stable`. Any other value (an upstream `beta`) falls back to
stable. On Windows the updater reads `manifest.json` from the channel's
feed. On macOS the Sparkle delegate reads the channel's appcast and
allows only that channel, so a stable app never takes a nightly item.
Switching from nightly back to stable never downgrades: the app waits for
a certified release newer than the nightly it runs. Every feed and
download URL must be under `https://github.com/obs-rust/obs-studio/`
(`ci/test_no_upstream_updater.py`).
# Rust Port Testing Policy
**Status:** Mandatory. Every change that ports C/C++ code to Rust MUST follow
this policy exactly. If a rule cannot be followed for a specific unit, stop and
record the exception on the tracking issue under **Decisions:** (the format
[coordination.md](coordination.md) §2 uses) before writing code; do not
silently deviate.
## Goal
OBS Studio keeps its **existing public API**, but its internals are rewritten
in Rust. Concretely, the following stay compatible:
- The **libobs C API and ABI**: every `EXPORT` function signature, every public
struct layout, and every public header under `libobs/`. Existing plugins and
the frontend must compile against the unchanged headers and work unmodified.
- The **obs-websocket v5 protocol**, byte-for-byte on the wire.
- The frontend API (`obs-frontend-api`), scripting bindings, and the
`window.obsstudio` browser-source API.
### Public and internal boundaries
Public headers, exported symbols, opaque-handle behavior, and public struct
layouts are compatibility contracts. `obs-internal.h` is a private header,
not a public ABI contract: its layouts may change when the C users of a field
have been ported or moved behind an internal accessor. Inventory those users
before changing a field. Adapt remaining C callers in a separate,
behavior-neutral commit or PR, with the existing C tests still passing;
then port the isolated unit. Do not edit a public header or an existing C test
to accommodate the Rust implementation.
This distinction matters for Phase 6. Core files share `obs-internal.h` by
direct field access, while `obs-data.h` exposes opaque handles whose layouts
live only in `obs-data.c`. The first core seam is `obs-data.c`, after its C
behavior has been characterized. Large files enter through the function
extraction workflow below: extract a C unit verbatim and land that change
before replacing the extracted file with Rust. The four tiers still apply to
each resulting unit, including symbol parity and differential tests.
Tests exist to prove two separate things: that the Rust code is correct, and
that it is a drop-in replacement for the C code it replaces. One kind of test
cannot prove both, so every ported unit carries the four tiers below.
## The four tiers
### Tier 1 — Rust unit tests (correctness of the Rust core)
- Written in Rust with `#[test]`, against the **safe Rust API** (no `unsafe`,
no FFI types).
- Every assertion in the existing C test for that unit (if any) is ported 1:1
into Rust, in a test whose name references the C test it mirrors.
- New edge cases are added here.
- Run with `soldr cargo test`.
### Tier 2 — Existing C tests against the Rust implementation (API/ABI compatibility)
- The existing C tests (`test/cmocka/*.c`, and any other C/C++ test for the
unit) are **kept and never rewritten or edited** to accommodate the port.
They are the compatibility check.
- The Rust crate exports the original C symbols through a thin
`#[no_mangle] pub extern "C"` shim with `#[repr(C)]` structs. The shim only
converts types and delegates to the safe core; it contains no logic.
- The **existing public C header is the source of truth** for the public ABI.
Do not generate a replacement header or edit the public header as part of a
port.
Public struct layouts MUST match the C layout exactly, including any
awkward field types (e.g. `uint8_t pos` stays `u8` at the C boundary even if
the safe core uses `usize`).
- A layout test MUST assert `size_of`, `align_of`, and every field offset of
each `#[repr(C)]` struct against values measured from the real C header
(via the oracle crate, see Tier 3).
- The normal application builds, links and installs **hybrid `libobs`**: the
completed Rust implementations plus unported C/C++. Replaced C sources are
excluded from this target. Rust is required; a missing toolchain is an error.
- Compatibility validation explicitly enables `OBS_BUILD_C_REFERENCE=ON` and
builds `libobs-c-reference` as well. It is excluded from the default build,
never installed, and shares the unported object library with production.
Both binaries retain identical public symbols, file names and ABI versions.
The unchanged tests pass against **both**: mode `OFF` loads the C reference,
mode `ON` loads production hybrid `libobs`. These mode names belong to the
test harness; branding does not select the implementation.
- Each port moves its C file's `#include` into a ported unity group
(`libobs/build/libobs.ported-*+.h.c`), selected by the canonical
`libobs/build/source-sets.d/`, or registered in the port's own
`libobs/build/ported-source-sets/.json` with any per-group compile
options and headers (BUILD.md, #3236), so the port edits no shared CMake
file. The reference keeps compiling that group;
production links the Rust replacement. Keep C reference/oracle sources during
migration; their exclusion from production does not end parity coverage.
- Hybrid `libobs` MUST export exactly the C reference's dynamic symbols:
no missing C symbols or leaked Rust internals. Keep platform export controls.
- Run `rust/tools/linux-validate/run.py` to check both requirements. It builds
once in Docker, runs the cmocka tests against each libobs, and diffs the
exported symbols. PR CI's Tier 2 jobs run it and satisfy this requirement;
paste its summary into the PR only if you ran it locally.
- Tests for the C boundary are written in C (they already are). Do not add
C++ tests for C APIs.
- Memory that C code later frees or resizes (e.g. darray buffers) MUST be
allocated with libobs `bmalloc`/`bfree`, declared once in
`rust/obs-util/src/ffi/darray.rs`.
- `bmalloc`/`bfree` are now the Rust bmem port
(`rust/obs-util/src/ffi/bmem.rs`, re-exported from `ffi/darray.rs`). Under
`cargo test`, the base/platform symbols they and the oracles need come from
the oracle crate (`oracle/test_stubs.c`, `oracle/file_serializer_host.c`,
`oracle/platform_conv_host.c` and the real `util/base-variadic.c`), linked
by every obs-util test via `use obs_c_oracle as _;`. Oracle copies of C
that is now ported (e.g. `util/utf8.c`) are compiled under `oracle_*` names
so they never clash with the Rust shims.
- C ABI shims for symbols libobs does not export (base.c internals, utf8) are
listed in their FFI module's own fragment,
`libobs/cmake/rust-hidden.d/-.txt`, instead of
`rust-exports.d/`. `libobs/cmake/rust-hidden.cmake` (and `rust/obs-build`)
generates the ELF version script (`local:`) and the macOS unexports list
from the fragments and `rust-hidden-base.txt` at configure time; neither is
committed, so ports never edit a shared list (#3233), and a fragment-only
change runs CI on Linux only. `export_list.rs` checks that every shim is
exported or hidden and that each fragment names only its module's shims.
- Windows: Rust `#[no_mangle]` symbols are not dllexport, so every C ABI shim
symbol is listed in `libobs/cmake/rust-exports.d/-.txt`
(one fragment per FFI module, so ports don't edit a shared list), which
`libobs/cmake/rust.cmake` turns into `/EXPORT:` linker options.
`rust/obs-util/tests/platform/export_list.rs` fails if a fragment and the
`#[unsafe(no_mangle)]` functions in its `rust//src/ffi/.rs`
differ.
- macOS: the generated `rust-unexports-macos.txt` hides Rust internals with
`-unexported_symbols_list`.
- CI: `.github/workflows/build-project.yaml` runs the Rust tests on Linux,
macOS and Windows (job `rust-tests`). It runs
`rust/tools/linux-validate/run.py` (job `rust-linux-tier2`) and
`rust/tools/tier2-validate/validate.sh` / `validate.ps1` on macOS and
Windows (job `rust-tier2`). Each OFF/ON pair must export identical symbol
sets.
### Tier 3 — Differential tests against the original C (behavioral parity)
- The original C source is compiled into the Rust test build as an **oracle**
through the `rust/obs-c-oracle` crate (a dev-dependency only, built with
the `cc` crate). Oracle symbols are renamed with an `oracle_` prefix by a
wrapper `.c` file that `#define`s each exported name and then `#include`s
the original source file. The original file is not copied or modified.
- When the C ABI forces a behavior the safe API should not have (e.g. a
`uint8_t` position that wraps), make the core generic over it rather than
duplicating logic in the shim; see `Position` in
`rust/obs-util/src/bitstream.rs`.
- A `proptest` test feeds random inputs to both the oracle and the Rust shim
and asserts identical outputs and identical observable state.
- A mutation check is expected once per port: temporarily break the core and
confirm the differential test fails, and say so in the PR.
- Known, intentional differences from the C behavior (bug fixes) MUST be
listed in the test file and in the tracking issue, and the property test
must exclude exactly those inputs, no more.
- When a C source is removed from the production tree, move that original
source to `rust/obs-c-oracle/legacy/` (created by the first such removal;
it is the one allowed copy of ported C) in the same change and update its
oracle wrapper. Keep Tier 3 parity running; the production source's
deletion does not end the behavioral baseline. See
[release-criteria.md](release-criteria.md) for the release and rollback
gates before removing a C implementation.
### Tier 4 — Black-box protocol tests (external network API)
- Applies to obs-websocket and any other network-facing surface.
- Written against the running server over the wire, independent of the
implementation language. The suite MUST pass against the unchanged C++
obs-websocket plugin loaded by both libobs builds (the C reference and
hybrid). The plugin is never ported (AGENTS.md).
## Required workflow for each ported unit
1. **RED:** commit the Tier 1 port of the existing test (and new edge cases)
against stub implementations (`todo!()`), and show `soldr cargo test`
failing.
2. **GREEN:** implement the safe Rust core until Tier 1 passes.
3. Add the C shim, the layout test, and the Tier 3 differential test.
4. Move the C file's `#include` into a ported group (`libobs/build/libobs.ported-*+.h.c`,
[BUILD.md](../../BUILD.md)) and run `rust/tools/linux-validate/run.py`: the unchanged C tests pass against
`libobs-c-reference` and hybrid `libobs`, and the exported symbol sets are identical.
5. Record every intentional behavior difference in the tracking issue.
A port is not done until all applicable tiers pass. "Tier 1 passes" alone is
not done.
`CI Gate ✅` on `obs-rust/obs-studio` decides admission. Complete client evidence
from a verified org-member PR author and final HEAD signer can replace selected
PR checks under immutable-base policy; it is self-reported, not execution proof.
The merge queue always executes the selected heavy tiers on the combined result.
Missing/untrusted/partial/invalid proofs, forks and verifier/API errors retain real
selected PR checks, including clippy/Dylint on all six supported targets. Client
tooling is optional and strict refusal is opt-in; sign only after stamping.
Open a PR (a draft is fine) once the RED commit exists and let CI run the
tiers; running them locally first (`./lint`, `./unittest`, `local-gate run`)
is recommended, not required. The tiers, RED then GREEN, and the ban on
editing C tests or public headers stay mandatory.
## Extracting a function before porting it
If the unit to port is one function inside a larger C file,
Hybrid `libobs` cannot drop it, because the ported lists hold whole files.
1. First move the function verbatim into its own `.c` file in the same
directory.
2. Use a separate, behavior-neutral commit/PR that contains no Rust and changes
no signature, header, or behavior.
3. Add the new file to a libobs unity group (`libobs/build/`, [BUILD.md](../../BUILD.md)).
4. The unchanged C tests must pass.
5. Only then port the new file with the normal workflow, and move its
`#include` into a ported group.
Example: `os_get_path_extension` moves from `util/platform.c` to
`util/path-extension.c`.
## Characterization tests for units without C tests
If the C unit to port has no existing C test, Tier 2 has nothing to run. First
add a cmocka characterization test `test/cmocka/test_.c` that pins the
CURRENT C behavior, including odd or buggy behavior. Comment such cases as
"characterized, not endorsed".
- It lands in its own commit/PR BEFORE the port, contains no Rust, and passes
against the C reference and hybrid `libobs` (nothing is swapped yet).
- From then on it is an existing C test under Tier 2: the port may not edit
it. Tier 1 ports its assertions 1:1 into Rust.
- Register it in `test/cmocka/CMakeLists.txt` and add it to the `cmocka-tests`
aggregate target like the others.
- If the C source is not exported from libobs (e.g. `util/utf8.c`), compile
that C source into the test executable, as `test_formatted_filename` does.
The test must then be marked as characterizing the C source only: it cannot
exercise the Rust swap until the symbol is reachable.
- Use only portable behavior, or guard platform-specific cases with
`#ifdef _WIN32` / `#ifndef _WIN32`.
- Don't call `fail_msg()` in a test that Windows builds: it expands to
cmocka's private `cm_print_error()`, which the Windows cmocka does not
export, so the test fails to link (LNK2019, #1580, #1713). Print the
diagnostic with `fprintf(stderr, ...)` and then call `fail()`.
`ci/test_cmocka_windows_diagnostics.py` (Fast Gate) catches the call; it
is a source check for this one symbol, not proof that the test links on
Windows (#1739).
- A PR's green checks prove only the lanes its paths selected. A shared
`.c` test selects Linux Tier 2, not Windows or macOS, so don't claim a new
test builds everywhere unless a native Tier 2 run built it.
### Port order for Phase 3 (pure leaf utilities)
1. `crc32`
2. `utf8`
3. `lexer.c` / `cf-lexer.c` / `cf-parser.c`
4. `text-lookup.c`
5. `dstr.c`
6. `base.c` (done: the variadic `blog`/`blogva`/`bcrash` stay in
`util/base-variadic.c`). `cf-lexer.c` / `cf-parser.c` from step 3 are
deferred to a follow-up.
7. `bmem.c` last: a wrong allocator breaks every other Tier 2 run.
- The `utf8` and `dstr` Tier 3 parity tests MUST generate arbitrary byte
strings, including invalid UTF-8.
- The `bmem` port MUST match the 32-byte alignment, the
`bmalloc`/`brealloc`/`bfree` hooks, and `bnum_allocs` accounting:
`brealloc(NULL, n)` counts as an allocation, and `bfree(NULL)` does not
decrement.
### Port order and rules for Phase 4 (stateful, I/O and platform utilities)
The characterization tests `test_file_serializer`, `test_config_file`,
`test_threading`, `test_task`, `test_pipe`, `test_profiler` and
`test_platform` land first (the first Phase 4 PR) and are thereafter unchanged
Tier 2 checks.
1. `file-serializer.c` and `buffered-file-serializer.c`
2. `config-file.c`
3. `task.c`
4. `profiler.c` (`source-profiler.c` is Phase 6 core work because it accesses
`obs-internal.h` and source/graphics state directly)
5. `pipe.c` / `pipe-posix.c` / `pipe-windows.c`
6. `threading-posix.c` / `threading-windows.c`
7. `platform.c`, then `platform-nix*.c` / `platform-windows.c`
- Every test that touches files uses its own temp directory, relative to the
ctest working directory, and removes it in teardown.
- No sleeps: synchronize on events, semaphores or joins. Before writing a test
that waits for frames or audio, read
[docs/knowledge/timing-tests.md](../knowledge/timing-tests.md): wait for the
result, not a frame count, and when the `timing` resource lock applies.
- Before writing a test that touches something OBS's destroy path frees, read
[docs/knowledge/test-leaks.md](../knowledge/test-leaks.md): free exactly what
that path frees, or the asan job fails on the leak.
- Threading tests MUST be deterministic: 100 consecutive runs without a flake.
Check it with the Tier 2 harness, which reruns the given tests in both the
OFF and ON builds after the normal run, stopping at the first failure
(`ctest --repeat until-fail:N`):
`rust/tools/linux-validate/run.py --repeat 100 --tests 'test_threading|test_task'`
(`tier2-validate/validate.sh` takes the same options on macOS;
`validate.ps1 -Repeat 100 -Tests '...'` on Windows).
- Linux Tier 2's [known-flaky registry](../../test/cmocka/known-flaky.txt)
is a merge-queue shield for tracked flakes, not an exemption from that
100-run determinism rule for new threading tests. Every entry requires a
test-name regex, an open issue number and a reason. The normal OFF/ON run
retries its failed tests once only when every failure is registered;
recovery emits a warning and step-summary line naming the test and issue.
An unregistered failure or a second failure still fails the job. Remove
entries when their tracking issues are resolved. Explicit `--repeat`
determinism runs retain their first-failure behavior and never retry.
- Tier 3 parity for I/O code runs the oracle and the Rust shim against
separate temp directories and compares the resulting files byte for byte,
plus the return values.
- The `config-file` parity test MUST cover arbitrary INI input, including
malformed lines.
- The threading and task ports add a loom or stress-style Rust test on top of
parity.
- Per-OS files are ported per OS. A port is done only when that OS's Tier 2
passes in CI.
### Port order and rules for Phase 5 (beyond util)
1. Graphics math in crate `obs-graphics`: `vec2.c`, then `vec3.c`, `vec4.c`,
`quat.c`, `matrix3.c`, `matrix4.c`, `plane.c`, `bounds.c`, `axisang.c`,
`math-extra.c`.
2. `media-io` in crate `obs-media-io`.
3. obs-websocket Tier 4 suite against the unchanged C++ plugin. Preserve it
as the compatibility check required by `AGENTS.md`; the earlier
[port proposal](websocket-port.md) is superseded.
- Tier 3 parity is exact bit equality (NaN == NaN) where the C is scalar and
deterministic. Only where the C uses SIMD (`vec3`, `vec4`, `matrix4` via
SIMDe) is a per-function ULP tolerance allowed; document it in the parity
test file.
- The bitstream parsers (`obs-avc.c`, `obs-hevc.c`, `obs-av1.c`) get
cargo-fuzz differential targets against the C oracle. Each runs at least 1
hour with no mismatch outside documented exclusions.
- These and the later targets (`nal_diff`, `config_ini_diff`) run nightly
through the local runner described in [fuzzing.md](fuzzing.md).
- Inputs that trigger C UB are excluded and listed. The `get_ue_golomb` UB is
already fixed in C (#11, #17).
- obs-websocket gets a Tier 4 black-box suite covering every v5 request type,
events, the auth handshake and error codes. It MUST pass against the
unchanged C++ plugin on both libobs builds; the plugin is never ported.
## Header-inline code (static inline functions and macros)
Code that lives entirely in a public header as `static inline` functions or
macros is compiled into every caller, so no symbol swap is possible.
- Exemption: Tier 2 for such a unit is (a) a layout test of every public struct
it defines (`size_of`, `align_of`, every field offset against the oracle) and
(b) the unchanged C tests passing OFF and ON.
- Do not modify the header.
- Tier 1 and Tier 3 still apply. The Rust equivalent, which Rust ports use when
they manipulate those structs, gets a 1:1 port of the C test plus a
differential test. That test runs against oracle wrappers that instantiate
the inline functions as non-inline `oracle_*` functions.
- This currently covers `util/darray.h` (the `struct darray` layout is the
contract), `util/deque.h` (`struct deque`), `util/serializer.h`
(`struct serializer`), and the `static inline` helpers in `util/dstr.h`
(the `struct dstr` layout is the contract).
`util/dstr.c` itself is ported with the normal workflow.
## Python runs through uv
Every Python invocation in this repo goes through `uv run` (or `uvx` for a
tool pulled from a package), never bare `python` or `python3`: `uv run
python -m unittest ci/test_x.py`, `uv run tools/leaderboard/generate.py`,
`uv run --with pillow python docs/images/generate-logo-assets.py SOURCE`. This
covers shell scripts, `./lint`, `./unittest`, `local-gate.toml`, workflows and
composite actions (which set uv up with the `astral-sh/setup-uv` step already
pinned in `build-project.yaml`), CMake `COMMAND`s, docstring usage lines and
Markdown code. Standalone scripts start with `#!/usr/bin/env -S uv run
--script` (with PEP 723 inline metadata when they need packages); a
shebang naming a bare interpreter is not allowed.
`ci/test_uv_run.py` scans every tracked file and fails on a bare invocation.
Its small, commented allowlist covers only trees we do not own (`deps/`,
`plugins/`). Do not extend it to dodge the rule.
## Layout and naming
```text
Cargo.toml # workspace root, members = ["rust/*"]
rust-toolchain.toml # pinned toolchain (required by soldr)
libobs/cmake/rust.cmake # Corrosion import + whole-archive link into libobs
libobs/cmake/rust-exports.d/ # C ABI shim symbols to export (Windows /EXPORT:), one file per FFI module
libobs/cmake/rust-hidden.d/ # shims hidden from libobs, one file per FFI module
libobs/cmake/rust-hidden-base.txt # Rust internals and C glue hidden on every linker
libobs/cmake/rust-hidden.cmake # generates the ELF version script and macOS unexports list
rust/
libobs-rust/ # the ONLY staticlib; re-exports every port's ffi
tools/linux-validate/ # Docker harness for Tier 2 (not a crate)
tools/tier2-validate/ # macOS/Windows Tier 2 (validate.sh, validate.ps1)
obs-util/ # ports of libobs/util/*
src/bitstream.rs # safe core (Tier 1 target)
src/{path_extension,darray,array_serializer,crc32,utf8,lexer,text_lookup,dstr,bmem,cf_tokenizer}.rs # more safe cores
src/ffi/bitstream.rs # extern "C" shim, #[repr(C)] types (Tier 2)
src/ffi/*.rs # matching shims for the cores above
src/platform/ # the only host-specific code (cfg_select!, unix/, windows/)
tests/suite.rs # the one obs-util test binary (Utilities category; see Test binary budget)
tests/containers/main.rs # a module of suite.rs, like config/, memory/, threading/, ...
tests/containers/bitstream.rs # Tier 1: 1:1 port of test/cmocka/test_bitstream.c
tests/containers/bitstream_layout.rs # Tier 2: struct layout vs. C header
tests/containers/bitstream_parity.rs # Tier 3: proptest vs. C oracle
obs-graphics/ # ports of libobs/graphics/*
obs-media-io/ # ports of libobs/media-io/*
../dylints/ # repo Dylints run by ./lint (not workspace members)
obs-c-oracle/ # dev-only: original C compiled with oracle_ prefix
build.rs
oracle/bitstream.c # #define renames + #include of libobs/util/bitstream.c
oracle/{path_extension,array_serializer,darray,crc32,utf8,lexer,text_lookup,dstr,dstr_libc,bmem,test_stubs,platform_conv_host,cf_tokenizer}.c
```
Port crates are plain `rlib`s. Only `libobs-rust` is a `staticlib`: each
staticlib embeds its own copy of `std`, so libobs must link exactly one. A new
port crate is added as a dependency of `libobs-rust` and re-exported there.
New libobs areas get their own crate under `rust/` named after the libobs
directory (`obs-util`, `obs-graphics`, `obs-media-io`, ...).
## Test binary budget
Minimize the number of Rust test executables that must be compiled and
linked. Use **one amalgamated test binary per category**. The inventory below
selects eight categories for the current workspace, including unit-test
harness coverage and integration tests. Eight is the result of this grouping,
not an allowance per crate. Prefer fewer when categories can share a harness
without losing meaningful separation.
The objective is fewer test compilation and link targets when building the
whole suite. The category binaries replace existing per-crate unit-test
harnesses and integration-test executables; they must not be added alongside
them. Moving only integration tests while leaving the same library unit-test
harnesses enabled does not complete consolidation. Production libraries
remain dependencies of the shared harnesses and retain their normal builds.
Do not compile an entire production source tree again through `include!` or `#[path]`
just to put its tests into an amalgamated binary: that would duplicate the
compilation we are trying to remove. The native build resolver is a narrow
exception: its small private helper and test share one source module with
the application harness, avoiding both a public test API and a second
compilation of the entire build engine.
| Category / selected binary | Existing suites and coverage to include |
| --- | --- |
| Utilities / `obs-util` library harness | All eight `obs-util` suites: config, containers, memory, platform, profiler, serializer, strings, threading; its inline platform tests; `obs-c-oracle/tests/oracle` oracle validation. |
| Core state / `obs-tests-core` | `obs-data/tests/data`, `obs-properties/tests/properties`, `obs-hotkey/tests/hotkey`, `obs-callback/tests/callback`, `obs-mcp/tests/mcp`, `obs-missing-files/tests/missing_files`, `obs-output/tests/output`, `obs-encoder/tests/encoder`, `obs-scene/tests/scene`, `obs-audio-monitoring/tests/audio_monitoring`, `obs-audio-controls/tests/audio_controls`, `obs-core/tests/obs_core`, `obs-source/tests/source`, and `obs-source-seam/tests/source_seam`. |
| Graphics / `obs-tests-graphics` | `obs-graphics/tests/linear`, `geometry`, and `shader`. |
| Media I/O / `obs-media-io` library harness | `obs-media-io/tests/audio`, `video`, and inline `video_output` tests. |
| Codecs and encoders / `obs-tests-codec` | `obs-codec/tests/codec` and `obs-nvenc/tests/nvenc`, including the NVENC plugin boundary coverage. |
| GPU status / `obs-tests-gpu` | `obs-gpu-status/tests/gpu_status`, including frontend adapter boundary coverage. |
| Preflight / `obs-tests-preflight` | `obs-preflight` CLI, FFI, and per-platform inline tests; `obs-preflight-ffi` boundary coverage. |
| Application / `obs-tests-app` | `obs-studio-rust/tests/cli`, including its CLI, JSON, and WebSocket client checks; `obs-build` native compilation contracts and private resolver check; feature-gated native libobs and `obs-sys` bundled contracts. Preserve the C++ OBS WebSocket plugin as required by AGENTS.md. |
Utilities and media use their library unit harness as the one category
executable. Their existing integration suites are modules in that harness,
so private unit tests retain access without extra binaries or exposed
internals. The other six categories use explicit integration targets.
`libobs-rust` remains the production aggregation library; its constituent
behavior belongs to the categories above. `obs-c-oracle` remains a shared
test dependency, not a separate executable. FFI adapters with no tests have
no empty harness. Fuzz targets, benchmarks, documentation tests, and unchanged
C compatibility executables retain their separate execution models.
Thread-safe cases run with libtest's normal parallelism. Serialize tests
sharing the profiler with their existing common lock. Tests that change
process-wide allocation counters, logging callbacks, or the working directory
must re-exec the same category executable with an exact test selector.
Pipe-spawning oracle checks also re-exec first: their C pipe-to-CLOEXEC
window must not overlap unrelated child spawns in this process.
File-replacement parity checks re-exec too: a concurrent Windows child can
inherit an open C stdio handle and prevent replacement after C closes it.
Crash probes also re-exec before forking, so they cannot inherit live pipe
handles from other tests. Do not serialize the whole suite or add another
compiled binary to obtain a clean process. Use `module_path!()` for exact
selectors so module regrouping cannot silently run zero child tests.
The application category retains `libobs-integration` and `bundled-native`
feature gates for expensive native contracts; these add cases to the same
executable, not new executables.
The preflight CLI parser lives in the safe engine's `cli` module, consumed
by its real executable and tested in the shared preflight suite. Its ABI
layout structs live in `ffi/types.rs`, consumed by the static C adapter and
the layout tests. Neither production source needs to be included a second
time in a test executable to retain those checks.
- Use the category map above to choose the shared test binary. A new test
file, test tier, feature, or crate does not by itself justify another
executable. Put cases in modules included by the component's harness.
- Keep every assertion, differential case, platform check, and required
test tier. This policy reduces executable count, not test-case count.
- Avoid empty or duplicate library/binary test harnesses. Disable them with
`test = false` only after their coverage is included in a shared harness.
- Count the harnesses Cargo actually builds for each supported platform,
including automatically discovered targets. Report documentation tests
and unchanged C compatibility executables separately; this Rust budget
does not remove either kind of coverage.
- Any necessary split must identify a distinct component or technical
isolation requirement and document why the existing categories cannot
accommodate it. Do not split binaries just because tests live in different
source files or crates.
`ci/test_binary_cap.py` discovers unit harnesses and integration targets from
manifests without requiring a Rust toolchain or compiling anything, including
implicit workspace path dependencies. It checks category ownership,
rejects duplicate and missing categories, and rejects any
extra unit or integration harness. Cargo metadata provides an independent
inventory check enforced by the lint lane on build hosts. The guard runs
through existing CI Python test discovery; `uv run ci/test_binary_cap.py --report` prints the inventory.
Use `soldr cargo test --workspace --locked` for the full suite. For focused
work, select the owning category, for example
`soldr cargo test -p obs-data --test obs-tests-core properties::` or
`soldr cargo test -p obs-util --lib tests::strings::`. A crate whose tests
belong to another category no longer has a separate executable. The fast
gate follows dev-dependencies too, so a change to that crate still selects
the category owner; `ci/test_rust_scope.py` guards these relationships.
Verify consolidation with Cargo's actual test target inventory and test
discovery before and after: all existing cases must still be discovered on
their supported platforms, and the old unit/integration targets must no
longer be built. Measure full-suite compilation and linking separately from
test execution. A smaller target count is the structural requirement; report
timing evidence before claiming a speed improvement.
## Test time
Decided on #2888. `ci/nextest.toml` gives every test a budget: nextest marks
it SLOW at 10 s and fails it at 30 s (`slow-timeout = { period = "10s",
terminate-after = 3 }`). The budget applies at the reduced parity level (PR,
merge queue, master push); the `full` level (local runs, nightly, release)
uses the `full` profile, which reports SLOW but times nothing out.
- A new test takes about 5 s or less in the CI debug build. Choose proptest
cases so that every branch is reached and every reported mutant is killed,
not as many as possible. A new test is not a reason for an exception.
- Proptest counts go through `obs_c_oracle::parity::cases(N)`; 2^32 sweeps
through `obs_c_oracle::parity::sweep(range)`, and large fixed grids skip
items with `obs_c_oracle::parity::keep(i)`. All three read
`OBS_PARITY_CASES`: everything at `full`, a fixed tenth at `reduced`. Keep
the edge values on every level, outside the sampled part.
- A test that needs more time gets a named `[[profile.default.overrides]]`
entry whose comment gives the reason and cites #2888 or its own issue
(`ci/test_nextest_budget.py`). The native build test (real compiles) is one.
- The budget covers nextest only. Tier 2 ctest and the `obs-c-oracle` benches
are not under it.
- Memory is reported, not capped: the PR's "Test cost" line (obs-worker §4)
gives the longest run, the peak RSS over 20 to 50 runs and the test's own
threads.
## Rules that apply everywhere
- Use `soldr cargo ...`, never bare `cargo`.
- The Rust toolchain is pinned in `rust-toolchain.toml` to the latest version
natively supported by the soldr version CI uses (`version:` of the
`setup-soldr` step in `.github/workflows/build-project.yaml`). Check what a
soldr release supports in its own `rust-toolchain.toml` (zackees/soldr, at
that tag). Never pin beyond it; bump the toolchain only together with, and
after, a soldr bump that supports it. The Tier 2 Docker image installs the
same pinned version (`rust/tools/linux-validate/run.py`). `./lint` enforces
this: `ci/test_toolchain.py` holds the expected version
(`SOLDR_SUPPORTED_RUST`) and fails if `rust-toolchain.toml`, the MSRV, or
any Dockerfile, workflow or doc pin differs.
- `soldr cargo clippy --all-targets -- -D warnings` and `soldr cargo fmt --check`
must be clean.
- **Cargo feature sets** (#2056). `--workspace` runs unify features, so they
build each crate only with the union of what its dependents enable (for
example `obs-util/gio` always on). `./lint` also runs clippy for each entry
of `FEATURE_SETS` in `ci/local_gate.py`, and `./unittest` runs the
`FEATURE_TEST_SETS` tests. `./lint` fails when a workspace feature is not
built both on and off by some clippy run. A new Cargo feature therefore
needs a `FEATURE_SETS` entry, or a `FEATURE_SET_EXEMPT` entry that says
why not and where it is checked instead.
- `unsafe` is allowed only in `src/ffi/` shims, in `obs-c-oracle`, and in the
Tier 2/3 test files that call C ABI functions. Each `unsafe` block has a
`// SAFETY:` comment. Every port crate denies the `unsafe_code` lint, so a
safe core cannot use it: `allow` is written only where the C boundary is
(the `ffi` module) and on the platform modules that must call the OS
directly (`obs_util::platform::windows`, `obs-media-io`'s `platform::unix`,
each saying why). Crates with no C boundary (`libobs-rust`,
`obs-studio-rust`) `forbid` it outright. Keep it that way when adding a
crate.
- **Platform boundary** (#323). Host-specific code lives only in the crate's
`src/platform/` module and in `src/ffi/` (the exported symbol set itself
differs per OS). `src/platform/mod.rs` is the crate's single host-selection
site: one `cfg_select!` that declares the per-OS children
(`platform/unix.rs`, `platform/windows/`, ...) and re-exports a neutral API
(types, functions, `const` flags, or a capability macro such as
`with_audio_thread_port!` for items that exist only on some hosts).
Everywhere else in `rust//src/`, host `#[cfg]`/`#[cfg_attr]`/`cfg!()`
(`windows`, `unix`, `target_os`, `target_env`, `target_arch`, ...) and native
paths (`std::os::{unix,windows,..}`, `libc::`, `windows_sys`) are errors.
`dylints/ban_platform_cfg_outside_boundary` enforces this in `./lint`
(`soldr cargo dylint --all -- --workspace --lib --bins`). It reads the
source before cfg expansion, so code compiled out on Linux is checked too;
that is what lets one Linux lint lane stand in for every OS. Out of scope:
`obs-c-oracle`, `rust/tools`, and `tests/`. There is no allowlist: move the
code into `platform/`, do not opt out.
- Do not add new GitHub Actions workflow files without explicit sign-off from
the maintainer. Hook tests into existing workflows instead.
- Do not edit a public C header, an existing C test, or an exported function
signature as part of a port. Changing the public API is a separate,
explicitly approved decision with its own issue.
# Troubleshooting your environment
Local runs are optional: PR CI is the merge gate
([coordination.md](coordination.md)). **If your environment fights you, open
the PR (a draft is fine) and let CI run.** A red local run caused by your
machine says nothing about your change.
`./lint` and `./unittest` print a one-line `hint:` that points here when they
see one of these errors.
## `soldr: IO error: Permission denied (os error 13)`
**Cause:** soldr cannot write its cache (`~/.soldr`) or the Cargo `target/`
directory. Usually one of them was created by another user, by `sudo`, or by a
container running as root, or `target/` is shared between users or runners.
**Fix:** give the directories back to your user:
```sh
sudo chown -R "$(id -u):$(id -g)" ~/.soldr target
```
Don't run the gate with `sudo`. On a self-hosted runner, give each runner
user its own home directory and checkout instead of a shared `target/`.
## `soldr: command not found`
**Cause:** soldr is not installed, or not on `PATH` in this shell. The gate
runs every Rust tool through soldr (AGENTS.md), so bare `cargo` is not a
substitute.
**Fix:** install it with `uv tool install --upgrade soldr`
([zackees/soldr](https://github.com/zackees/soldr)), then open a new shell or
run `uv tool update-shell` so uv's tool directory is on `PATH`
(`command -v soldr` should print a path).
## `soldr: warning: disk space is low (… free)`
**Cause:** less than 10 GiB is free on the volume that holds the build. Builds
then fail in confusing ways (truncated objects, linker errors, Docker layer
errors).
**Fix:** run `soldr gc` to review and remove stale Rust target directories,
and remove only your own old Tier 2 build volumes: list them with
`docker volume ls --filter name=obs-rust-linux-validate-` and
`docker volume rm` the ones your clone created. Never run
`docker system prune` or `docker volume prune`: on a shared machine they
destroy everyone's warm caches. Check `bosn jobs` before heavy Docker work,
and leave bosn-owned volumes to bosn
([ci-tooling.md](../ci-tooling.md#bosn-docker-under-supervision)). Keep at
least 10 GiB free.
## Tier 2 fails against host packages (FFmpeg 7.1 and libobs needs 8.0)
`Could NOT find FFmpeg … (Required is at least version "8.0")`, or other
missing or too-old libraries.
**Cause:** Tier 2 was built natively against the host's packages. libobs
needs newer versions (FFmpeg 8.0) than many distributions ship.
**Fix:** Tier 2 runs in Docker. Use `./unittest` (or
`rust/tools/linux-validate/run.py`), which builds in an image with the right
dependencies. Don't run Tier 2 against host packages.
## `Cannot connect to the Docker daemon`
**Cause:** Docker is not installed, not running, or your user cannot use it.
**Fix:** start Docker, and add your user to the `docker` group (log out and
back in) so `docker ps` works without `sudo`. If you can't run Docker, skip
`./unittest` and let PR CI run Tier 2.
# obs-websocket v5 port boundary
**Superseded:** preserve the existing C++ OBS WebSocket plugin as a binary
compatibility check, per [AGENTS.md](../../AGENTS.md#obs-websocket-compatibility-directive).
The design below is historical and must not be implemented without an explicit
user request changing that directive.
This is the Phase 5 design decision for #147. Port the protocol and session
core first, behind the existing C++ plugin. Keep the WebSocket++/Asio listener,
OBS request and event handlers, plugin API, configuration, and Qt/frontend UI
in C++ during that stage. A whole-plugin rewrite would mix protocol behavior
with Qt and OBS lifecycle changes, making a Tier 4 failure hard to isolate.
## First Rust unit
The Rust core owns v5 message envelopes, Hello/Identify/Reidentify state,
authentication validation, subscription masks, request and batch validation,
response envelope construction, and protocol close/status codes. The C++
listener owns connections and passes frame bytes, opcode, and a stable opaque
session handle across a private C ABI. Rust returns owned response bytes or a
close code; a paired free function releases every returned buffer. The
boundary must not pass `nlohmann::json`, Qt objects, C++ exceptions, or OBS
object pointers into Rust. C++ dispatch callbacks execute the existing
request handlers and return serialized results; events still originate in the
existing C++ handler and pass through the core for subscription filtering and
envelope construction. Document ownership, buffer limits, and callback
reentrancy in the C ABI before implementing it.
The public `obs-websocket-api` and wire protocol stay compatible. The plugin
does not acquire a new public Rust ABI. Keep the existing C++ path buildable
behind a switch until the Rust path passes the gates below; remove it only
under the release and rollback criteria.
## Threads and lifecycle
WebSocket++ continues to run on its server I/O thread. Its message handler
may hand frames to the existing Qt thread pool. Each session is processed
serially, preserving Identify before requests and the current per-session
operation order. Distinct sessions may run concurrently. The Rust core owns
only session state and never calls Qt or OBS directly; the C++ dispatch layer
preserves the current main-thread routing required by individual handlers.
Batch execution keeps the current serial and parallel modes. Stop accepting
new work before draining workers and destroying sessions; no callback may
cross into a destroyed plugin or Rust core. Add concurrency and shutdown
tests alongside protocol tests, including disconnect during a batch.
## Security and acceptance
Fix #99 in the existing C++ path before swapping the parser. Bound both frame
size and JSON/MsgPack nesting depth before recursive parsing, including
pre-auth frames. Apply the same limits in Rust and add wire tests for both
formats at and beyond the limits. Reject malformed frames without crashing
the OBS process.
Use the unchanged `test/websocket-tier4` suite as the acceptance oracle. It
already passed 179 checks, including all 147 documented request types,
against the C++ server. Run it against the C++ and Rust paths using the same
OBS build/profile setup; compare envelopes, close and status codes, auth,
events, and batch behavior. Unit tests exercise pure Rust state and malformed
input; differential tests feed the same frames to both protocol cores where
deterministic. #140 supplies a full `ENABLE_RUST_LIBOBS=ON` OBS build and a
headless Tier 4 CI job. Keep the C++ baseline job while the Rust path is
being introduced, and run the Rust job before merging the swap. The local
gate remains `./lint`, `./unittest`, and the stamped local gate; Tier 4 is an
additional full-app gate for this port.
After this unit is stable, claim request-handler groups and event-handler
groups separately. Each group needs the applicable four test tiers and must
keep Qt/frontend access in a C++ adapter until that behavior has its own
acceptance coverage. Do not replace the listener or UI as part of the first
protocol-core PR.
---
type: concept
title: Which asan tests keep the slow allocation unwinder
description: "Distro FFmpeg has no frame pointers, so the fast unwinder stops at av_malloc; only tests that link FFmpeg keep the slow one, and a test the scan does not find stays slow."
sources: ["#2035", "#3249", "#3365", "#3456"]
status: active
---
# Which asan tests keep the slow allocation unwinder
## The trap
`fast_unwind_on_malloc=0` makes ASan unwind every allocation the slow way, which is
most of the time that allocation-heavy tests spend. `=1` is much faster, but it
follows frame pointers, and FFmpeg on ubuntu-26.04 has none. `objdump` of
libavutil and libavformat confirms this. So a leak allocated inside FFmpeg shows a
stack that stops at `av_malloc`, and triage cannot name an OBS location.
## How it showed up
- #2035: stacks cut at `av_malloc` led to the global `fast_unwind_on_malloc=0`.
- #3249: with `=1` for the whole pass, the unit tests took 302 s against 366 s, and
`test_context_names` went from 29 s to 2 s. The stacks of `test_media_alpha_network`
(#3365) went from 10 to 13 frames down to 2.
- #3456 then split it per test: `UnwindPolicy` in `rust/tools/sanitize/sanitize.py`.
## The rule
A test gets the fast unwinder only in the asan pass, and only when all of this holds:
- The scan of the test's build definition found it.
- It does not link `FFmpeg::*` or `OBS::media-playback` (`FFMPEG_LIBRARY`).
- It is not in `SLOW_UNWIND_TESTS`. `test_core_module_load` is, because it failed
24 of 30 runs under load with the fast unwinder (`XOpenDisplay` during hotkey
initialization, #3249). The cause is not known.
A test the scan does not find keeps the slow unwinder. The app launch always uses
the slow one.
## What to do instead
If a new leak's stack stops at `av_malloc` or looks cut off, check which unwinder
the test used before you look for a bug in the report. Do not add a frame-pointer
assumption about a system library without `objdump`: that assumption was wrong once
on #3249.
## Checks
`test_sanitize_harness.py` covers which tests keep the slow unwinder.
---
type: concept
title: Most asan builds start cold
description: "Only a master run saves the asan compiler cache, and the merge queue does not run asan, so check whether a run restored a cache before you compare its build time."
sources: ["#3249", "#2923", "#3129", "#3457"]
status: active
stale_after: 2027-02-01
---
# Most asan builds start cold
## The trap
An asan build time means little until you know its cache state. On 4 cores, a cold
build took 15 to 27 minutes and a warm one about 4. Cold times alone vary by
10 minutes between runs, so one run shows little about a change.
## Why the cache is often missing
- Only a run on master saves it (`Save zccache` in
`.github/workflows/sanitizers.yaml`), and on master only the nightly runs asan.
- No PR and no merge-queue run builds asan (maintainer directive 2026-11-09;
until then a PR that changed a ratcheted target's compile input did, #2923).
- A PR or a dispatch restores by prefix, so it takes the newest nightly's cache if
there is one.
- The cache can be gone hours after the nightly. On 2026-11-01 the 14:57 and 15:44
UTC PR runs hit it (build 4.3 minutes). From 19:59 UTC on, every run logged
`Cache not found`. The cause of that eviction is open (#3249).
- A hit is not always a warm build. Two runs on 2026-11-01 restored the same older
key and took 13.8 and 33.8 minutes.
## What to do instead
- Before you quote a build time, read the `Restore zccache` step of the job:
`Cache restored from key` or `Cache not found`.
- Compare the time between the log lines `== [asan] configure + build` and
`== [asan] unit tests`, not the job's total.
- Quote several runs, and say how many. To compare two changes, run them side by
side on the same machine.
## Why `stale_after`
This depends on the cache budget in `ci.toml`, the runners and the fix for the
eviction. Check it again after that date, or when #3249 closes.
---
type: concept
title: An asan failure on your PR
description: "What to do when the asan job fails a PR: fix the leak or the test, find out if the failure is yours, and why the known list is the last step and not the first."
sources: ["#3290", "#3563", "#3575", "#3576", "#3577", "#3370"]
status: active
---
# An asan failure on your PR
Since 2026-11-09 no PR runs asan: it runs nightly and on dispatch only. A nightly
failure, or a dispatch of `sanitizers.yaml -f tools=asan` for your branch (on a
separate ref, see [sanitizer-dispatch.md](sanitizer-dispatch.md)), is handled the
same way.
## The trap
The asan job fails a PR on any unit-test failure or sanitizer report (#3290). The
quick way to get a green run is to add the test to `KNOWN` in
`rust/tools/sanitize/triage.py`. The test still runs, but it can no longer fail
the job, so a real bug in it stays hidden. A test that can not fail tells nobody
anything. The goal for that list is zero entries.
## What to do instead
Do these in order:
1. Read the job's triage summary, then the test's log in the `sanitize-asan`
artifact (`tests/.log`).
2. A report that names your change is yours: fix it. A leak in a test goes in the
test ([test-leaks.md](test-leaks.md)). A leak in OBS goes in OBS.
3. A test that fails on timing: make it wait for its result
([timing-tests.md](timing-tests.md)).
4. A failure with no link to your change: look for an issue on that test. If
there is none, file one with the log, and rerun the job once
(`gh run rerun --job `). Do not rerun it again and again to get a pass.
5. The known list is the last step, for a test that keeps failing unrelated PRs
while its issue finds the cause. Never list a test your PR adds or changes.
"Flaky" is not a cause. #3576 is on a virtual clock, so a slow runner should not
change its result, and #3577 is a hang. Either can be a real bug. An entry stays
until the issue finds the cause, and the fixing PR drops the entry.
## How it showed up
#3563 failed asan on two different tests in two attempts, then passed on a later
attempt with no change to its code. It touched neither test. One failure was a
race in the test (#3575). The other (#3576) and a hang on another PR (#3577) have
no known cause yet.
## Checks
- `ci/test_sanitize_triage.py` `KnownListTest`: only `bug`, `third-party` and `tool` kinds are
allowed, each `bug` and `third-party` entry names an issue, and the number of entries matches
`KNOWN_ENTRIES`. To add an entry you
must raise that number, which shows in the diff for the reviewer. To drop one
you must lower it, so the number can not go stale.
- The rules for each kind are in [sanitizer-known-list.md](sanitizer-known-list.md).
---
type: concept
title: Float results depend on the host compiler
description: The CI runner's gcc contracts mul+add into an FMA and the Tier 2 image's gcc does not, so the same C source gives different float results.
sources: ["#3422", "#3362", "#3428", "#3489"]
status: active
stale_after: 2027-01-01
---
# Float results depend on the host compiler
## The trap
On the GitHub `ubuntu-26.04` runners, gcc fuses a multiply and an add into one
fused multiply-add (FMA) by default. In the Tier 2 Docker image, gcc 15.2.0
(the same version) defaults to `-march=x86-64` without FMA and emits a separate
multiply and add. Same source, same command line (only `-O2`, no `-march`,
`-mfma` or `-ffp-contract`), different machine code, different last bit.
## How it showed up
#3362 / #3422: `obs_source_transition_render_offset()`
(`libobs/obs-source-transition-render.c.h`) compiled to `vfnmadd231ss` in the
sanitizer job and to `mulss` + `subss` in Tier 2. `1920 - 1000 * 1.08f` is
`840.0` with the product rounded to `float` first, and differs in the last
bit when fused. A differential test that compares C and Rust exactly passed in
one place and failed in the other.
## What to do instead
- When a C-vs-Rust or golden comparison of floats differs only in the last bit
between hosts, suspect FMA contraction first; check the disassembly
(`objdump -d`) of the C function on both hosts before changing Rust.
- Rust does not contract `a * b + c` on its own, so every C build that is
compared with Rust or with golden floats compiles without contraction
(#3422, option B): the CMake test build (`-ffp-contract=off` on every C
and C++ target when `ENABLE_UNIT_TESTS` is on, in the Linux and macOS
`compilerconfig.cmake`), the test graph that `obs-build`
compiles (`configure_c_tests`), the C oracle (`rust/obs-c-oracle/build.rs`)
and the three sanitizer passes (`TOOL_FLAGS` in `sanitize.py`, #3428). MSVC
does not contract under its default `/fp:precise`.
- App and release builds keep the compiler default, so the shipped C may round
the last bit differently from the Rust port on a host that contracts. Don't
pin a shipped-build float result in a test.
- A new C test, oracle or parity build compiles with `-ffp-contract=off` too.
`test_float_contraction` has no flag of its own and fails when the CMake
test build loses it on a host that contracts (the hosted runners, macOS
arm64). Reproduce it locally with `-mfma`: `gcc -O2 -mfma` gives
`839.99994`.
## Why `stale_after`
The finding depends on the runner image and the Tier 2 image. Re-check it after
the date or any compiler/image bump, and update or retire this file.
---
type: index
title: obs-rust knowledge bundle
description: What agents and contributors learned about this codebase the hard way, one concept per file.
status: active
---
# Knowledge bundle
Lessons that cost someone hours to find and that the next worker would otherwise
find again. One markdown file per concept, in the core of the
[Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)
(OKF): YAML frontmatter with `type`, `title`, `description`, `sources`, `status`
and, where a decision can invalidate the finding, `stale_after`. Nothing beyond
that core. `./lint` fails when a file here has no frontmatter or no `type`,
`title` or `description` (`ci/knowledge_lint.py`). Decided in #3438 (from
discussion #3426); a normal PR review is enough to add a concept.
To add a concept, add its file and run `./lint --fix`, which writes the list below
from the frontmatter. Do not edit the list by hand. When two concept PRs collide
in the merge queue, rebase, run `./lint --fix` and push. Quote a `title` or
`description` that holds ` #`: YAML ends a plain value there.
**If it can be a check, the check is the rule.** A concept explains why a check
exists and links to it; it never replaces one. History that teaches nothing for
the next change stays in its issue or PR.
## When to write a concept
A lesson goes in its own PR, after the code PR has merged and the result is known.
That PR cannot eject the code from the merge queue, and it can quote what really
happened. Text that describes what the code PR changes, such as a new setting,
stays in the code PR.
## Correcting a concept
1. Each claim names what can recheck it: the code path, the check, a CI run or a
command.
2. A correction changes the same file in a normal PR and adds its evidence to
`sources`. It replaces the wrong text, so a file never contradicts itself.
3. A claim that is wholly wrong is removed, or the concept gets `status: retracted`
with one line that says why and links the evidence.
4. A claim that was right but can change uses `stale_after` or `status`.
## Concepts
- [Which asan tests keep the slow allocation unwinder](asan-allocation-unwinder.md) — Distro FFmpeg has no frame pointers, so the fast unwinder stops at av_malloc; only tests that link FFmpeg keep the slow one, and a test the scan does not find stays slow.
- [Most asan builds start cold](asan-cold-builds.md) — Only a master run saves the asan compiler cache, and the merge queue does not run asan, so check whether a run restored a cache before you compare its build time.
- [An asan failure on your PR](asan-pr-failure.md) — What to do when the asan job fails a PR: fix the leak or the test, find out if the failure is yours, and why the known list is the last step and not the first.
- [Float results depend on the host compiler](host-compiler-float.md) — The CI runner's gcc contracts mul+add into an FMA and the Tier 2 image's gcc does not, so the same C source gives different float results.
- [Running sanitizers locally](local-sanitizers.md) — Asan or valgrind on a few tests through the harness on a local machine, and what valgrind costs per test.
- [A PipeWire loop stopped right after its start can hang](pipewire-stop-after-start.md) — pw_thread_loop_stop() can wait forever when the loop thread has not entered the loop yet (PipeWire 1.6.2). Wait for an event source's callback first (thread-loop.start-signal is ignored before PipeWire 0.3.77); a blocking pw_loop_invoke does not help.
- [Where a quit hang waits, from the last lines of the log](quit-hang-log-end.md) — When OBS does not exit after a quit, the last shutdown line in its log shows which step waits: the frontend, obs_shutdown, a module unload, or the process's exit handlers after 'Number of memory leaks'. For the exit handlers, the exit watchdog's line names the library and the plugin that loaded it; otherwise take the stacks and remove plugins one at a time.
- [Dispatch sanitizers on a separate ref](sanitizer-dispatch.md) — A `workflow_dispatch` of `sanitizers.yaml` on a PR branch cancels the run in progress there; dispatch on a separate ref.
- [The sanitizer known list](sanitizer-known-list.md) — The `bug`/`third-party`/`tool` kinds in `rust/tools/sanitize/triage.py`, the LeakSanitizer suppressions in `lsan.supp`, how to add an entry, and why a `bug` entry that runs clean fails the job.
- [A source's destroy runs later, on another thread](shutdown-deferred-destroy.md) — obs_source_destroy queues its work on the destruction task thread, so obs_shutdown can free what a queued destroy still uses; wait in a loop until the queue is empty.
- [Free what OBS's destroy path frees](test-leaks.md) — A test that skips OBS's destroy call leaks what that call frees, and the asan job fails on that since #3290.
- [Timing tests wait for the result](timing-tests.md) — Wait for the frame or packet you check, not a frame count or a fixed sleep; when a test needs the `timing` resource lock.
---
type: concept
title: Running sanitizers locally
description: Asan or valgrind on a few tests through the harness on a local machine, and what valgrind costs per test.
sources: ["#3290", "#3238", "#962", "#3485", "#3366", "#3489", "#3701"]
status: active
stale_after: 2027-05-01
---
# Running sanitizers locally
## The harness
`rust/tools/sanitize/sanitize.py` is what CI runs (`sanitizers.yaml`):
```sh
uv run --no-project rust/tools/sanitize/install_ubuntu_deps.py # Ubuntu, once
uv run --no-project rust/tools/sanitize/sanitize.py asan # or tsan / valgrind
uv run --no-project rust/tools/sanitize/triage.py rust/tools/sanitize/out/asan
```
It configures and builds OBS for the tool in `$SAN_OUT/build-` (default
`rust/tools/sanitize/out/`), runs every registered cmocka test under it, then
launches the app headless. Results go to `$SAN_OUT/`. `SANITIZE_JOBS`
sets how many tests run at once (`1` runs serially on one shared display);
`SKIP_TESTS=1` only relaunches the app.
`ZCCACHE_MAX_PARALLEL_COMPILES` sets how many files zccache compiles at once.
The harness does not set it: only `sanitizers.yaml` does, for the 4-core
runners, so a local machine with more cores keeps zccache's default or sets its
own value.
## A few tests
The harness has no test filter: one full run builds the tree and runs all ~670
tests (asan: about 5.5 minutes of tests on 4 cores). After that build, run just
the tests you care about from the same tree, with the harness's options:
```sh
ctest --test-dir rust/tools/sanitize/out/build-asan -R '^test_rtmp_send_batch$' --output-on-failure
```
with `ASAN_OPTIONS=detect_leaks=1:fast_unwind_on_malloc=0` (see
`SANITIZER_OPTIONS` in `sanitize.py`). For valgrind, build with the
`valgrind` tool (no per-target ASan: `-DOBS_TEST_SANITIZE_PER_TARGET=OFF`) and
run the test binary under the `VALGRIND` argument list from `sanitize.py`
(`--error-exitcode=99 --leak-check=full --errors-for-leak-kinds=definite ...`).
Exit 99 is a valgrind error, 77 is a skip.
`ctest -R` does not run a test the way the harness does. `run_one_test` in
`sanitize.py` gives each test its own Xvfb server and its own `*_OPTIONS` log
path, and the tests run side by side. In #3366 a test failed in the asan job and
passed in Tier 2. If `ctest -R` does not show a failure from the job, call
`run_one_test` from the built tree, then change one environment variable at a
time.
Run a timing-sensitive test alone and expect it to be slower than in Tier 2 (see
[timing-tests.md](timing-tests.md)).
## In a container
The harness does not know it runs in Docker. On a build machine:
- tsan needs `--security-opt seccomp=unconfined` on a recent kernel (7.0). Without
it, tsan stops with "incompatible memory layout, unable to disable ASLR".
- With `--cpuset-cpus`, `nproc` follows the limit, but Python's `os.cpu_count()`
does not, and that sets the test jobs. Set `SANITIZE_JOBS` too.
- `capture_hang` calls `sudo -n gdb` when the app does not exit. The linux-validate image has no
`sudo`, so the harness stops with `FileNotFoundError: 'sudo'`. Install it, or
relaunch with `SKIP_TESTS=1`.
- For a cold build, use a new `SAN_OUT` and `ZCCACHE_CACHE_DIR`.
tsan runs with `exitcode=0` and `rust/tools/sanitize/tsan.supp`: `triage.py` decides
from the reports, so a test is clean with exit 0 and no counted report. Reports with
no OBS frame are listed as external. `called_from_lib` for the glib family removes
about 1900 of them. Do not add Mesa: TSan then does not see Mesa's mutexes, and its
tests report about 3 times more (#3701).
asan runs with `LSAN_OPTIONS=suppressions=rust/tools/sanitize/lsan.supp`, for leaks
wholly inside a library (today one: FFmpeg 8.0.1's VP9-alpha probe, #3365). A local
FFmpeg past 8.0 does not have that leak, so the line matches nothing there.
tsan does not instrument Rust, so `-DOBS_RUST_TSAN=ON` (set by the harness) makes
the Rust primitives call `__tsan_acquire` and `__tsan_release`. A primitive
without them shows its hand-offs as data races in the C code (#3507).
## What valgrind costs
Measured in #3290 (4-core `ubuntu-26.04` runner): valgrind's unit tests took
53.8 minutes with 2 at a time, against 6.5 for asan on every core; serially
they did not fit the job's 150 minutes. More than 2 valgrind jobs on 4 cores
broke 9 tests on timing.
A few tests take most of that time. In the nightly run 41312715761, 524 of 666
tests took under 5 s (median 1.6 s), and the 9 tests of 60 s or more took 43 of
the 96 test minutes. Three of them hit the 600 s per-test limit:
`test_slideshow_mem_cap`, `test_output_filename_reserve` and
`test_audio_clock_drift`. So a handful of tests is cheap on a local machine, if
these are not among them.
`stale_after`: the numbers change with the runner and the test set; re-measure
from the latest `sanitizers.yaml` run after that date.
---
type: concept
title: A PipeWire loop stopped right after its start can hang
description: "pw_thread_loop_stop() can wait forever when the loop thread has not entered the loop yet (PipeWire 1.6.2). Wait for an event source's callback first (thread-loop.start-signal is ignored before PipeWire 0.3.77); a blocking pw_loop_invoke does not help."
sources: ["#3577", "#3596", "#2431"]
status: active
stale_after: "a PipeWire release that fixes loop_queue_invoke's check of impl->thread"
---
# A PipeWire loop stopped right after its start can hang
## The trap
`pw_thread_loop_start()` followed at once by `pw_thread_loop_stop()` can hang.
From PipeWire 1.6.2's source (`spa/plugins/support/loop.c`, `thread-loop.c`):
1. `pw_thread_loop_stop()` calls `pw_loop_invoke(do_stop)`.
2. `loop_queue_invoke()` reads `impl->thread` with no lock. If it is still 0, it
treats the caller as the loop thread, so `do_stop` runs on the caller, with no
wakeup.
3. The loop thread enters the loop, sees `running` still true, and goes into
`epoll_wait`.
4. The caller sets `running = false` and waits in `pthread_join`. Nothing wakes
the loop thread.
## How it showed up
`test_pipewire_teardown_wait` hit the 10-minute limit in 2 of 13 asan jobs (#3577):
its log ends at the `RUN` line, with exit 124. The window is a few instructions.
Locally it hung about once in 800 asan runs under load, and not in 9600 runs of a
tsan build.
The stack has the main thread in `pthread_join` under `pw_thread_loop_stop`, and
the thread named after the loop in `epoll_wait`. Attaching `gdb` ends the hang,
because the interrupted `epoll_wait` lets the loop thread see the flag. So a hang
that goes away when you attach to it can be this one.
## What to do instead
Wait until the loop thread runs a callback of yours from inside the loop. Add an
event source before the start, signal it after, and wait under the lock for the
callback, which only runs on the loop thread once it has entered the loop:
```c
struct entered {
struct pw_thread_loop *thread_loop;
bool entered;
};
static void on_entered(void *data, uint64_t count)
{
struct entered *e = data;
e->entered = true; /* loop thread, loop lock held */
pw_thread_loop_signal(e->thread_loop, false);
}
struct entered e = {.thread_loop = thread_loop};
struct pw_loop *loop = pw_thread_loop_get_loop(thread_loop);
struct spa_source *event = pw_loop_add_event(loop, on_entered, &e);
pw_thread_loop_lock(thread_loop);
pw_thread_loop_start(thread_loop);
pw_loop_signal_event(loop, event);
while (!e.entered)
pw_thread_loop_wait(thread_loop);
pw_loop_destroy_source(loop, event);
pw_thread_loop_unlock(thread_loop);
```
Take the lock before the start, or the signal can come before the wait. The
loop thread sets `impl->thread` before it dispatches the event, and the lock it
hands back orders that before a later `pw_thread_loop_stop()`.
`thread-loop.start-signal` (the loop thread signals once it has entered) does
the same, but only from PipeWire 0.3.77: older versions ignore the property, so
an unconditional wait for it never returns (#3596; Debian 12 ships 0.3.65).
Use it only where the build already requires 0.3.77.
These do not help:
- A blocking `pw_loop_invoke` first. It takes the same path: it can run on the
caller and prove nothing (1 hang in 3744 runs).
- A sleep first. 50 ms gave 0 hangs in 9600 runs, but it only narrows the window.
## Where else
`obs_pipewire_connect_fd()` in `plugins/linux-pipewire/pipewire.c.h` has the same
order on its `fail:` path, when `pw_context_connect_fd()` fails right after the
start. Its normal path waits for a sync first, so it is not affected.
---
type: concept
title: Where a quit hang waits, from the last lines of the log
description: "When OBS does not exit after a quit, the last shutdown line in its log shows which step waits: the frontend, obs_shutdown, a module unload, or the process's exit handlers after 'Number of memory leaks'. For the exit handlers, the exit watchdog's line names the library and the plugin that loaded it; otherwise take the stacks and remove plugins one at a time."
sources: ["#3739", "#3933", "#3935", "#3833", "#3846", "#4065", "#4309", "#4525", "#4549", "#4560"]
status: active
---
# Where a quit hang waits, from the last lines of the log
## The shortcut
A quit hang can be in OBS, in a plugin, or in a library that a plugin loads.
Reports of all three look the same: the window closes and the process stays.
Before you try to reproduce one, read the end of the reporter's log. The quit
path writes these lines in this order:
1. `==== Shutting down ====` (`OBSBasic::closeWindow()`, `SHUTDOWN_SEPARATOR` in
`frontend/widgets/OBSBasic.cpp.hpp`).
2. `All scene data cleared` (`ClearSceneData`, after the
`OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN` event).
3. The modules' own unload lines (for example `[obs-websocket]
[obs_module_unload] Finished shutting down.`), from `free_module()` in
`obs_shutdown()` (`libobs/obs.c.h`).
4. `Freeing OBS context data` (`obs_free_data()`, after every module is
unloaded).
5. `== Profiler Results ==`.
6. `Number of memory leaks: N` (`frontend/obs-main.cpp.hpp`). After this line
`main()` only returns.
7. `exit-watchdog: exit did not finish in 10 s: ...` (`rust/obs-exit-watchdog`,
armed in `frontend/obs-main.cpp.hpp` after line 6). Only when `exit()` does
not finish in 10 s; the process then ends with exit code 124. Linux and
macOS.
The last line that is present shows where the quit waits:
| Last line in the log | The quit waits in | Example |
|---|---|---|
| 2, and no module unload line | The frontend's own teardown after the scene data: `OBSBasic::applicationShutdown()` destroys the outputs (`outputHandler.reset()`). | #3933: an output that was stopped while it waited to reconnect never finished its stop, and `obs_output_destroy()` waited on it. Fixed in #3935. |
| 3, before `Freeing OBS context data` | A module's `obs_module_unload()`, in a module after the last one that wrote a line. Most modules write nothing when they unload, so the stacks name the module. | #3833: CEF never finished its start, and obs-browser's unload waited for it. Bounded in #3846. |
| 6, and the process still runs | The process's exit handlers, on a build without the watchdog (Windows, or a build before #4309). A normal quit also ends at line 6, but then the process ends. | #3739, before #4309. |
| 7 | The process's exit handlers: static destructors and `atexit` functions of the loaded libraries. OBS has finished. The line names the library the main thread waits in and who loaded it, for example `... is blocking in libremidi.so.4 (loaded by advanced-scene-switcher.so); ending the process`. | #3739: a plugin's static `std::vector` was destroyed at exit, and its PipeWire observer joined a thread that waited on a lock. |
In rows 6 and 7, OBS's own shutdown is complete. libobs calls each module's
`obs_module_unload()` but does not close its library (`free_module()` in
`libobs/obs-module.c.h` leaves `os_dlclose` commented out), and a library that a
plugin opens itself (for example with `QLibrary`) also stays loaded. So the
static objects of every plugin live until `exit()`, and a static object that
owns a thread can wait forever in its destructor.
## Read the watchdog's name
The name is the first library on the main thread's stack that OBS itself did
not load (`culprit` in `rust/obs-exit-watchdog/src/lib.rs`). The text in
brackets says who brought it in:
- `an OBS module`: the library is the module.
- `loaded by `: a module loaded it while it loaded, also with its own
`dlopen` (Advanced Scene Switcher's sub-plugins). The owner is the last OBS
module before the library in the process's image list, which is in load
order (`owners` in `rust/obs-exit-watchdog/src/images.rs`).
- `loaded during the modules' post-load` or `loaded after startup`: it came
later, so there is no owner. Remove plugins one at a time (below).
Limits, so you do not trust the name too far:
- A library that a plugin thread loads while another module loads gets that
other module as owner.
- A library that two modules use belongs to the module that loaded it first.
- The name is where the main thread waits, not always the cause. A destructor
that joins a thread names the joining library; the stacks show what the
joined thread waits for.
- There is no name when the stack holds only OBS's own frames (the line then
ends `is blocking; ending the process`), and none on Windows yet.
## Get the stacks
The stacks of the hung process show the waiting frame directly. On Linux, with
OBS still hanging:
```sh
sudo gdb -p "$(pidof obs-studio-rust-gui)" -batch -ex 'thread apply all bt' > obs-hang-stacks.txt 2>&1
```
- `sudo` is necessary on distributions with `kernel.yama.ptrace_scope=1`, for
example Arch. Without it, gdb cannot attach.
- Use `pidof`, not `pgrep`. `pgrep` matches the 15-character `comm`
(`obs-studio-rust`), so `pgrep obs-studio-rust-gui` finds nothing. `pgrep -f`
can also match the shell that runs the command.
- Since #4309 the watchdog ends a row 7 hang after 10 s, so attach within
that time. There is no switch to turn the watchdog off.
- For rows 6 and 7, the main thread shows `exit()` → a destructor → `join()` or a
lock. Find the thread that it waits for.
The function names of a distribution package come from its debug package
(`*-debug` on Arch).
## Remove plugins one at a time
When there are no stacks, remove plugins until the hang stops:
- The Plugin Manager (Tools, Plugin Manager) keeps its list in
`/obs-studio-rust/plugin_manager/modules.json`. An entry with
`"enabled": false` keeps that module from loading. `module_name` is the
file name without its extension (`advanced-scene-switcher`, not
`advanced-scene-switcher.so`).
- Some plugins load sub-plugins of their own, which the Plugin Manager does
not list. Advanced Scene Switcher loads every `.so` in
`obs-plugins/advanced-scene-switcher-plugins/`. Move one file out of that
folder at a time.
- Test with an empty scene collection first. If that hangs too, the sources
are not the cause.
- When a plugin that "worked before" hangs, compare its package history as
well as its source. In #3739 the plugin code did not change: its Arch
package changed the libremidi version it builds against.
---
type: concept
title: Dispatch sanitizers on a separate ref
description: A `workflow_dispatch` of `sanitizers.yaml` on a PR branch cancels the run in progress there; dispatch on a separate ref.
sources: ["#3290", "#491"]
status: active
---
# Dispatch sanitizers on a separate ref
## The trap
`.github/workflows/sanitizers.yaml` has
```yaml
concurrency:
group: sanitizers-${{ github.ref }}
cancel-in-progress: true
```
One group per ref. Dispatching it on a PR branch (`gh workflow run
sanitizers.yaml --ref -f tools=asan`) while that branch's run (the
PR's own `asan` pass, or an earlier dispatch) is in progress cancels that run.
Two dispatches for different tools on the same branch also cancel each other:
only the last survives.
## What to do instead
Push the commit you want to measure to its own throwaway ref and dispatch there,
one ref per concurrent run:
```sh
git push origin HEAD:refs/heads/san/-asan
gh workflow run sanitizers.yaml --ref san/-asan -f tools=asan
```
Or use `-f tools=all` in a single dispatch. Delete the throwaway branches when
done (#3290 did this for its measurement runs).
---
type: concept
title: The sanitizer known list
description: The `bug`/`third-party`/`tool` kinds in `rust/tools/sanitize/triage.py`, the LeakSanitizer suppressions in `lsan.supp`, how to add an entry, and why a `bug` entry that runs clean fails the job.
sources: ["#3290", "#3238", "#3365", "#3368", "#3370"]
status: active
---
# The sanitizer known list
## What it is
`KNOWN` in `rust/tools/sanitize/triage.py` maps `(tool, test)` to
`(kind, why)`. A listed test's exit and its sanitizer reports are shown under
"Known (not counted)" and do not fail the job. The kinds:
- `bug`: the test is right and OBS (or its build) is wrong. `why` names the
open issue.
- `third-party`: the failure is inside a library OBS uses, and no narrow
suppression can match it. `why` names the issue that tracks the upstream fix.
- `tool`: a limitation of the sanitizer itself, no OBS issue (two valgrind entries).
## Suppress a library's own leak, don't list the test
A leak whose whole allocation stack is inside a library (no OBS frame) goes in
`rust/tools/sanitize/lsan.supp`, one `leak:` line that matches only that
stack. `sanitize.py` passes it as `LSAN_OPTIONS=suppressions=...` to every
test and the app. The test stays off the known list, so any other leak in it
still fails the job. Match one library entry point, never a whole module
(`libavcodec.so` would also hide an `AVPacket` OBS never frees). The first one is
FFmpeg 8.0.1's leak in `avformat_find_stream_info` on a VP9-alpha WebM that starts
between keyframes, which `test_media_alpha_network` hit (#3365); FFmpeg 9.0.2 does
not leak there. Take a line out when the library is updated past the fix.
## The trap
A `bug` or `third-party` entry whose test ran clean is reported under "Known bugs that ran clean:
drop the entry (counted)" and counts as a finding, so with
`--fail-on-findings` (always on for asan) the job fails. That is on purpose:
the fix for the bug must remove its entry in the same PR, or the list goes
stale and starts hiding the next regression. A clean `tool` entry is only listed.
The former `flaky` kind was retired after its last tracked failure was fixed
(#3368, #3370). An intermittent failure still needs its cause investigated;
it is not a separate exemption kind.
## How to add an entry
Read [asan-pr-failure.md](asan-pr-failure.md) first: fix the test if you can. The
goal for this list is zero entries.
1. Open (or find) the issue that tracks the failure; never add an entry without one,
except `tool`.
2. Pick the kind honestly: an OBS bug is `bug`, a library bug no suppression can
match is `third-party`, a sanitizer limitation is `tool`.
Fix timing tests to wait for their result ([timing-tests.md](timing-tests.md));
a leak in the test is not an entry at all: fix the test
([test-leaks.md](test-leaks.md)).
3. Add `("", ""): ("", " (#)")`.
4. When the issue is fixed, drop the entry in the fixing PR.
## Checks
- `triage.py --fail-on-findings`, passed for asan by `ci/sanitizers_step.py` since #3290.
---
type: concept
title: A source's destroy runs later, on another thread
description: "obs_source_destroy queues its work on the destruction task thread, so obs_shutdown can free what a queued destroy still uses; wait in a loop until the queue is empty."
sources: ["#3431", "#3441", "#3442", "#3364", "#3458"]
status: active
---
# A source's destroy runs later, on another thread
## The trap
`obs_source_destroy()` does not finish the destroy. It queues
`obs_source_destroy_defer()` on `obs->destruction_task_thread`
(`libobs/obs-source.c.h`). A scene's deferred destroy then releases the sources in
its items, so it can queue more work and drop more references, on that thread,
while the main thread goes on.
`os_task_queue_wait()` does not mean "the queue is empty". It returns true if
tasks ran before its marker (`wait` in `rust/obs-util/src/task.rs`). A task
that ran can have queued another.
## How it showed up
#3431 made `obs_shutdown()` give back the control block of each source left alive.
A scene's deferred destroy could still release one of those sources, so that
release wrote to a freed block (#3441). It shipped in a beta. The ASan report depends
on timing: through the harness, with load on 4 cores, 26 of 30 runs showed it.
## What to do instead
- Before you free something a queued destroy can touch, run the queue until it is
empty: `while (os_task_queue_wait(obs->destruction_task_thread)) ;`.
- If a destroy that starts later can still drop the last reference, hold the
control block yourself across it, as `obs_free_data()` in `libobs/obs.c.h` does.
- To test an order like this, force the race on every run. Do not depend on load:
`test_scene_items_are_released_not_left_alive` in
`test/cmocka/test_shutdown_canvas_weak_ref.c` delays the first item removal by
200 ms.
#3458 tracks the hazards that are left when the host leaks a scene at shutdown.
## Checks
`test_shutdown_canvas_weak_ref` (Tier 2, all libobs backends) and the asan job.
---
type: concept
title: Free what OBS's destroy path frees
description: "A test that skips OBS's destroy call leaks what that call frees, and the asan job fails on that since #3290."
sources: ["#3400", "#3401", "#3290"]
status: active
---
# Free what OBS's destroy path frees
## The trap
A unit test drives one internal function on a struct it built itself (on the
stack, or with only part of the create call). OBS never leaks there, because
its destroy or close path frees what the function allocated. The test does not
go through that path, so it leaks. Tier 2 does not check leaks, so it passes
there; LeakSanitizer and valgrind report it.
## How it showed up
- #3400: `test_ffmpeg_mux_write_packet` leaked the 64 KiB `stream->packet_buf`
that `write_packet()` grows with `da_*`. OBS frees it in
`ffmpeg_mux_destroy()`; the test's stream never went there. Fix: `da_free()`
the buffer at the end of the test.
- #3401: `test_rtmp_send_batch` leaked the per-channel packets
`RTMP_SendPacket()` keeps. OBS calls `RTMP_Close()` (which frees
`m_vecChannelsOut`) on every disconnect; the test only called `RTMP_Free()`.
Fix: `RTMP_Close()` before `RTMP_Free()`.
## What to do instead
Before writing such a test, read the destroy/close path of the object you
touch and free exactly what it frees, the way it frees it (call the same close
function where you can, rather than freeing fields by hand). Do not free more:
that hides a real leak in OBS. Never change an assertion to fix a leak.
## Checks
- The `asan` job in `sanitizers.yaml` runs with `--fail-on-findings` since
#3290, so a LeakSanitizer report from a test fails it.
- A leak you cannot fix in the test belongs in the known list only as a
tracked `bug` (see [sanitizer-known-list.md](sanitizer-known-list.md)).
---
type: concept
title: Timing tests wait for the result
description: Wait for the frame or packet you check, not a frame count or a fixed sleep; when a test needs the `timing` resource lock.
sources: ["#3389", "#3390", "#3421", "#3290"]
status: active
---
# Timing tests wait for the result
## The trap
A test that renders a scene or plays media checks the output after "enough"
frames or after a fixed time. On an idle machine that is enough; in the asan
pool (every core busy, ASan slowing each process) it is not, and the test reads
output from before the thing it checks happened. `testing-policy.md` says "No
sleeps: synchronize on events"; a frame count is a sleep measured in frames.
## How it showed up
- #3389: `test_darken_transparent`'s `run_scene` was "ready" after 10 output
frames, not after a frame that showed the scene. Under load the first pass
measured luma 0 (no frame drawn yet, not even video black 16).
- #3390: `test_deinterlace_mode_load` pushed at most 90 frames (3 s) for Yadif
2x to show the source; under ASan it needed close to all of them.
- #3421: `test_media_cover_art_monitor` plays real media in real time; in the
pool the first play got 0 packets inside its window.
- #3290: `test_slideshow_mem_cap` waited out a 5 s timeout on each of 12
presses that never landed (100 s, now 42 s once each press waits for its picture).
## What to do instead
1. Wait on the condition the assertion checks: poll output frames until one
shows the scene (for example, a pixel that is not black), or until the
packet you count has arrived, with a generous upper bound that only turns a
hang into a failure. Report how many frames or how long it took on failure.
2. Never make the bound the thing that passes the test.
3. If the test inherently depends on wall-clock (real-time playback, an audio
tone, a dock layout settling), add it to the `timing` resource lock:
`set_tests_properties( PROPERTIES RESOURCE_LOCK timing)` in its
`test/cmocka/tests.d/.cmake`, or `resource_locks: ["timing"]` in
`test/cmocka/build/test-graph.json`. The sanitizer pool then runs it alone
after the others; in Tier 2 ctest only keeps such tests from overlapping.
Add the name to `TIMING_TESTS_D`/`TIMING_TESTS_GRAPH` in
`ci/test_sanitize_harness.py`.
The lock is a mitigation, not a fix: a test that waits for its result
does not need it.
## Checks
- `ci/test_sanitize_harness.py` `TimingLockTest`: the listed timing tests hold the lock.
- The asan job (`sanitizers.yaml`) fails on a unit-test failure since #3290.
# OBS Studio Backend Design
The OBS Studio backend is powered by the library libobs. Libobs
provides the main pipeline, the video/audio subsystems, and the general
framework for all plugins.
## Libobs Plugin Objects
Libobs is designed to be modular, where adding modules will add custom
functionality. There are four libobs objects that you can make plugins
for:
- `plugins_sources` -- Sources are used to render video and/or
audio on stream. Things such as capturing displays/games/audio,
playing a video, showing an image, or playing audio. Sources can also
be used to implement audio and video filters.
- `plugins_outputs` -- Outputs allow the ability to output the
currently rendering audio/video. Streaming and recording are two
common examples of outputs, but not the only types of outputs.
Outputs can receive the raw data or receive encoded data.
- `plugins_encoders` -- Encoders are OBS-specific implementations
of video/audio encoders, which are used with outputs that use
encoders. x264, NVENC, Quicksync are examples of encoder
implementations.
- `plugins_services` -- Services are custom implementations of
streaming services, which are used with outputs that stream. For
example, you could have a custom implementation for streaming to
Twitch, and another for YouTube to allow the ability to log in and use
their APIs to do things such as get the RTMP servers or control the
channel.
*(Author's note: the service API is incomplete as of this writing)*
## Libobs Threads
There are three primary threads spawned by libobs on initialization:
- The obs_graphics_thread_ function used exclusively for rendering in
`libobs/obs-video.c`_
- The video_thread_ function used exclusively for video encoding/output
in `libobs/media-io/video-io.c`_
- The audio_thread_ function used for all audio
processing/encoding/output in `libobs/media-io/audio-io.c`_
*(Author's note: obs_graphics_thread was originally named
obs_video_thread; it was renamed as of this writing to prevent confusion
with video_thread)*
.. _output_channels:
## Output Channels
Rendering video or audio starts from output channels. You assign a
source to an output channel via the `obs_set_output_source()`
function. The *channel* parameter can be any number from
0..(MAX_CHANNELS_-1). You may initially think that this is how you
display multiple sources at once; however, sources are hierarchical.
Sources such as scenes or transitions can have multiple sub-sources, and
those sub-sources in turn can have sub-sources and so on (see
`displaying_sources` for more information). Typically, you would
use scenes to draw multiple sources as a group with specific transforms
for each source, as a scene is just another type of source. The
"channel" design allows for highly complex video presentation setups.
The OBS Studio front-end has yet to even fully utilize this back-end
design for its rendering, and currently only uses one output channel to
render one scene at a time. It does however utilize additional channels
for things such as global audio sources which are set in audio settings.
*(Author's note: "Output channels" are not to be confused with output
objects or audio channels. Output channels are used to set the sources
you want to output, and output objects are used for actually
streaming/recording/etc.)*
## General Video Pipeline Overview
The video graphics pipeline is run from two threads: a dedicated
graphics thread that renders preview displays as well as the final mix
(the obs_graphics_thread_ function in `libobs/obs-video.c`_), and a
dedicated thread specific to video encoding/output (the video_thread_
function in `libobs/media-io/video-io.c`_).
Sources assigned to output channels will be drawn from channels
0..(MAX_CHANNELS_-1). They are drawn on to the final texture which will
be used for output `[1]`_. Once all sources are drawn, the final
texture is converted to whatever format that libobs is set to (typically
a YUV format). After being converted to the back-end video format, it's
then sent along with its timestamp to the current video handler,
`obs_core_video::video`_.
It then puts that raw frame in a queue of MAX_CACHE_SIZE_ in the `video
output handler`_. A semaphore is posted, then the video-io thread will
process frames as it's able. If the video frame queue is full, it will
duplicate the last frame in the queue in an attempt to reduce video
encoding complexity (and thus CPU usage) `[2]`_. This is why you may
see frame skipping when the encoder can't keep up. Frames are sent to
any raw outputs or video encoders that are currently active `[3]`_.
If it's sent to a video encoder object (`libobs/obs-encoder.c`_), it
encodes the frame and sends the encoded packet off to the outputs that
encoder is connected to (which can be multiple). If the output takes
both encoded video/audio, it puts the packets in an interleave queue to
ensure encoded packets are sent in monotonic timestamp order `[4]`_.
The encoded packet or raw frame is then sent to the output.
## General Audio Pipeline Overview
The audio pipeline is run from a dedicated audio thread in the audio
handler (the `audio_thread`_ function in `libobs/media-io/audio-io.c`_);
assuming that AUDIO_OUTPUT_FRAMES_ is set to 1024, the audio thread
"ticks" (processes audio data) once every 1024 audio samples (around
every 21 millisecond intervals at 48khz), and calls the audio_callback_
function in `libobs/obs-audio.c`_ where most of the audio processing is
accomplished.
A source with audio will output its audio via the
obs_source_output_audio_ function, and that audio data will be appended
or inserted in to the circular buffer `obs_source::audio_input_buf`_.
If the sample rate or channel count does not match what the back-end is
set to, the audio is automatically remixed/resampled via swresample
`[5]`_. Before insertion, audio data is also run through any audio
filters attached to the source `[6]`_.
Each audio tick, the audio thread takes a reference snapshot of the
audio source tree (stores references of all sources that output/process
audio) `[7]`_. On each audio leaf (audio source), it takes the closest
audio (relative to the current audio thread timestamp) stored in the
circular buffer `obs_source::audio_input_buf`_, and puts it in
`obs_source::audio_output_buf`_.
Then, the audio samples stored in `obs_source::audio_output_buf`_ of the
leaves get sent through their parents in the source tree snapshot for
mixing or processing at each source node in the hierarchy `[8]`_.
Sources with multiple children such as scenes or transitions will
mix/process their children's audio themselves via the
`obs_source_info::audio_render`_ callback. This allows, for example,
transitions to fade in the audio of one source and fade in the audio of
a new source when they're transitioning between two sources. The mix or
processed audio data is then stored in `obs_source::audio_output_buf`_
of that node similarly, and the process is repeated until the audio
reaches the root nodes of the tree.
Finally, when the audio has reached the base of the snapshot tree, the
audio of all the sources in each output channel are mixed together for a
final mix `[9]`_. That final mix is then sent to any raw outputs or
audio encoders that are currently active `[10]`_.
If it's sent to an audio encoder object (`libobs/obs-encoder.c`_), it
encodes the audio data and sends the encoded packet off to the outputs
that encoder is connected to (which can be multiple). If the output
takes both encoded video/audio, it puts the packets in an interleave
queue to ensure encoded packets are sent in monotonic timestamp order
`[4]`_.
The encoded packet or raw audio data is then sent to the output.
.. _obs_graphics_thread: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-video.c#L588-L651
.. _libobs/obs-audio.c: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-audio.c
.. _libobs/obs-video.c: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-video.c
.. _video_thread: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/video-io.c#L169-L195
.. _libobs/media-io/video-io.c: https://github.com/obsproject/obs-studio/blob/master/libobs/media-io/video-io.c
.. _video output handler: https://github.com/obsproject/obs-studio/blob/master/libobs/media-io/video-io.c
.. _audio_thread: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/audio-io.c#L241-L282
.. _libobs/media-io/audio-io.c: https://github.com/obsproject/obs-studio/blob/master/libobs/media-io/audio-io.c
.. _MAX_CHANNELS: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-defs.h#L20-L21
.. _[1]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-video.c#L99-L129
.. _obs_core_video::video: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-internal.h#L250
.. _MAX_CACHE_SIZE: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/video-io.c#L34
.. _[2]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/video-io.c#L431-L434
.. _[3]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/video-io.c#L115-L167
.. _libobs/obs-encoder.c: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-encoder.c
.. _[4]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-output.c#L1382-L1439
.. _AUDIO_OUTPUT_FRAMES: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/audio-io.h#L30
.. _audio_callback: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-audio.c#L367-L485
.. _obs_source_output_audio: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-source.c#L2578-L2608
.. _obs_source::audio_input_buf: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-source.c#L1280-L1283
.. _[5]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-source.c#L2561-L2563
.. _[6]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-source.c#L2591
.. _[7]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-audio.c#L393-L415
.. _obs_source::audio_output_buf: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-internal.h#L580
.. _[8]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-audio.c#L417-L423
.. _obs_source_info::audio_render: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-source.h#L410-L412
.. _[9]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/obs-audio.c#L436-L453
.. _[10]: https://github.com/obsproject/obs-studio/blob/2c58185af3c85f4e594a4c067c9dfe5fa4b5b0a9/libobs/media-io/audio-io.c#L144-L165
# Frontends
## Initialization and Shutdown
To initialize libobs, you must call `obs_startup()`,
`obs_reset_video()`, and then `obs_reset_audio()`.
After that, modules typically should be loaded.
You can load individual modules manually by calling
`obs_open_module()`. After loading, the
`obs_open_module()` function, you must then call
`obs_init_module()` to initialize the module.
You can load modules automatically via two functions:
`obs_add_module_path()` and `obs_load_all_modules()`.
After all plugin modules have been loaded, call
`obs_post_load_modules()`.
Certain modules may optionally use a configuration storage directory,
which is set as a parameter to `obs_startup()`.
When it's time to shut down the frontend, make sure to release all
references to any objects, free any data, and then call
`obs_shutdown()`. If for some reason any libobs objects have
not been released, they will be destroyed automatically and a warning
will be logged.
To detect if any general memory allocations have not been freed, call
the `bnum_allocs()` to get the number of allocations remaining.
If the number remaining is above 0, there are memory leaks.
See `obs_init_shutdown_reference` for more information.
## Reconfiguring Video
Any time after initialization, video settings can be reconfigured by
calling `obs_reset_video()` as long as no outputs are active.
Audio was originally intended to have this capability as well, but
currently is not able to be reset once initialized; libobs must be fully
shutdown in order to reconfigure audio settings.
## Displays
Displays as the name implies are used for display/preview panes. To use
displays, you must have a native window handle or identifier to draw on.
First you must call `obs_display_create()` to initialize the
display, then you must assign a draw callback with
`obs_display_add_draw_callback()`. If you need to remove a draw
callback, call `obs_display_remove_draw_callback()` similarly.
When drawing, to draw the main preview window (if any), call
`obs_render_main_texture()`. If you need to render a specific
source on a secondary display, you can increment its "showing" state
with `obs_source_inc_showing()` while it's showing in the
secondary display, draw it with `obs_source_video_render()` in
the draw callback, then when it's no longer showing in the secondary
display, call `obs_source_dec_showing()`.
If the display needs to be resized, call `obs_display_resize()`.
If the display needs a custom background color other than black, call
`obs_display_set_background_color()`.
If the display needs to be temporarily disabled, call
`obs_display_set_enabled()` to disable, and
`obs_display_enabled()` to get its enabled/disabled state.
Then call `obs_display_destroy()` to destroy the display when
it's no longer needed.
*(Important note: do not use more than one display widget within the
hierarchy of the same base window; this will cause presentation stalls
on macOS.)*
For an example of how displays are used with Qt, see
`UI/qt-display.hpp`_ and `UI/qt-display.cpp`_.
See `display_reference` for more information.
## Saving/Loading Objects and Object Management
The frontend is generally expected to manage its own objects, however
for sources, there are some helper functions to allow easier
saving/loading all sources: `obs_save_sources()` and
`obs_load_sources()`. With those functions, all sources that
aren't private will automatically be saved and loaded. You can also
save/load individual sources manually by using
`obs_save_source()` and `obs_load_source()`.
*(Author's note: I should not have written those helper functions; the
downside is I had to add "private" sources that aren't saveable via the*
`obs_source_create_private()` *function. Just one of the many
minor design flaws that can occur during long-term development.)*
For outputs, encoders, and services, there are no helper functions, so
usually you'd get their settings individually and save them as json.
(See `obs_output_get_settings()`). You don't have to save each
object to different files individually; you'd save multiple objects
together in a bigger `obs_data_t` object, then save that via
`obs_data_save_json_safe()`, then load everything again via
`obs_data_create_from_json_file_safe()`.
## Signals
The core, as well as scenes and sources, have a set of standard signals
that are used to determine when something happens or changes.
Typically the most important signals are the
`output_signal_handler_reference`: the **start**, **stop**,
**starting**, **stopping**, **reconnect**, **reconnect_success**
signals in particular.
Most other signals for scenes/sources are optional if you are the only
thing controlling their state. However, it's generally recommended to
watch most signals when possible for consistency. See
`source_signal_handler_reference` and `scene_signal_reference`
for more information.
For example, let's say you wanted to connect a callback to the **stop**
signal of an output. The **stop** signal has two parameters: *output*
and *code*. A callback for this signal would typically look something
like this:
.. code:: cpp
static void output_stopped(void *my_data, calldata_t *cd)
{
obs_output_t *output = calldata_ptr(cd, "output");
int code = calldata_int(cd, "code");
[...]
}
*(Note that callbacks are not thread-safe.)*
Then to connect it to the **stop** signal, you use the
`signal_handler_connect()` with the callback. In this case for
example:
.. code:: cpp
signal_handler_t *handler = obs_output_get_signal_handler(output);
signal_handler_connect(handler, "stop", output_stopped);
.. _displaying_sources:
## Displaying Sources
Sources are displayed on stream/recording via `output_channels`
with the `obs_set_output_source()` function. There are 64
channels that you can assign sources to, which will draw on top of each
other in ascending index order. Typically, a normal source shouldn't be
directly assigned with this function; you would use a scene or a
transition containing scenes.
To draw one or more sources together with a specific transform applied
to them, scenes are used. To create a scene, you call
`obs_scene_create()`. Child sources are referenced using scene
items, and then specific transforms are applied to those scene items.
Scene items are not sources but containers for sources; the same source
can be referenced by multiple scene items within the same scene, or can
be referenced in multiple scenes. To create a scene item that
references a source, you call `obs_scene_add()`, which returns a
new reference to a scene item.
To change the transform of a scene item, you typically would call a
function like `obs_sceneitem_set_pos()` to change its position,
`obs_sceneitem_set_rot()` to change its rotation, or
`obs_sceneitem_set_scale()` to change its scaling. Scene items
can also force scaling in to a custom size constraint referred to as a
"bounding box"; a bounding box will force the source to be drawn at a
specific size and with specific scaling constraint within that size. To
use a bounding box, you call the
`obs_sceneitem_set_bounds_type()`,
`obs_sceneitem_set_bounds()`, and
`obs_sceneitem_set_bounds_alignment()`. Though the easiest way
to handle everything related to transforms is to use the
`obs_sceneitem_set_info2()` and
`obs_sceneitem_get_info2()` functions. See
`scene_item_reference` for all the functions related to scene
items.
Usually, a smooth transition between multiple scenes is required. To do
this, transitions are used. To create a transition, you use
`obs_source_create()` or `obs_source_create_private()`
like any other source. Then, to activate a transition, you call
`obs_transition_start()`. When the transition is not active and
is only displaying one source, it performs a pass-through to the current
displaying source. See `transitions` for more functions related to
using transitions.
The recommended way to set up your structure is to have a transition as
the source that is used as the main output source, then your scene as a
child of the transition, then your sources as children in the scene.
When you need to switch to a new scene, simply call
`obs_transition_start()`.
## Outputs, Encoders, and Services
Outputs, encoders, and services are all used together, and managed a bit
differently than sources. There currently is no global function to
save/load them, that must be accomplished manually for now via their
settings if needed.
Encoders are used with outputs that expect encoded data (which is almost
all typical outputs), such as standard file recording or streaming.
Services are used with outputs to a stream; the `RTMP output`_ is the
quintessential example of this.
Here's an example of how an output would be used with encoders and
services:
.. code:: cpp
obs_encoder_set_video(my_h264_encoder, obs_get_video());
obs_encoder_set_audio(my_aac_encoder, obs_get_audio());
obs_output_set_video_encoder(my_output, my_h264_encoder);
obs_output_set_audio_encoder(my_output, my_aac_encoder);
obs_output_set_service(my_output, my_service); /* if a stream */
obs_output_start(my_output);
Once the output has started successfully, it automatically starts
capturing the video and/or audio from the current video/audio output
(i.e. any sources that are assigned to the `output_channels`).
If the output fails to start up, it will send the **stop** signal with
an error code in the *code* parameter, possibly accompanied by a
translated error message stored that can be obtained via the
`obs_output_get_last_error()` function.
.. --------------------------------------------------------------------
.. _RTMP Output: https://github.com/obsproject/obs-studio/blob/master/plugins/obs-outputs/rtmp-stream.c
.. _UI/qt-display.hpp: https://github.com/obsproject/obs-studio/blob/master/UI/qt-display.hpp
.. _UI/qt-display.cpp: https://github.com/obsproject/obs-studio/blob/master/UI/qt-display.cpp
# Rendering Graphics
Libobs has a custom-made programmable graphics subsystem that wraps both
Direct3D 11 and OpenGL. The reason why it was designed with a custom
graphics subsystem was to accommodate custom capture features only
available on specific operating systems.
*(Author's note: In retrospect, I probably should have used something
like ANGLE, but I would have to modify it to accommodate my specific
use-cases.)*
Most rendering is dependent upon effects. Effects are used by all video
objects in libobs; they're used to easily bundle related vertex/pixel
shaders in to one file.
An effect file has a nearly identical syntax to Direct3D 11 HLSL effect
files. The only differences are as follows:
- Sampler states are named "sampler_state"
- Position semantic is called "POSITION" rather than "SV_Position"
- Target semantic is called "TARGET" rather than "SV_Target"
*(Author's note: I'm probably missing a few exceptions here, if I am
please let me know)*
## The Graphics Context
Using graphics functions isn't possible unless the current thread has
entered a graphics context, and the graphics context can only be used by
one thread at a time. To enter the graphics context, use
`obs_enter_graphics()`, and to leave the graphics context, use
`obs_leave_graphics()`.
Certain callback will automatically be within the graphics context:
`obs_source_info.video_render`, and the draw callback
parameter of `obs_display_add_draw_callback()`, and
`obs_add_main_render_callback()`.
## Creating Effects
### Effect Parameters
To create an effect, it's recommended to start with the uniforms
(parameters) of the effect.
There are a number of different types of uniforms:
+------------------+---------------+------------------+------------+------------+
| Floating points: | **float** | **float2** | **float3** | **float4** |
+------------------+---------------+------------------+------------+------------+
| Matrices: | **float3x3** | **float4x4** | | |
+------------------+---------------+------------------+------------+------------+
| Integers: | **int** | **int2** | **int3** | **int4** |
+------------------+---------------+------------------+------------+------------+
| Booleans: | **bool** | | | |
+------------------+---------------+------------------+------------+------------+
| Textures: | **texture2d** | **texture_cube** | | |
+------------------+---------------+------------------+------------+------------+
To get the effect uniform parameters, you use
`gs_effect_get_param_by_name()` or
`gs_effect_get_param_by_idx()`.
Then the uniforms are set through the following functions:
- `gs_effect_set_bool()`
- `gs_effect_set_float()`
- `gs_effect_set_int()`
- `gs_effect_set_matrix4()`
- `gs_effect_set_vec2()`
- `gs_effect_set_vec3()`
- `gs_effect_set_vec4()`
- `gs_effect_set_texture()`
- `gs_effect_set_texture_srgb()`
There are two "universal" effect parameters that may be expected of
effects: **ViewProj**, and **image**. The **ViewProj** parameter
(which is a float4x4) is used for the primary view/projection matrix
combination. The **image** parameter (which is a texture2d) is a
commonly used parameter for the main texture; this parameter will be
used with the functions `obs_source_draw()`,
`gs_draw_sprite()`, `gs_draw_quadf()`, and
`obs_source_process_filter_end()`.
Here is an example of effect parameters:
.. code:: cpp
uniform float4x4 ViewProj;
uniform texture2d image;
uniform float4 my_color_param;
uniform float my_float_param;
Effect parameters can also have default values. Default parameters of
elements that have multiple elements should be treated as an array.
Here are some examples of default parameters:
.. code:: cpp
uniform float4x4 my_matrix = {1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0};
uniform float4 my_float4 = {1.0, 0.5, 0.25, 0.0};
uniform float my_float = 4.0;
uniform int my_int = 5;
### Effect Sampler States
Then, if textures are used, sampler states should be defined. Sampler
states have certain sub-parameters:
- **Filter** - The type of filtering to use. Can be one of the
following values:
- **Anisotropy**
- **Point**
- **Linear**
- **MIN_MAG_POINT_MIP_LINEAR**
- **MIN_POINT_MAG_LINEAR_MIP_POINT**
- **MIN_POINT_MAG_MIP_LINEAR**
- **MIN_LINEAR_MAG_MIP_POINT**
- **MIN_LINEAR_MAG_POINT_MIP_LINEAR**
- **MIN_MAG_LINEAR_MIP_POINT**
- **AddressU**, **AddressV** - Specifies how to handle the sampling
when the coordinate goes beyond 0.0..1.0. Can be one of the following
values:
- **Wrap** or **Repeat**
- **Clamp** or **None**
- **Mirror**
- **Border** (uses *BorderColor* to fill the color)
- **MirrorOnce**
- **BorderColor** - Specifies the border color if using the "Border"
address mode. This value should be a hexadecimal value representing
the color, in the format of: AARRGGBB. For example, 7FFF0000 would
have its alpha value at 127, its red value at 255, and blue and green
at 0. If *Border* is not used as an addressing type, this value is
ignored.
Here is an example of writing a sampler state in an effect file:
.. code:: cpp
sampler_state defaultSampler {
Filter = Linear;
AddressU = Border;
AddressV = Border;
BorderColor = 7FFF0000;
};
This sampler state would use linear filtering, would use border
addressing for texture coordinate values beyond 0.0..1.0, and the border
color would be the color specified above.
When a sampler state is used, it's used identically to the HLSL form:
.. code:: cpp
[...]
uniform texture2d image;
sampler_state defaultSampler {
Filter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};
[...]
float4 MyPixelShaderFunc(VertInOut vert_in) : TARGET
{
return image.Sample(def_sampler, vert_in.uv);
}
### Effect Vertex/Pixel Semantics
Then structures should be defined for inputs and outputs vertex
semantics.
Vertex components can have the following semantics:
- **COLOR** - Color value (*float4*).
- **POSITION** - Position value (*float4*).
- **NORMAL** - Normal value (*float4*).
- **TANGENT** - Tangent value (*float4*).
- **TEXCOORD[0..7]** - Texture coordinate value (*float2*, *float3*, or
*float4*).
Here is an example of a vertex semantic structure:
.. code:: cpp
struct VertexIn {
float4 my_position : POSITION;
float2 my_texcoord : TEXCOORD0;
};
These semantic structures are then passed in as a parameter to the
primary shader entry point, and used as a return value for the vertex
shader. Note that the vertex shader is allowed to return different
semantics than it takes in; but the return type of the vertex shader and
the parameter of the pixel shader must match.
The semantic structure used for the parameter to the vertex shader
function will require that the vertex buffer have those values, so if
you have POSITION and TEXCOORD0, the vertex buffer will have to have at
least a position buffer and a texture coordinate buffer in it.
For pixel shaders, they need to return with a TARGET semantic (which is
a float4 RGBA value). Here is an example of how it's usually used with
a pixel shader function:
.. code:: cpp
float4 MyPixelShaderFunc(VertInOut vert_in) : TARGET
{
return image.Sample(def_sampler, vert_in.uv);
}
### Effect Techniques
Techniques are used to define the primary vertex/pixel shader entry
functions per pass. One technique can have multiple passes or custom
pass setup.
*(Author's note: These days, multiple passes aren't really needed; GPUs
are powerful enough to where you can perform all actions in the same
shader. Named passes can be useful for custom draw setups, but even
then you can just make it a separate technique. For that reason, it's
best to just ignore the extra pass functionality.)*
If you're making an effect filter for video sources, typically you'd
name the pass **Draw**, and then
`obs_source_process_filter_end()` will automatically call that
specific effect name. However, you can also use
`obs_source_process_filter_tech_end()` to make the filter use a
specific technique by its name.
The first parameter of the vertex/pixel shader functions in passes
should always be the name of its vertex semantic structure parameter.
For techniques, it's better to show some examples of how techniques
would be used:
.. code:: cpp
uniform float4x4 ViewProj;
uniform texture2d image;
struct VertInOut {
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
VertInOut MyVertexShaderFunc(VertInOut vert_in)
{
VertInOut vert_out;
vert_out.pos = mul(float4(vert_in.pos.xyz, 1.0), ViewProj);
vert_out.uv = vert_in.uv;
return vert_out;
}
float4 MyPixelShaderFunc(VertInOut vert_in) : TARGET
{
return image.Sample(def_sampler, vert_in.uv);
}
technique Draw
{
pass
{
vertex_shader = MyVertexShaderFunc(vert_in);
pixel_shader = MyPixelShaderFunc(vert_in);
}
};
## Using Effects
The recommended way to use effects is like so:
.. code:: cpp
for (gs_effect_loop(effect, "technique")) {
[draw calls go here]
}
This will automatically handle loading/unloading of the effect and its
shaders for a given technique name.
## Rendering Video Sources
A synchronous video source renders in its
`obs_source_info.video_render` callback.
Sources can render with custom drawing (via the OBS_SOURCE_CUSTOM_DRAW
output capability flag), or without. When sources render without custom
rendering, it's recommended to render a single texture with
`obs_source_draw()`. Otherwise the source is expected to
perform rendering on its own and manage its own effects.
Libobs comes with a set of default/standard effects that can be accessed
via the `obs_get_base_effect()` function. You can use these
effects to render, or you can create custom effects with
`gs_effect_create_from_file()` and render with a custom effect.
## Rendering Video Effect Filters
For most video effect filters, it comprises of adding a layer of
processing shaders to an existing image in its
`obs_source_info.video_render` callback. When this is the
case, it's expected that the filter has its own effect created, and to
draw the effect, one would simply use the
`obs_source_process_filter_begin()` function, set the parameters
on your custom effect, then call either
`obs_source_process_filter_end()` or
`obs_source_process_filter_tech_end()` to finish rendering the
filter.
Here's an example of rendering a filter from the color key filter:
.. code:: cpp
static void color_key_render(void *data, gs_effect_t *effect)
{
struct color_key_filter_data *filter = data;
if (!obs_source_process_filter_begin(filter->context, GS_RGBA,
OBS_ALLOW_DIRECT_RENDERING))
return;
gs_effect_set_vec4(filter->color_param, &filter->color);
gs_effect_set_float(filter->contrast_param, filter->contrast);
gs_effect_set_float(filter->brightness_param, filter->brightness);
gs_effect_set_float(filter->gamma_param, filter->gamma);
gs_effect_set_vec4(filter->key_color_param, &filter->key_color);
gs_effect_set_float(filter->similarity_param, filter->similarity);
gs_effect_set_float(filter->smoothness_param, filter->smoothness);
obs_source_process_filter_end(filter->context, filter->effect, 0, 0);
UNUSED_PARAMETER(effect);
}
.. OBS Studio documentation master file, created by
sphinx-quickstart on Wed Oct 25 00:03:21 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. _contents:
# Welcome to OBS Studio's documentation!
* **Setting up an OBS development environment?** :wiki:`Use the Wiki `
* **Developing your first OBS plugin?** `Use the obs-plugintemplate `_
.. toctree::
:caption: Core Concepts
:maxdepth: 1
backend-design
plugins
frontends
graphics
scripting
.. toctree::
:caption: API Reference
:maxdepth: 2
OBS Core
Modules
Core API Object
Platform/Utility
Callbacks (libobs/callback)
Graphics (libobs/graphics)
Media I/O (libobs/media-io)
reference-frontend-api
.. toctree::
:caption: Additional Resources
:maxdepth: 1
:hidden:
Build Instructions
Plugin Template
# Plugins
Almost all custom functionality is added through plugin modules, which
are typically dynamic libraries or scripts. The ability to capture
and/or output audio/video, make a recording, output to an RTMP stream,
encode in x264 are all examples of things that are accomplished via
plugin modules.
Plugins can implement sources, outputs, encoders, and services.
Writing your first plugin? We provide `a basic template plugin `_
to get you started.
## Plugin Module Headers
These are some notable headers commonly used by plugins:
- `libobs/obs-module.h`_ -- The primary header used for creating plugin
modules. This file automatically includes the following files:
- `libobs/obs.h`_ -- The main libobs header. This file automatically
includes the following files:
- `libobs/obs-source.h`_ -- Used for implementing sources in plugin
modules
- `libobs/obs-output.h`_ -- Used for implementing outputs in plugin
modules
- `libobs/obs-encoder.h`_ -- Used for implementing encoders in
plugin modules
- `libobs/obs-service.h`_ -- Used for implementing services in
plugin modules
- `libobs/obs-data.h`_ -- Used for managing settings for libobs
objects
- `libobs/obs-properties.h`_ -- Used for generating properties for
libobs objects
- `libobs/graphics/graphics.h`_ -- Used for graphics rendering
## Common Directory Structure and CMakeLists.txt
The common way source files are organized is to have one file for plugin
initialization, and then specific files for each individual object
you're implementing. For example, if you were to create a plugin called
'my-plugin', you'd have something like my-plugin.c where plugin
initialization is done, my-source.c for the definition of a custom
source, my-output.c for the definition of a custom output, etc. (This
is not a rule of course)
This is an example of a common directory structure for a native plugin
module::
my-plugin/data/locale/en-US.ini
my-plugin/CMakeLists.txt
my-plugin/my-plugin.c
my-plugin/my-source.c
my-plugin/my-output.c
my-plugin/my-encoder.c
my-plugin/my-service.c
This would be an example of a common CMakeLists.txt file associated with
these files::
# my-plugin/CMakeLists.txt
project(my-plugin)
set(my-plugin_SOURCES
my-plugin.c
my-source.c
my-output.c
my-encoder.c
my-service.c)
add_library(my-plugin MODULE
${my-plugin_SOURCES})
target_link_libraries(my-plugin
libobs)
install_obs_plugin_with_data(my-plugin data)
## Native Plugin Initialization
To create a native plugin module, you will need to include the
`libobs/obs-module.h`_ header, use `OBS_DECLARE_MODULE()` macro,
then create a definition of the function `obs_module_load()`.
In your `obs_module_load()` function, you then register any of
your custom sources, outputs, encoders, or services. See the
`reference-modules` for more information.
The following is an example of my-plugin.c, which would register one
object of each type:
.. code:: cpp
/* my-plugin.c */
#include
/* Defines common functions (required) */
OBS_DECLARE_MODULE()
/* Implements common ini-based locale (optional) */
OBS_MODULE_USE_DEFAULT_LOCALE("my-plugin", "en-US")
extern struct obs_source_info my_source; /* Defined in my-source.c */
extern struct obs_output_info my_output; /* Defined in my-output.c */
extern struct obs_encoder_info my_encoder; /* Defined in my-encoder.c */
extern struct obs_service_info my_service; /* Defined in my-service.c */
bool obs_module_load(void)
{
obs_register_source(&my_source);
obs_register_output(&my_output);
obs_register_encoder(&my_encoder);
obs_register_service(&my_service);
return true;
}
.. _plugins_sources:
## Sources
Sources are used to render video and/or audio on stream. Things such as
capturing displays/games/audio, playing a video, showing an image, or
playing audio. Sources can also be used to implement audio and video
filters as well as transitions. The `libobs/obs-source.h`_ file is the
dedicated header for implementing sources. See the
`reference-sources` for more information.
For example, to implement a source object, you need to define an
`obs_source_info` structure and fill it out with information and
callbacks related to your source:
.. code:: cpp
/* my-source.c */
[...]
struct obs_source_info my_source {
.id = "my_source",
.type = OBS_SOURCE_TYPE_INPUT,
.output_flags = OBS_SOURCE_VIDEO,
.get_name = my_source_name,
.create = my_source_create,
.destroy = my_source_destroy,
.update = my_source_update,
.video_render = my_source_render,
.get_width = my_source_width,
.get_height = my_source_height
};
Then, in my-plugin.c, you would call `obs_register_source()` in
`obs_module_load()` to register the source with libobs.
.. code:: cpp
/* my-plugin.c */
[...]
extern struct obs_source_info my_source; /* Defined in my-source.c */
bool obs_module_load(void)
{
obs_register_source(&my_source);
[...]
return true;
}
Some simple examples of sources:
- Synchronous video source: The `image source `_
- Asynchronous video source: The `random texture test source `_
- Audio source: The `sine wave test source `_
- Video filter: The `test video filter `_
- Audio filter: The `gain audio filter `_
.. _plugins_outputs:
## Outputs
Outputs allow the ability to output the currently rendering audio/video.
Streaming and recording are two common examples of outputs, but not the
only types of outputs. Outputs can receive the raw data or receive
encoded data. The `libobs/obs-output.h`_ file is the dedicated header
for implementing outputs. See the `reference-outputs` for more
information.
For example, to implement an output object, you need to define an
`obs_output_info` structure and fill it out with information and
callbacks related to your output:
.. code:: cpp
/* my-output.c */
[...]
struct obs_output_info my_output {
.id = "my_output",
.flags = OBS_OUTPUT_AV | OBS_OUTPUT_ENCODED,
.get_name = my_output_name,
.create = my_output_create,
.destroy = my_output_destroy,
.start = my_output_start,
.stop = my_output_stop,
.encoded_packet = my_output_data,
.get_total_bytes = my_output_total_bytes,
.encoded_video_codecs = "h264",
.encoded_audio_codecs = "aac"
};
Then, in my-plugin.c, you would call `obs_register_output()` in
`obs_module_load()` to register the output with libobs.
.. code:: cpp
/* my-plugin.c */
[...]
extern struct obs_output_info my_output; /* Defined in my-output.c */
bool obs_module_load(void)
{
obs_register_output(&my_output);
[...]
return true;
}
Some examples of outputs:
- Encoded video/audio outputs:
- The `FLV output `_
- The `FFmpeg muxer output `_
- The `RTMP stream output `_
- Raw video/audio outputs:
- The `FFmpeg output `_
.. _plugins_encoders:
## Encoders
Encoders are OBS-specific implementations of video/audio encoders, which
are used with outputs that use encoders. x264, NVENC, Quicksync are
examples of encoder implementations. The `libobs/obs-encoder.h`_ file
is the dedicated header for implementing encoders. See the
`reference-encoders` for more information.
For example, to implement an encoder object, you need to define an
`obs_encoder_info` structure and fill it out with information
and callbacks related to your encoder:
.. code:: cpp
/* my-encoder.c */
[...]
struct obs_encoder_info my_encoder_encoder = {
.id = "my_encoder",
.type = OBS_ENCODER_VIDEO,
.codec = "h264",
.get_name = my_encoder_name,
.create = my_encoder_create,
.destroy = my_encoder_destroy,
.encode = my_encoder_encode,
.update = my_encoder_update,
.get_extra_data = my_encoder_extra_data,
.get_sei_data = my_encoder_sei,
.get_video_info = my_encoder_video_info
};
Then, in my-plugin.c, you would call `obs_register_encoder()`
in `obs_module_load()` to register the encoder with libobs.
.. code:: cpp
/* my-plugin.c */
[...]
extern struct obs_encoder_info my_encoder; /* Defined in my-encoder.c */
bool obs_module_load(void)
{
obs_register_encoder(&my_encoder);
[...]
return true;
}
**IMPORTANT NOTE:** Encoder settings currently have a few expected
common setting values that should have a specific naming convention:
- **"bitrate"** - This value should be used for both video and audio
encoders: bitrate, in kilobits.
- **"rate_control"** - This is a setting used for video encoders.
It's generally expected to have at least a "CBR" rate control.
Other common rate controls are "VBR", "CQP".
- **"keyint_sec"** - For video encoders, sets the keyframe interval
value, in seconds, or closest possible approximation. *(Author's
note: This should have have been "keyint", in frames.)*
Examples of encoders:
- Video encoders:
- The `x264 encoder `_
- The `FFmpeg NVENC encoder `_
- The `Quicksync encoder `_
- Audio encoders:
- The `FFmpeg AAC/Opus encoder `_
.. _plugins_services:
## Services
Services are custom implementations of streaming services, which are
used with outputs that stream. For example, you could have a custom
implementation for streaming to Twitch, and another for YouTube to allow
the ability to log in and use their APIs to do things such as get the
RTMP servers or control the channel. The `libobs/obs-service.h`_ file
is the dedicated header for implementing services. See the
`reference-services` for more information.
*(Author's note: the service API is incomplete as of this writing)*
For example, to implement a service object, you need to define an
`obs_service_info` structure and fill it out with information
and callbacks related to your service:
.. code:: cpp
/* my-service.c */
[...]
struct obs_service_info my_service_service = {
.id = "my_service",
.get_name = my_service_name,
.create = my_service_create,
.destroy = my_service_destroy,
.encode = my_service_encode,
.update = my_service_update,
.get_url = my_service_url,
.get_key = my_service_key
};
Then, in my-plugin.c, you would call `obs_register_service()` in
`obs_module_load()` to register the service with libobs.
.. code:: cpp
/* my-plugin.c */
[...]
extern struct obs_service_info my_service; /* Defined in my-service.c */
bool obs_module_load(void)
{
obs_register_service(&my_service);
[...]
return true;
}
The only two existing services objects are the "common RTMP services"
and "custom RTMP service" objects in `plugins/rtmp-services
`_
## Settings
Settings (see `libobs/obs-data.h`_) are used to get or set settings data
typically associated with libobs objects, and can then be saved and
loaded via Json text. See the `reference-settings` for more
information.
The *obs_data_t* is the equivalent of a Json object, where it's a string
table of sub-objects, and the *obs_data_array_t* is similarly used to
store an array of *obs_data_t* objects, similar to Json arrays (though
not quite identical).
To create an *obs_data_t* or *obs_data_array_t* object, you'd call the
`obs_data_create()` or `obs_data_array_create()`
functions. *obs_data_t* and *obs_data_array_t* objects are reference
counted, so when you are finished with the object, call
`obs_data_release()` or `obs_data_array_release()` to
release those references. Any time an *obs_data_t* or
*obs_data_array_t* object is returned by a function, their references
are incremented, so you must release those references each time.
To set values for an *obs_data_t* object, you'd use one of the following
functions:
.. code:: cpp
/* Set functions */
EXPORT void obs_data_set_string(obs_data_t *data, const char *name, const char *val);
EXPORT void obs_data_set_int(obs_data_t *data, const char *name, long long val);
EXPORT void obs_data_set_double(obs_data_t *data, const char *name, double val);
EXPORT void obs_data_set_bool(obs_data_t *data, const char *name, bool val);
EXPORT void obs_data_set_obj(obs_data_t *data, const char *name, obs_data_t *obj);
EXPORT void obs_data_set_array(obs_data_t *data, const char *name, obs_data_array_t *array);
Similarly, to get a value from an *obs_data_t* object, you'd use one of
the following functions:
.. code:: cpp
/* Get functions */
EXPORT const char *obs_data_get_string(obs_data_t *data, const char *name);
EXPORT long long obs_data_get_int(obs_data_t *data, const char *name);
EXPORT double obs_data_get_double(obs_data_t *data, const char *name);
EXPORT bool obs_data_get_bool(obs_data_t *data, const char *name);
EXPORT obs_data_t *obs_data_get_obj(obs_data_t *data, const char *name);
EXPORT obs_data_array_t *obs_data_get_array(obs_data_t *data, const char *name);
Unlike typical Json data objects, the *obs_data_t* object can also set
default values. This allows the ability to control what is returned if
there is no value assigned to a specific string in an *obs_data_t*
object when that data is loaded from a Json string or Json file. Each
libobs object also has a *get_defaults* callback which allows setting
the default settings for the object on creation.
These functions control the default values are as follows:
.. code:: cpp
/* Default value functions. */
EXPORT void obs_data_set_default_string(obs_data_t *data, const char *name, const char *val);
EXPORT void obs_data_set_default_int(obs_data_t *data, const char *name, long long val);
EXPORT void obs_data_set_default_double(obs_data_t *data, const char *name, double val);
EXPORT void obs_data_set_default_bool(obs_data_t *data, const char *name, bool val);
EXPORT void obs_data_set_default_obj(obs_data_t *data, const char *name, obs_data_t *obj);
## Properties
Properties (see `libobs/obs-properties.h`_) are used to automatically
generate user interface to modify settings for a libobs object (if
desired). Each libobs object has a *get_properties* callback which is
used to generate properties. The properties API defines specific
properties that are linked to the object's settings, and the front-end
uses those properties to generate widgets in order to allow the user to
modify the settings. For example, if you had a boolean setting, you
would use `obs_properties_add_bool()` to allow the user to be
able to change that setting. See the `reference-properties` for
more information.
An example of this:
.. code:: cpp
static obs_properties_t *my_source_properties(void *data)
{
obs_properties_t *ppts = obs_properties_create();
obs_properties_add_bool(ppts, "my_bool",
obs_module_text("MyBool"));
UNUSED_PARAMETER(data);
return ppts;
}
[...]
struct obs_source_info my_source {
.get_properties = my_source_properties,
[...]
};
The *data* parameter is the object's data if the object is present.
Typically this is unused and probably shouldn't be used if possible. It
can be null if the properties are retrieved without an object associated
with it.
Properties can also be modified depending on what settings are shown.
For example, you can mark certain properties as disabled or invisible
depending on what a particular setting is set to using the
`obs_property_set_modified_callback()` function.
For example, if you wanted boolean property A to hide text property B:
.. code:: cpp
static bool setting_a_modified(obs_properties_t *ppts,
obs_property_t *p, obs_data_t *settings)
{
bool enabled = obs_data_get_bool(settings, "setting_a");
p = obs_properties_get(ppts, "setting_b");
obs_property_set_enabled(p, enabled);
/* return true to update property widgets, false
otherwise */
return true;
}
[...]
static obs_properties_t *my_source_properties(void *data)
{
obs_properties_t *ppts = obs_properties_create();
obs_property_t *p;
p = obs_properties_add_bool(ppts, "setting_a",
obs_module_text("SettingA"));
obs_property_set_modified_callback(p, setting_a_modified);
obs_properties_add_text(ppts, "setting_b",
obs_module_text("SettingB"),
OBS_TEXT_DEFAULT);
return ppts;
}
## Localization
Typically, most plugins bundled with OBS Studio will use a simple
ini-file localization method, where each file is a different language.
When using this method, the `OBS_MODULE_USE_DEFAULT_LOCALE()`
macro is used which will automatically load/destroy the locale data with
no extra effort on part of the plugin. Then the
`obs_module_text()` function (which is automatically declared as
an extern by `libobs/obs-module.h`_) is used when text lookup is needed.
There are two exports the module used to load/destroy locale: the
`obs_module_set_locale()` export, and the
`obs_module_free_locale()` export. The
`obs_module_set_locale()` export is called by libobs to set the
current language, and then the `obs_module_free_locale()` export
is called by libobs on destruction of the module. If you wish to
implement a custom locale implementation for your plugin, you'd want to
define these exports along with the `obs_module_text()` extern
yourself instead of relying on the
`OBS_MODULE_USE_DEFAULT_LOCALE()` macro.
.. ---------------------------------------------------------------------------
.. _libobs/obs-module.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-module.h
.. _libobs/obs.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs.h
.. _libobs/obs-source.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-source.h
.. _libobs/obs-output.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-output.h
.. _libobs/obs-encoder.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-encoder.h
.. _libobs/obs-service.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-service.h
.. _libobs/obs-data.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-data.h
.. _libobs/obs-properties.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-properties.h
.. _libobs/graphics/graphics.h: https://github.com/obsproject/obs-studio/blob/master/libobs/graphics/graphics.h
# Canvas API Reference (obs_canvas_t)
.. danger::
Canvases are still in their early stages of implementation and the API will evolve as they are gradually integrated
across OBS Studio.
The Canvas API should be considered **unstable** and may be changed without warning. This documentation serves to aid
in their iterative development within OBS Studio.
**If you are developing a plugin that utilizes canvases, proceed with great caution.**
Canvases are reference-counted objects that contain scenes and define how those are rendered.
They provide a video object which can be used with encoders or raw outputs.
libobs maintains a main canvas that exists at all times and is used for the default video outputs.
`obs_canvas_t`
A reference-counted canvas.
`obs_weak_canvas_t`
A weak reference to a canvas.
.. code:: cpp
#include
.. _canvas_signal_handler_reference:
## Canvas Signals
The following signals are defined for canvases:
**remove** (ptr canvas)
Called when the `obs_canvas_remove()` function is called on the canvas.
**destroy** (ptr canvas)
Called when a canvas is about to be destroyed.
**video_reset** (ptr canvas)
Called when the canvas's video mix has been reset after a call to
`obs_reset_video()` or `obs_canvas_reset_video()`.
**source_add** (ptr canvas, ptr source)
Called when a source has been added to the canvas.
**source_remove** (ptr canvas, ptr source)
Called when a source has been removed from the canvas.
**rename** (ptr canvas, string new_name, string prev_name)
Called when the canvas has been renamed.
**channel_change** (ptr canvas, int channel, in out ptr source, ptr prev_source)
Called when a channel source has been changed.
## Canvas Flags
Canvases can have different behaviors, these can be controlled via the **flags** parameter when creating a canvas.
Flags may be `0` or a bitwise `OR` combination of the following values:
- **MAIN** - Main canvas, cannot be renamed or reset, cannot be set by user
- **ACTIVATE** - Canvas's sources will become active when they are visible
- **MIX_AUDIO** - Audio from channels in this canvas will be mixed into the audio output
- **SCENE_REF** - Canvas will hold references for scene sources
- **EPHEMERAL** - Indicates this canvas is not supposed to be saved
Additionally, the following preset combinations of flags are defined:
- **PROGRAM** which equals `ACTIVATE | MIX_AUDIO | SCENE_REF`
- **PREVIEW** which equals `EPHEMERAL`
- **DEVICE** which equals `ACTIVATE | EPHEMERAL`
## General Canvas Functions
`obs_canvas_t *obs_get_main_canvas()`
Get a strong reference to the main OBS canvas.
`obs_canvas_t *obs_canvas_create(const char *name, struct obs_video_info *ovi, uint32_t flags)`
Creates a new canvas.
:param name: Name, will be deduplicated if necessary
:param ovi: Video configuration to use for this canvas's video output
:param flags: Canvas flags
:return: Canvas object
`obs_canvas_t *obs_canvas_create_private(const char *name, struct obs_video_info *ovi, uint32_t flags)`
Creates a new private canvas.
:param name: Name, will **not** be deduplicated
:param ovi: Video configuration to use for this canvas's video output
:param flags: Canvas flags
:return: Canvas object
`void obs_canvas_remove(obs_canvas_t *canvas)`
Signal that references to canvas should be released and mark the canvas as removed.
`bool obs_canvas_removed(obs_canvas_t *canvas)`
Returns if a canvas is marked as removed (i.e., should no longer be used).
`void obs_canvas_set_name(obs_canvas_t *canvas, const char *name)`
Set canvas name
`const char *obs_canvas_get_name(const obs_canvas_t *canvas)`
Get canvas name
`const char *obs_canvas_get_uuid(const obs_canvas_t *canvas)`
Get canvas UUID
`uint32_t obs_canvas_get_flags(const obs_canvas_t *canvas)`
Gets flags set on a canvas
## Saving/Loading Functions
`obs_data_t *obs_save_canvas(obs_canvas_t *source)`
Saves a canvas to settings data
`obs_canvas_t *obs_load_canvas(obs_data_t *data)`
Loads a canvas from settings data
## Reference Counting Functions
`obs_canvas_t *obs_canvas_get_ref(obs_canvas_t *canvas)`
Add strong reference to a canvas
`void obs_canvas_release(obs_canvas_t *canvas)`
Release strong reference
`void obs_weak_canvas_addref(obs_weak_canvas_t *weak)`
Add weak reference
`void obs_weak_canvas_release(obs_weak_canvas_t *weak)`
Release weak reference
`obs_weak_canvas_t *obs_canvas_get_weak_canvas(obs_canvas_t *canvas)`
Get weak reference from strong reference
`obs_canvas_t *obs_weak_canvas_get_canvas(obs_weak_canvas_t *weak)`
Get strong reference from weak reference
## Canvas Channel Functions
`void obs_canvas_set_channel(obs_canvas_t *canvas, uint32_t channel, obs_source_t *source)`
Sets the source to be used for a canvas channel.
`obs_source_t *obs_canvas_get_channel(obs_canvas_t *canvas, uint32_t channel)`
Gets the source currently in use for a canvas channel.
## Canvas Source List Functions
`obs_scene_t *obs_canvas_scene_create(obs_canvas_t *canvas, const char *name)`
Create scene attached to a canvas.
`void obs_canvas_scene_remove(obs_scene_t *scene)`
Remove a scene from a canvas.
`void obs_canvas_move_scene(obs_scene_t *scene, obs_canvas_t *dst)`
Move scene to another canvas, detaching it from the previous one and deduplicating the name if needed.
`void obs_canvas_enum_scenes(obs_canvas_t *canvas, bool (*enum_proc)(void *, obs_source_t *), void *param)`
Enumerates scenes belonging to a canvas.
Callback function returns true to continue enumeration, or false to end enumeration.
`obs_source_t *obs_canvas_get_source_by_name(const char *name)`
Gets a canvas source by its name.
Increments the source reference counter, use
`obs_source_release()` to release it when complete.
`obs_scene_t *obs_canvas_get_scene_by_name(const char *name)`
Gets a canvas scene by its name.
Increments the source reference counter, use
`obs_scene_release()` to release it when complete.
## Canvas Video Functions
`bool obs_canvas_reset_video(obs_canvas_t *canvas, struct obs_video_info *ovi)`
Reset a canvas's video configuration.
Note that the frame rate property is ignored and the global rendering frame rate is used instead.
`bool obs_canvas_has_video(obs_canvas_t *canvas)`
Returns true if the canvas video is configured.
`video_t *obs_canvas_get_video(const obs_canvas_t *canvas)`
Get canvas video output
`bool obs_canvas_get_video_info(const obs_canvas_t *canvas, struct obs_video_info *ovi)`
Get canvas video info (if any)
`void obs_canvas_render(obs_canvas_t *canvas)`
Render the canvas's view. Must be called on the graphics thread.
# Core API Object Reference
.. toctree::
:maxdepth: 3
Sources (obs_source_t)
Scenes (obs_scene_t)
Outputs (obs_output_t)
Encoders (obs_encoder_t)
Services (obs_service_t)
Data Settings (obs_data_t)
Properties (obs_properties_t)
# OBS Core API Reference
.. code:: cpp
#include
.. _obs_init_shutdown_reference:
## Initialization, Shutdown, and Information
`bool obs_startup(const char *locale, const char *module_config_path, profiler_name_store_t *store)`
Initializes the OBS core context.
:param locale: The locale to use for modules
(E.G. "en-US")
:param module_config_path: Path to module config storage directory
(or *NULL* if none)
:param store: The profiler name store for OBS to use or NULL
:return: *false* if already initialized or failed
to initialize
`void obs_shutdown(void)`
Releases all data associated with OBS and terminates the OBS context.
`bool obs_initialized(void)`
:return: true if the main OBS context has been initialized
`uint32_t obs_get_version(void)`
:return: The current core version
`const char *obs_get_version_string(void)`
:return: The current core version string
`void obs_set_locale(const char *locale)`
Sets a new locale to use for modules. This will call
`obs_module_set_locale()` for each module with the new locale.
:param locale: The locale to use for modules
`const char *obs_get_locale(void)`
:return: The current locale
`profiler_name_store_t *obs_get_profiler_name_store(void)`
:return: The profiler name store (see util/profiler.h) used by OBS,
which is either a name store passed to `obs_startup()`, an
internal name store, or NULL in case `obs_initialized()`
returns false.
`int obs_reset_video(struct obs_video_info *ovi)`
Sets base video output base resolution/fps/format.
Note: This data cannot be changed if an output is currently active.
Note: The graphics module cannot be changed without fully destroying
the OBS context.
:param ovi: Pointer to an obs_video_info structure containing the
specification of the graphics subsystem,
:return: | OBS_VIDEO_SUCCESS - Success
| OBS_VIDEO_NOT_SUPPORTED - The adapter lacks capabilities
| OBS_VIDEO_INVALID_PARAM - A parameter is invalid
| OBS_VIDEO_CURRENTLY_ACTIVE - Video is currently active
| OBS_VIDEO_MODULE_NOT_FOUND - The graphics module is not found
| OBS_VIDEO_FAIL - Generic failure
Relevant data types used with this function:
.. code:: cpp
struct obs_video_info {
/**
* Graphics module to use (usually "libobs-opengl" or "libobs-d3d11")
*/
const char *graphics_module;
uint32_t fps_num; /**< Output FPS numerator */
uint32_t fps_den; /**< Output FPS denominator */
uint32_t base_width; /**< Base compositing width */
uint32_t base_height; /**< Base compositing height */
uint32_t output_width; /**< Output width */
uint32_t output_height; /**< Output height */
enum video_format output_format; /**< Output format */
/** Video adapter index to use (NOTE: avoid for optimus laptops) */
uint32_t adapter;
/** Use shaders to convert to different color formats */
bool gpu_conversion;
enum video_colorspace colorspace; /**< YUV type (if YUV) */
enum video_range_type range; /**< YUV range (if YUV) */
enum obs_scale_type scale_type; /**< How to scale if scaling */
};
`bool obs_reset_audio(const struct obs_audio_info *oai)`
Sets base audio output format/channels/samples/etc.
Note: Cannot reset base audio if an output is currently active.
:return: *true* if successful, *false* otherwise
Relevant data types used with this function:
.. code:: cpp
struct obs_audio_info {
uint32_t samples_per_sec;
enum speaker_layout speakers;
};
`bool obs_reset_audio2(const struct obs_audio_info2 *oai)`
Sets base audio output format/channels/samples/etc. Also allows the
ability to set the maximum audio latency of OBS, and set whether the
audio buffering is fixed or dynamically increasing.
When using fixed audio buffering, OBS will automatically buffer to
the maximum audio latency on startup.
Maximum audio latency will clamp to the closest multiple of the audio
output frames (which is typically 1024 audio frames).
Note: Cannot reset base audio if an output is currently active.
:return: *true* if successful, *false* otherwise
Relevant data types used with this function:
.. code:: cpp
struct obs_audio_info2 {
uint32_t samples_per_sec;
enum speaker_layout speakers;
uint32_t max_buffering_ms;
bool fixed_buffering;
};
`bool obs_get_video_info(struct obs_video_info *ovi)`
Gets the current video settings.
:return: *false* if no video
`float obs_get_video_sdr_white_level(void)`
Gets the current SDR white level.
:return: SDR white level, 300.f if no video
`float obs_get_video_hdr_nominal_peak_level(void)`
Gets the current HDR nominal peak level.
:return: HDR nominal peak level, 1000.f if no video
`void obs_set_video_levels(float sdr_white_level, float hdr_nominal_peak_level)`
Sets the current video levels.
`bool obs_get_audio_info(struct obs_audio_info *oai)`
Gets the current audio settings.
:return: *false* if no audio
## Libobs Objects
`bool obs_enum_source_types(size_t idx, const char **id)`
Enumerates all source types (inputs, filters, transitions, etc).
`bool obs_enum_input_types(size_t idx, const char **id)`
Enumerates all available inputs source types.
Inputs are general source inputs (such as capture sources, device sources,
etc).
`bool obs_enum_filter_types(size_t idx, const char **id)`
Enumerates all available filter source types.
Filters are sources that are used to modify the video/audio output of
other sources.
`bool obs_enum_transition_types(size_t idx, const char **id)`
Enumerates all available transition source types.
Transitions are sources used to transition between two or more other
sources.
`bool obs_enum_output_types(size_t idx, const char **id)`
Enumerates all available output types.
`bool obs_enum_encoder_types(size_t idx, const char **id)`
Enumerates all available encoder types.
`bool obs_enum_service_types(size_t idx, const char **id)`
Enumerates all available service types.
`void obs_enum_sources(bool (*enum_proc)(void*, obs_source_t*), void *param)`
Enumerates all input sources.
Callback function returns true to continue enumeration, or false to end
enumeration.
Use `obs_source_get_ref()` or
`obs_source_get_weak_source()` if you want to retain a
reference after obs_enum_sources finishes.
For scripting, use :py`obs_enum_sources`.
`void obs_enum_scenes(bool (*enum_proc)(void*, obs_source_t*), void *param)`
Enumerates all scenes. Use `obs_scene_from_source()` if the scene is
needed as an `obs_scene_t`. The order that they are enumerated should
not be relied on. If one intends to enumerate the scenes in the order
presented by the OBS Studio Frontend, use `obs_frontend_get_scenes()`.
Callback function returns true to continue enumeration, or false to end
enumeration.
Use `obs_source_get_ref()` or
`obs_source_get_weak_source()` if you want to retain a
reference after obs_enum_scenes finishes.
`void obs_enum_outputs(bool (*enum_proc)(void*, obs_output_t*), void *param)`
Enumerates outputs.
Callback function returns true to continue enumeration, or false to end
enumeration.
Use `obs_output_get_ref()` or
`obs_output_get_weak_output()` if you want to retain a
reference after obs_enum_outputs finishes.
`void obs_enum_encoders(bool (*enum_proc)(void*, obs_encoder_t*), void *param)`
Enumerates encoders.
Callback function returns true to continue enumeration, or false to end
enumeration.
Use `obs_encoder_get_ref()` or
`obs_encoder_get_weak_encoder()` if you want to retain a
reference after obs_enum_encoders finishes.
`void obs_enum_canvases(bool (*enum_proc)(void*, obs_canvas_t*), void *param)`
Enumerates canvases.
Callback function returns true to continue enumeration, or false to end
enumeration.
Use `obs_canvas_get_ref()` or
`obs_canvas_get_weak_canvas()` if you want to retain a
reference after obs_enum_canvases finishes.
`obs_source_t *obs_get_source_by_name(const char *name)`
Gets a source by its name.
Increments the source reference counter, use
`obs_source_release()` to release it when complete.
`obs_source_t *obs_get_source_by_uuid(const char *uuid)`
Gets a source by its UUID.
Increments the source reference counter, use
`obs_source_release()` to release it when complete.
.. versionadded:: 29.1
`obs_source_t *obs_get_transition_by_name(const char *name)`
Gets a transition by its name.
Increments the source reference counter, use
`obs_source_release()` to release it when complete.
.. deprecated:: 31.1
Use `obs_frontend_get_transitions` from the Frontend API or `obs_get_source_by_uuid` instead.
`obs_source_t *obs_get_transition_by_uuid(const char *uuid)`
Gets a transition by its UUID.
Increments the source reference counter, use
`obs_source_release()` to release it when complete.
.. versionadded:: 29.1
.. deprecated:: 31.1
Use `obs_get_source_by_uuid` instead.
`obs_scene_t *obs_get_scene_by_name(const char *name)`
Gets a scene by its name.
Increments the scene reference counter, use
`obs_scene_release()` to release it when complete.
`obs_output_t *obs_get_output_by_name(const char *name)`
Gets an output by its name.
Increments the output reference counter, use
`obs_output_release()` to release it when complete.
`obs_encoder_t *obs_get_encoder_by_name(const char *name)`
Gets an encoder by its name.
Increments the encoder reference counter, use
`obs_encoder_release()` to release it when complete.
`obs_service_t *obs_get_service_by_name(const char *name)`
Gets an service by its name.
Increments the service reference counter, use
`obs_service_release()` to release it when complete.
`obs_canvas_t *obs_get_canvas_by_name(const char *name)`
Get a canvas by its name.
Increments the canvas reference counter, use
`obs_canvas_release()` to release it when complete.
`obs_canvas_t *obs_get_canvas_by_uuid(const char *uuid)`
Get a canvas by its UUID.
Increments the canvas reference counter, use
`obs_canvas_release()` to release it when complete.
`obs_data_t *obs_save_source(obs_source_t *source)`
:return: A new reference to a source's saved data. Use
`obs_data_release()` to release it when complete.
`obs_source_t *obs_load_source(obs_data_t *data)`
:return: A source created from saved data
`void obs_load_sources(obs_data_array_t *array, obs_load_source_cb cb, void *private_data)`
Helper function to load active sources from a data array.
Relevant data types used with this function:
.. code:: cpp
typedef void (*obs_load_source_cb)(void *private_data, obs_source_t *source);
`obs_data_array_t *obs_save_sources(void)`
:return: A data array with the saved data of all active sources
`obs_data_array_t *obs_save_sources_filtered(obs_save_source_filter_cb cb, void *data)`
:return: A data array with the saved data of all active sources,
filtered by the *cb* function
Relevant data types used with this function:
.. code:: cpp
typedef bool (*obs_save_source_filter_cb)(void *data, obs_source_t *source);
## Video, Audio, and Graphics
`void obs_enter_graphics(void)`
Helper function for entering the OBS graphics context.
`void obs_leave_graphics(void)`
Helper function for leaving the OBS graphics context.
`audio_t *obs_get_audio(void)`
:return: The main audio output handler for this OBS context
`video_t *obs_get_video(void)`
:return: The main video output handler for this OBS context
`void obs_get_video_frame_counts(uint32_t *total, uint32_t *skipped)`
Gets the number of frames the main canvas has sent to its video
encoders and raw outputs, and the number it skipped because one of them
could not keep up (encoding lag). Counts the main video mix and the
video mixes created for encoders that rescale it on the GPU
(`obs_encoder_set_scaled_size()` with a GPU scale type), each
once; `video_output_get_total_frames()` of
`obs_get_video()` misses the latter. A rescaling encoder's mix
is removed when the encoder stops, so the totals can go down.
:param total: Receives the number of frames (may be *NULL*)
:param skipped: Receives the number of skipped frames (may be *NULL*)
`void obs_set_output_source(uint32_t channel, obs_source_t *source)`
Sets the primary output source for a channel.
`obs_source_t *obs_get_output_source(uint32_t channel)`
Gets the primary output source for a channel and increments the reference
counter for that source. Use `obs_source_release()` to release.
`gs_effect_t *obs_get_base_effect(enum obs_base_effect effect)`
Returns a commonly used base effect.
:param effect: | Can be one of the following values:
| OBS_EFFECT_DEFAULT - RGB/YUV
| OBS_EFFECT_DEFAULT_RECT - RGB/YUV (using texture_rect)
| OBS_EFFECT_OPAQUE - RGB/YUV (alpha set to 1.0)
| OBS_EFFECT_SOLID - RGB/YUV (solid color only)
| OBS_EFFECT_BICUBIC - Bicubic downscale
| OBS_EFFECT_LANCZOS - Lanczos downscale
| OBS_EFFECT_BILINEAR_LOWRES - Bilinear low resolution downscale
| OBS_EFFECT_PREMULTIPLIED_ALPHA - Premultiplied alpha
`void obs_render_main_texture(void)`
Renders the main output texture. Useful for rendering a preview pane
of the main output.
`bool obs_audio_monitoring_available(void)`
:return: Whether audio monitoring is supported and available on the current platform
`void obs_reset_audio_monitoring(void)`
Resets all audio monitoring devices.
.. versionadded:: 30.1
`void obs_enum_audio_monitoring_devices(obs_enum_audio_device_cb cb, void *data)`
Enumerates audio devices which can be used for audio monitoring.
Callback function returns true to continue enumeration, or false to end
enumeration.
Relevant data types used with this function:
.. code:: cpp
typedef bool (*obs_enum_audio_device_cb)(void *data, const char *name, const char *id);
`bool obs_set_audio_monitoring_device(const char *name, const char *id)`
Sets the current audio device for audio monitoring.
`void obs_get_audio_monitoring_device(const char **name, const char **id)`
Gets the current audio device for audio monitoring.
`void obs_add_main_render_callback(void (*draw)(void *param, uint32_t cx, uint32_t cy), void *param)`
void obs_remove_main_render_callback(void (*draw)(void *param, uint32_t cx, uint32_t cy), void *param)
Adds/removes a main rendering callback. Allows custom rendering to
the main stream/recording output.
For scripting (**Lua only**), use :py`obs_add_main_render_callback`
and :py`obs_remove_main_render_callback`.
`void obs_add_main_rendered_callback(void (*rendered)(void *param), void *param)`
void obs_remove_main_rendered_callback(void (*rendered)(void *param), void *param)
Adds/removes a main rendered callback. Allows using the result of
the main stream/recording output.
.. versionadded:: 29.1
`void obs_add_raw_video_callback(const struct video_scale_info *conversion, void (*callback)(void *param, struct video_data *frame), void *param)`
void obs_remove_raw_video_callback(void (*callback)(void *param, struct video_data *frame), void *param)
Adds/removes a raw video callback. Allows the ability to obtain raw
video frames without necessarily using an output.
:param conversion: Specifies conversion requirements. Can be NULL.
:param callback: The callback that receives raw video frames.
:param param: The private data associated with the callback.
`void obs_add_raw_audio_callback(size_t mix_idx, const struct audio_convert_info *conversion, audio_output_callback_t callback, void *param)`
void obs_remove_raw_raw_callback(size_t track, audio_output_callback_t callback, void *param)
Adds/removes a raw audio callback. Allows the ability to obtain raw
audio data without necessarily using an output.
:param mix_idx: Specifies audio track to get data from.
:param conversion: Specifies conversion requirements. Can be NULL.
:param callback: The callback that receives raw audio data.
:param param: The private data associated with the callback.
## Primary signal/procedure handlers
`signal_handler_t *obs_get_signal_handler(void)`
:return: The primary obs signal handler. Should not be manually freed,
as its lifecycle is managed by libobs.
See `core_signal_handler_reference` for more information on
core signals.
`proc_handler_t *obs_get_proc_handler(void)`
:return: The primary obs procedure handler. Should not be manually freed,
as its lifecycle is managed by libobs.
.. _core_signal_handler_reference:
## Core OBS Signals
**source_create** (ptr source)
Called when a source has been created.
**source_destroy** (ptr source)
Called when a source has been destroyed.
**source_remove** (ptr source)
Called when a source has been removed (`obs_source_remove()`
has been called on the source).
**source_update** (ptr source)
Called when a source's settings have been updated.
**source_save** (ptr source)
Called when a source is being saved.
**source_load** (ptr source)
Called when a source is being loaded.
**source_activate** (ptr source)
Called when a source has been activated in the main view (visible on
stream/recording).
**source_deactivate** (ptr source)
Called when a source has been deactivated from the main view (no
longer visible on stream/recording).
**source_show** (ptr source)
Called when a source is visible on any display and/or on the main
view.
**source_hide** (ptr source)
Called when a source is no longer visible on any display and/or on
the main view.
**source_rename** (ptr source, string new_name, string prev_name)
Called when a source has been renamed.
**source_volume** (ptr source, in out float volume)
Called when a source's volume has changed.
**source_audio_activate** (ptr source)
Called when a source's audio becomes active.
**source_audio_deactivate** (ptr source)
Called when a source's audio becomes inactive.
**source_filter_add** (ptr source, ptr filter)
Called when a filter is added to a source.
**source_filter_remove** (ptr source, ptr filter)
Called when a filter is removed from a source.
**source_transition_start** (ptr source)
Called when a transition has started its transition.
**source_transition_video_stop** (ptr source)
Called when a transition has stopped its video transitioning.
**source_transition_stop** (ptr source)
Called when a transition has stopped its transition.
**channel_change** (int channel, in out ptr source, ptr prev_source)
Called when `obs_set_output_source()` has been called.
**hotkey_layout_change** ()
Called when the hotkey layout has changed.
**hotkey_register** (ptr hotkey)
Called when a hotkey has been registered.
**hotkey_unregister** (ptr hotkey)
Called when a hotkey has been unregistered.
**hotkey_bindings_changed** (ptr hotkey)
Called when a hotkey's bindings has changed.
**hotkey_background_press_changed** (bool enabled)
Called when `obs_hotkey_enable_background_press()` changes
whether the hotkey thread presses hotkeys.
**hotkey_background_status_changed** ()
Called (on any thread) when the state of background hotkeys provided by
the desktop changes (the GlobalShortcuts portal on Wayland); see
`obs_hotkeys_get_background_state()` in obs-hotkey.h.
**hotkey_background_probe** (string id)
Called when the desktop activates the shortcut *id* while
`obs_hotkeys_set_background_probe(true)` is in effect; no hotkey is
pressed meanwhile.
**canvas_create** (ptr canvas)
Called when a new public canvas has been created.
**canvas_remove** (ptr canvas)
Called when the `obs_canvas_remove()` function is called on a public canvas.
**canvas_destroy** (ptr canvas)
Called when a public canvas is about to be destroyed.
**canvas_video_reset** (ptr canvas)
Called when a public canvas's video mix has been reset after a call to
`obs_reset_video()` or `obs_canvas_reset_video()`.
**canvas_rename** (ptr canvas, string new_name, string prev_name)
Called when a public canvas has been renamed.
**core_video_release** ()
Called by `obs_reset_video()` before it frees the video mixes.
Every video_t from `obs_get_video()`, `obs_view_add()` or
a canvas is freed after this signal; drop or stop using them here. Outputs
that use the main video or a public canvas are moved to the new mixes by
libobs.
**video_reset** ()
Called when a the main OBS video has been reset.
.. _display_reference:
## Displays
`obs_display_t *obs_display_create(const struct gs_init_data *graphics_data)`
Adds a new window display linked to the main render pipeline. This creates
a new swap chain which updates every frame.
*(Important note: do not use more than one display widget within the
hierarchy of the same base window; this will cause presentation
stalls on macOS.)*
:param graphics_data: The swap chain initialization data
:return: The new display context, or NULL if failed
Relevant data types used with this function:
.. code:: cpp
enum gs_color_format {
[...]
GS_RGBA,
GS_BGRX,
GS_BGRA,
GS_RGBA16F,
GS_RGBA32F,
[...]
};
enum gs_zstencil_format {
GS_ZS_NONE,
GS_Z16,
GS_Z24_S8,
GS_Z32F,
GS_Z32F_S8X24
};
struct gs_window {
#if defined(_WIN32)
void *hwnd;
#elif defined(__APPLE__)
__unsafe_unretained id view;
#elif defined(__linux__) || defined(__FreeBSD__)
uint32_t id;
void *display;
#endif
};
struct gs_init_data {
struct gs_window window;
uint32_t cx, cy;
uint32_t num_backbuffers;
enum gs_color_format format;
enum gs_zstencil_format zsformat;
uint32_t adapter;
};
`void obs_display_destroy(obs_display_t *display)`
Destroys a display context.
`void obs_display_resize(obs_display_t *display, uint32_t cx, uint32_t cy)`
Changes the size of a display context.
`void obs_display_add_draw_callback(obs_display_t *display, void (*draw)(void *param, uint32_t cx, uint32_t cy), void *param)`
Adds a draw callback for a display context, which will be called
whenever the display is rendered.
:param display: The display context
:param draw: The draw callback which is called each time a frame
updates
:param param: The user data to be associated with this draw callback
`void obs_display_remove_draw_callback(obs_display_t *display, void (*draw)(void *param, uint32_t cx, uint32_t cy), void *param)`
Removes a draw callback for a display context.
`void obs_display_set_enabled(obs_display_t *display, bool enable)`
Enables/disables a display context.
`bool obs_display_enabled(obs_display_t *display)`
:return: *true* if the display is enabled, *false* otherwise
`void obs_display_set_background_color(obs_display_t *display, uint32_t color)`
Sets the background (clear) color for the display context.
.. _view_reference:
## Views
`obs_view_t *obs_view_create(void)`
:return: A view context
`void obs_view_destroy(obs_view_t *view)`
Destroys a view context.
`void obs_view_render(obs_view_t *view)`
Renders the sources of this view context.
`video_t *obs_view_add(obs_view_t *view)`
Renders the sources of this view context.
:return: The main video output handler for the view context
`video_t *obs_view_add2(obs_view_t *view, struct obs_video_info *ovi)`
Adds a view to the main render loop, with custom video settings.
:return: The main video output handler for the view context
`void obs_view_remove(obs_view_t *view)`
Removes a view from the main render loop.
`void obs_view_set_source(obs_view_t *view, uint32_t channel, obs_source_t *source)`
Sets the source to be used for this view context.
`obs_source_t *obs_view_get_source(obs_view_t *view, uint32_t channel)`
:return: The source currently in use for this view context
`void obs_view_enum_video_info(obs_view_t *view, bool (*enum_proc)(void *, struct obs_video_info *), void *param)`
Enumerates all the video info of all mixes that use the specified mix.
.. versionadded:: 30.1
# Encoder API Reference (obs_encoder_t)
Encoders are OBS-specific implementations of video/audio encoders, which
are used with outputs that use encoders. x264, NVENC, Quicksync are
examples of encoder implementations. The `libobs/obs-encoder.h`_ file
is the dedicated header for implementing encoders
`obs_encoder_t`
A reference-counted encoder object.
`obs_weak_encoder_t`
A weak reference to an encoder object.
.. code:: cpp
#include
## Encoder Definition Structure (obs_encoder_info)
`obs_encoder_info`
Encoder definition structure.
`const char *obs_encoder_info.id`
Unique string identifier for the encoder (required).
`enum obs_encoder_type obs_encoder_info.type`
Type of encoder.
- **OBS_ENCODER_VIDEO** - Video encoder
- **OBS_ENCODER_AUDIO** - Audio encoder
`const char *obs_encoder_info.codec`
The codec, in string form. For example, "h264" for an H.264 encoder.
`const char *(*obs_encoder_info.get_name)(void *type_data)`
Get the translated name of the encoder type.
:param type_data: The type_data variable of this structure
:return: The translated name of the encoder type
`void *(*obs_encoder_info.create)(obs_data_t *settings, obs_encoder_t *encoder)`
Creates the implementation data for the encoder.
:param settings: Settings to initialize the encoder with
:param encoder: Encoder that this data is associated with
:return: The implementation data associated with this encoder
`void (*obs_encoder_info.destroy)(void *data)`
Destroys the implementation data for the encoder.
`bool (*encode)(void *data, struct encoder_frame *frame, struct encoder_packet *packet, bool *received_packet)`
Called to encode video or audio and outputs packets as they become
available.
:param frame: Raw audio/video data to encode
:param packet: Encoder packet output, if any
:param received_packet: Set to *true* if a packet was received,
*false* otherwise
:return: true if successful, false on critical failure
`size_t (*get_frame_size)(void *data)`
:return: An audio encoder's frame size. For example, for AAC this
number would be 1024
`void (*obs_encoder_info.get_defaults)(obs_data_t *settings)`
void (*obs_encoder_info.get_defaults2)(obs_data_t *settings, void *type_data)
Sets the default settings for this encoder.
:param settings: Default settings. Call obs_data_set_default*
functions on this object to set default setting
values
`obs_properties_t *(*obs_encoder_info.get_properties)(void *data)`
obs_properties_t *(*obs_encoder_info.get_properties2)(void *data, void *type_data)
Gets the property information of this encoder.
:param data: The implementation data associated with this encoder.
This value can be null (e.g., when
`obs_get_encoder_properties()` is called on the
encoder type), make sure to handle this gracefully.
(Optional)
:return: The properties of the encoder
`void (*obs_encoder_info.update)(void *data, obs_data_t *settings)`
Updates the settings for this encoder.
(Optional)
:param settings: New settings for this encoder
`bool (*obs_encoder_info.get_extra_data)(void *data, uint8_t **extra_data, size_t *size)`
Returns extra data associated with this encoder (usually header).
(Optional)
:param extra_data: Pointer to receive the extra data
:param size: Pointer to receive the size of the extra
data
:return: true if extra data available, false
otherwise
`bool (*obs_encoder_info.get_sei_data)(void *data, uint8_t **sei_data, size_t *size)`
Gets the SEI data of a video encoder that has SEI data.
(Optional)
:param sei_data: Pointer to receive the SEI data
:param size: Pointer to receive the SEI data size
:return: true if SEI data available, false otherwise
`void (*obs_encoder_info.get_audio_info)(void *data, struct audio_convert_info *info)`
Returns desired audio format and sample information. This callback
can be used to tell the back-end that the audio data needs to be
automatically converted to a different sample rate or audio format
before being sent to the encoder.
(Optional)
:param info: Audio format information
`void (*obs_encoder_info.get_video_info)(void *data, struct video_scale_info *info)`
Returns desired video format information. This callback can be used
to tell the back-end that the video data needs to be automatically
converted to a different video format or specific size before being
sent to the encoder.
:param info: Video format information
`void *obs_encoder_info.type_data`
void (*obs_encoder_info.free_type_data)(void *type_data)
Private data associated with this entry. Note that this is not the
same as the implementation data; this is used to differentiate
between two different types if the same callbacks are used for more
than one different type.
`uint32_t obs_encoder_info.caps`
Can be 0 or a bitwise OR combination of one or more of the following
values:
- **OBS_ENCODER_CAP_DEPRECATED** - Encoder is deprecated
- **OBS_ENCODER_CAP_ROI** - Encoder supports region of interest feature
- **OBS_ENCODER_CAP_SCALING** - Encoder implements its own scaling logic,
desiring to receive unscaled frames
`size_t (*get_priming_samples)(void *data)`
Returns the number of priming samples that must be skipped for correct playback for audio produced by this encoder.
Only required for lossy codecs such as AAC or Opus.
:return: Number of samples
`void (*request_keyframe)(void *data)`
Video encoders only (optional). Asks the encoder to make its next frame
a keyframe. libobs calls it when an output starts on an encoder that is
already running for another output (for example a recording started
while the replay buffer runs), because the new output gets no packet
before a keyframe. It is called from the thread starting the output, so
set a flag that the next encode call acts on.
## Encoder Packet Structure (encoder_packet)
`encoder_packet`
Encoder packet structure.
`uint8_t *encoder_packet.data`
Packet data.
`size_t encoder_packet.size`
Packet size.
`int64_t encoder_packet.pts`
int64_t encoder_packet.dts
Packet presentation and decode timestamps.
`int32_t encoder_packet.timebase_num`
int32_t encoder_packet.timebase_den
Packet time base.
`enum obs_encoder_type encoder_packet.type`
Can be one of the following values:
- **OBS_ENCODER_VIDEO** - Video data
- **OBS_ENCODER_AUDIO** - Audio data
`bool encoder_packet.keyframe`
Packet is a keyframe.
`int64_t encoder_packet.dts_usec`
The DTS in microseconds.
(This should not be set by the encoder implementation)
`int64_t encoder_packet.sys_dts_usec`
The system time of this packet in microseconds.
(This should not be set by the encoder implementation)
`int encoder_packet.priority`
Packet priority. This is no longer used.
(This should not be set by the encoder implementation)
`int encoder_packet.drop_priority`
Packet drop priority.
If this packet needs to be dropped, the next packet must be of this
priority or higher to continue transmission.
(This should not be set by the encoder implementation)
`size_t encoder_packet.track_idx`
Audio track index.
(This should not be set by the encoder implementation)
`obs_encoder_t *encoder_packet.encoder`
Encoder object associated with this packet.
(This should not be set by the encoder implementation)
## Raw Frame Data Structure (encoder_frame)
`encoder_frame`
Raw frame data structure.
`uint8_t *encoder_frame.data[MAX_AV_PLANES]`
Raw video/audio data.
`uint32_t encoder_frame.linesize[MAX_AV_PLANES]`
Line size of each plane.
`uint32_t encoder_frame.frames`
Number of audio frames (if audio).
`int64_t encoder_frame.pts`
Presentation timestamp.
## Encoder Region of Interest Structure (obs_encoder_roi)
`obs_encoder_roi`
Encoder region of interest structure.
.. versionadded:: 30.1
`uint32_t top`
uint32_t bottom
uint32_t left
uint32_t right
The rectangle edges of the region are specified as number of pixels from the input video's top and left edges (i.e. row/column 0).
`float priority`
Priority is specified as a float value between *-1.0f* and *1*.
These are converted to encoder-specific values by the encoder.
Values above 0 tell the encoder to increase quality for that region, values below tell it to worsen it.
Not all encoders support negative values and they may be ignored.
## General Encoder Functions
`void obs_register_encoder(struct obs_encoder_info *info)`
Registers an encoder type. Typically used in
`obs_module_load()` or in the program's initialization phase.
`const char *obs_encoder_get_display_name(const char *id)`
Calls the `obs_encoder_info.get_name` callback to get the
translated display name of an encoder type.
:param id: The encoder type string identifier
:return: The translated display name of an encoder type
`obs_encoder_t *obs_video_encoder_create(const char *id, const char *name, obs_data_t *settings, obs_data_t *hotkey_data)`
Creates a video encoder with the specified settings.
The "encoder" context is used for encoding video/audio data. Use
obs_encoder_release to release it.
:param id: The encoder type string identifier
:param name: The desired name of the encoder. If this is
not unique, it will be made to be unique
:param settings: The settings for the encoder, or *NULL* if
none
:param hotkey_data: Saved hotkey data for the encoder, or *NULL*
if none
:return: A reference to the newly created encoder, or
*NULL* if failed
`obs_encoder_t *obs_audio_encoder_create(const char *id, const char *name, obs_data_t *settings, size_t mixer_idx, obs_data_t *hotkey_data)`
Creates an audio encoder with the specified settings.
The "encoder" context is used for encoding video/audio data. Use
`obs_encoder_release()` to release it.
:param id: The encoder type string identifier
:param name: The desired name of the encoder. If this is
not unique, it will be made to be unique
:param settings: The settings for the encoder, or *NULL* if
none
:param mixer_idx: The audio mixer index this audio encoder
will capture audio from
:param hotkey_data: Saved hotkey data for the encoder, or *NULL*
if none
:return: A reference to the newly created encoder, or
*NULL* if failed
`obs_encoder_t *obs_encoder_get_ref(obs_encoder_t *encoder)`
Returns an incremented reference if still valid, otherwise returns
*NULL*. Release with `obs_encoder_release()`.
`void obs_encoder_release(obs_encoder_t *encoder)`
Releases a reference to an encoder. When the last reference is released,
the encoder is destroyed.
`obs_weak_encoder_t *obs_encoder_get_weak_encoder(obs_encoder_t *encoder)`
obs_encoder_t *obs_weak_encoder_get_encoder(obs_weak_encoder_t *weak)
These functions are used to get a weak reference from a strong encoder
reference, or a strong encoder reference from a weak reference. If
the encoder is destroyed, *obs_weak_encoder_get_encoder* will return
*NULL*.
`void obs_weak_encoder_addref(obs_weak_encoder_t *weak)`
void obs_weak_encoder_release(obs_weak_encoder_t *weak)
Adds/releases a weak reference to an encoder.
`void obs_encoder_set_name(obs_encoder_t *encoder, const char *name)`
Sets the name of an encoder. If the encoder is not private and the
name is not unique, it will automatically be given a unique name.
`const char *obs_encoder_get_name(const obs_encoder_t *encoder)`
:return: The name of the encoder
`const char *obs_encoder_get_codec(const obs_encoder_t *encoder)`
const char *obs_get_encoder_codec(const char *id)
:return: The codec identifier of the encoder
`enum obs_encoder_type obs_encoder_get_type(const obs_encoder_t *encoder)`
enum obs_encoder_type obs_get_encoder_type(const char *id)
:return: The encoder type: OBS_ENCODER_VIDEO or OBS_ENCODER_AUDIO
`void obs_encoder_set_scaled_size(obs_encoder_t *encoder, uint32_t width, uint32_t height)`
Sets the scaled resolution for a video encoder. Set width and height to 0
to disable scaling. If the encoder is active, this function will trigger
a warning, and do nothing.
`bool obs_encoder_scaling_enabled(const obs_encoder_t *encoder)`
:return: *true* if pre-encode (CPU) scaling enabled, *false*
otherwise.
`uint32_t obs_encoder_get_width(const obs_encoder_t *encoder)`
uint32_t obs_encoder_get_height(const obs_encoder_t *encoder)
:return: The width/height of a video encoder's encoded image
`uint32_t obs_encoder_get_sample_rate(const obs_encoder_t *encoder)`
:return: The sample rate of an audio encoder's audio data
`size_t obs_encoder_get_frame_size(const obs_encoder_t *encoder)`
:return: The frame size of the audio packet
`size_t obs_encoder_get_mixer_index(const obs_encoder_t *encoder)`
:return: The mixer index for the audio track which is encoded by the encoder
`void obs_encoder_set_preferred_video_format(obs_encoder_t *encoder, enum video_format format)`
enum video_format obs_encoder_get_preferred_video_format(const obs_encoder_t *encoder)
Sets the preferred video format for a video encoder. If the encoder can use
the format specified, it will force a conversion to that format if the
obs output format does not match the preferred format.
If the format is set to VIDEO_FORMAT_NONE, will revert to the default
functionality of converting only when absolutely necessary.
`obs_data_t *obs_encoder_defaults(const char *id)`
obs_data_t *obs_encoder_get_defaults(const obs_encoder_t *encoder)
:return: An incremented reference to the encoder's default settings.
Release with `obs_data_release()`.
`obs_properties_t *obs_encoder_properties(const obs_encoder_t *encoder)`
obs_properties_t *obs_get_encoder_properties(const char *id)
Use these functions to get the properties of an encoder or encoder
type. Properties are optionally used (if desired) to automatically
generate user interface widgets to allow users to update settings.
:return: The properties list for a specific existing encoder. Free
with `obs_properties_destroy()`
`void obs_encoder_update(obs_encoder_t *encoder, obs_data_t *settings)`
Updates the settings for this encoder context.
`obs_data_t *obs_encoder_get_settings(const obs_encoder_t *encoder)`
:return: An incremented reference to the encoder's settings. Release with
`obs_data_release()`.
`signal_handler_t *obs_encoder_get_signal_handler(const obs_encoder_t *encoder)`
:return: The signal handler of the encoder. Should not be manually freed,
as its lifecycle is managed by libobs.
`proc_handler_t *obs_encoder_get_proc_handler(const obs_encoder_t *encoder)`
:return: The procedure handler of the encoder. Should not be manually freed,
as its lifecycle is managed by libobs.
`bool obs_encoder_get_extra_data(const obs_encoder_t *encoder, uint8_t **extra_data, size_t *size)`
Gets extra data (headers) associated with this encoder.
:return: *true* if successful, *false* if no extra data associated
with this encoder
`void obs_encoder_set_video(obs_encoder_t *encoder, video_t *video)`
void obs_encoder_set_audio(obs_encoder_t *encoder, audio_t *audio)
Sets the video/audio handler to use with this video/audio encoder.
This is used to capture the raw video/audio data.
`video_t *obs_encoder_video(const obs_encoder_t *encoder)`
video_t *obs_encoder_parent_video(const obs_encoder_t *encoder)
audio_t *obs_encoder_audio(const obs_encoder_t *encoder)
:return: The video/audio handler associated with this encoder, or
*NULL* if none or not a matching encoder type.
*parent_video* returns the "original" video handler
associated with this encoder, regardless of whether an FPS
divisor is set.
`bool obs_encoder_active(const obs_encoder_t *encoder)`
:return: *true* if the encoder is active, *false* otherwise
`bool obs_encoder_add_roi(obs_encoder_t *encoder, const struct obs_encoder_roi *roi)`
Adds a new region of interest to the encoder if ROI feature is supported.
:return: *true* if adding succeeded, *false* otherwise.
.. versionadded:: 30.1
`bool obs_encoder_has_roi(obs_encoder_t *encoder)`
:return: *true* if encoder has ROI regions set, *false* otherwise.
.. versionadded:: 30.1
`void obs_encoder_clear_roi(obs_encoder_t *encoder)`
Clear region of interest list, if any.
.. versionadded:: 30.1
`void obs_encoder_enum_roi(obs_encoder_t *encoder, void (*enum_proc)(void *, struct obs_encoder_roi *), void *param)`
Enumerate currently configured ROIs by invoking callback for each entry, in reverse order of addition (i.e. most recent to oldest).
**Note:** If the encoder has scaling enabled the struct passed to the callback will be scaled accordingly.
.. versionadded:: 30.1
`uint32_t obs_encoder_get_roi_increment(const obs_encoder_t *encoder)`
Encoders shall refresh their ROI configuration if the increment value changes.
:return: Increment/revision of ROI list
.. versionadded:: 30.1
`uint32_t obs_encoder_get_priming_samples(const obs_encoder_t *encoder)`
Gets the number of samples that shall be skipped when playing back the encoded audio.
Commonly referred to as "encoder delay" or "priming samples" in AAC/Opus.
:return: Number of priming samples
.. versionadded:: 32.1
## Functions used by encoders
`void obs_encoder_packet_ref(struct encoder_packet *dst, struct encoder_packet *src)`
void obs_encoder_packet_release(struct encoder_packet *packet)
Adds or releases a reference to an encoder packet.
.. ---------------------------------------------------------------------------
.. _libobs/obs-encoder.h: https://github.com/obsproject/obs-studio/blob/master/libobs/obs-encoder.h
# OBS Studio Frontend API
The OBS Studio frontend API is the API specific to OBS Studio itself.
.. code:: cpp
#include
## Structures/Enumerations
`obs_frontend_event`
Specifies a front-end event. Can be one of the following values:
- **OBS_FRONTEND_EVENT_STREAMING_STARTING**
Triggered when streaming is starting.
- **OBS_FRONTEND_EVENT_STREAMING_STARTED**
Triggered when streaming has successfully started.
- **OBS_FRONTEND_EVENT_STREAMING_STOPPING**
Triggered when streaming is stopping.
- **OBS_FRONTEND_EVENT_STREAMING_STOPPED**
Triggered when streaming has fully stopped.
- **OBS_FRONTEND_EVENT_RECORDING_STARTING**
Triggered when recording is starting.
- **OBS_FRONTEND_EVENT_RECORDING_STARTED**
Triggered when recording has successfully started.
- **OBS_FRONTEND_EVENT_RECORDING_STOPPING**
Triggered when recording is stopping.
- **OBS_FRONTEND_EVENT_RECORDING_STOPPED**
Triggered when recording has fully stopped.
- **OBS_FRONTEND_EVENT_RECORDING_PAUSED**
Triggered when the recording has been paused.
- **OBS_FRONTEND_EVENT_RECORDING_UNPAUSED**
Triggered when the recording has been unpaused.
- **OBS_FRONTEND_EVENT_SCENE_CHANGED**
Triggered when the current scene has changed.
- **OBS_FRONTEND_EVENT_SCENE_LIST_CHANGED**
Triggered when a scenes has been added/removed/reordered by the
user.
- **OBS_FRONTEND_EVENT_TRANSITION_CHANGED**
Triggered when the current transition has changed by the user.
- **OBS_FRONTEND_EVENT_TRANSITION_STOPPED**
Triggered when a transition has completed.
- **OBS_FRONTEND_EVENT_TRANSITION_LIST_CHANGED**
Triggered when the user adds/removes transitions.
- **OBS_FRONTEND_EVENT_TRANSITION_DURATION_CHANGED**
Triggered when the transition duration has been changed by the
user.
- **OBS_FRONTEND_EVENT_TBAR_VALUE_CHANGED**
Triggered when the transition bar is moved.
- **OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING**
Triggered when the current scene collection is about to change.
- **OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED**
Triggered when the current scene collection has changed.
- **OBS_FRONTEND_EVENT_SCENE_COLLECTION_LIST_CHANGED**
Triggered when a scene collection has been added or removed.
- **OBS_FRONTEND_EVENT_SCENE_COLLECTION_RENAMED**
Triggered when a scene collection has been renamed.
- **OBS_FRONTEND_EVENT_PROFILE_CHANGING**
Triggered when the current profile is about to change.
- **OBS_FRONTEND_EVENT_PROFILE_CHANGED**
Triggered when the current profile has changed.
- **OBS_FRONTEND_EVENT_PROFILE_LIST_CHANGED**
Triggered when a profile has been added or removed.
- **OBS_FRONTEND_EVENT_PROFILE_RENAMED**
Triggered when a profile has been renamed.
- **OBS_FRONTEND_EVENT_FINISHED_LOADING**
Triggered when the program has finished loading.
- **OBS_FRONTEND_EVENT_SCRIPTING_SHUTDOWN**
Triggered when scripts need to know that OBS is exiting. The
**OBS_FRONTEND_EVENT_EXIT** event is normally called after scripts
have been destroyed.
- **OBS_FRONTEND_EVENT_EXIT**
Triggered when the program is about to exit. This is the last chance
to call any frontend API functions for any saving / cleanup / etc.
After returning from this event callback, it is not permitted to make
any further frontend API calls.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTING**
Triggered when the replay buffer is starting.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_STARTED**
Triggered when the replay buffer has successfully started.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPING**
Triggered when the replay buffer is stopping.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_STOPPED**
Triggered when the replay buffer has fully stopped.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVING**
Triggered when the replay buffer is saving.
- **OBS_FRONTEND_EVENT_REPLAY_BUFFER_SAVED**
Triggered when the replay buffer has been saved.
- **OBS_FRONTEND_EVENT_STUDIO_MODE_ENABLED**
Triggered when the user has turned on studio mode.
- **OBS_FRONTEND_EVENT_STUDIO_MODE_DISABLED**
Triggered when the user has turned off studio mode.
- **OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED**
Triggered when the current preview scene has changed in studio
mode.
- **OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP**
Triggered when a scene collection has been completely unloaded, and
the program is either about to load a new scene collection, or the
program is about to exit.
- **OBS_FRONTEND_EVENT_VIRTUALCAM_STARTED**
Triggered when the virtual camera is started.
- **OBS_FRONTEND_EVENT_VIRTUALCAM_STOPPED**
Triggered when the virtual camera is stopped.
- **OBS_FRONTEND_EVENT_THEME_CHANGED**
Triggered when the theme is changed.
.. versionadded:: 29.0.0
- **OBS_FRONTEND_EVENT_SCREENSHOT_TAKEN**
Triggered when a screenshot is taken.
.. versionadded:: 29.0.0
`obs_frontend_source_list`
- DARRAY(obs_source_t*) **sources**
Example usage:
.. code:: cpp
struct obs_frontend_source_list scenes = {0};
obs_frontend_get_scenes(&scenes);
for (size_t i = 0; i < scenes.sources.num; i++) {
/* Do NOT call `obs_source_release` or `obs_scene_release`
* on these sources
*/
obs_source_t *source = scenes.sources.array[i];
/* Convert to obs_scene_t if needed */
obs_scene_t *scene = obs_scene_from_source(source);
[...]
}
obs_frontend_source_list_free(&scenes);
`void (*obs_frontend_cb)(void *private_data)`
Frontend tool menu callback
`void (*obs_frontend_event_cb)(enum obs_frontend_event event, void *private_data)`
Frontend event callback
`void (*obs_frontend_save_cb)(obs_data_t *save_data, bool saving, void *private_data)`
Frontend save/load callback
`bool (*obs_frontend_translate_ui_cb)(const char *text, const char **out)`
Translation callback
`void (*undo_redo_cb)(const char *data)`
Undo redo callback
`void (*obs_frontend_fallback_cb)(void *param, bool accepted)`
Fallback warning callback: *accepted* is *true* when the caller continues
in the fallback mode. See `obs_frontend_warn_fallback()`.
## Functions
`void obs_frontend_source_list_free(struct obs_frontend_source_list *source_list)`
Releases sources within a source list and frees the list.
:param source_list: Source list to free
`void *obs_frontend_get_main_window(void)`
:return: The QMainWindow pointer to the OBS Studio window
`void *obs_frontend_get_main_window_handle(void)`
:return: The native window handle of the OBS Studio window
`char **obs_frontend_get_scene_names(void)`
:return: The scene name list, ending with NULL. The list is stored
within one contiguous segment of memory, so freeing the
returned pointer with `bfree()` will free the entire
list. The order is same as the way the frontend displays it in
the Scenes dock.
`void obs_frontend_get_scenes(struct obs_frontend_source_list *sources)`
Populates `sources` with reference-incremented scenes in the same order as
the frontend displays it in the Scenes dock. Release with
`obs_frontend_source_list_free`, which will automatically release all
scenes with `obs_source_release`. Do not release a scene manually to
prevent double releasing, which may cause scenes to be deleted.
Use `obs_scene_from_source` to access a source from the list as an
`obs_scene_t` object.
If you wish to keep a reference to a certain scene, use
`obs_source_get_ref` or `obs_scene_get_ref` on that scene and
release it with either `obs_source_release` or
`obs_scene_release`. Use only one release function, as both releases
the same object.
:param sources: Pointer to a `obs_frontend_source_list`
structure to receive the list of reference-incremented
scenes.
`obs_source_t *obs_frontend_get_current_scene(void)`
:return: A new reference to the currently active scene. Release with
`obs_source_release()`.
`void obs_frontend_set_current_scene(obs_source_t *scene)`
:param scene: The scene to set as the current scene
`void obs_frontend_get_transitions(struct obs_frontend_source_list *sources)`
:param sources: Pointer to a `obs_frontend_source_list`
structure to receive the list of
reference-incremented transitions. Release with
`obs_frontend_source_list_free`
`obs_source_t *obs_frontend_get_current_transition(void)`
:return: A new reference to the currently active transition.
Release with `obs_source_release()`.
`void obs_frontend_set_current_transition(obs_source_t *transition)`
:param transition: The transition to set as the current transition
`int obs_frontend_get_transition_duration(void)`
:return: The transition duration (in milliseconds) currently set in the UI
`void obs_frontend_set_transition_duration(int duration)`
:param duration: Desired transition duration, in milliseconds
`void obs_frontend_release_tbar(void)`
Emulate a mouse button release on the transition bar and determine transition status.
`void obs_frontend_set_tbar_position(int position)`
Set the value of the transition bar.
:param position: The position to set the T-bar to, with a range of 0-1023
`int obs_frontend_get_tbar_position(void)`
Get the value of the transition bar.
:return: The value of the position of the T-bar to, with a range of 0-1023
`char **obs_frontend_get_scene_collections(void)`
:return: The list of scene collection names, ending with NULL. The list is
stored within one contiguous segment of memory, so freeing
the returned pointer with `bfree()` will free the
entire list.
`char *obs_frontend_get_current_scene_collection(void)`
:return: A new pointer to the current scene collection name. Free
with `bfree()`
`void obs_frontend_set_current_scene_collection(const char *collection)`
:param collection: Name of the scene collection to activate
`bool obs_frontend_add_scene_collection(const char *name)`
Add a new scene collection, then switch to it.
:param name: Name of the scene collection to add/create
`char **obs_frontend_get_profiles(void)`
:return: The list of profile names, ending with NULL. The list is
stored within one contiguous segment of memory, so freeing
the returned pointer with `bfree()` will free the
entire list.
`char *obs_frontend_get_current_profile(void)`
:return: A new pointer to the current profile name. Free with
`bfree()`
`char *obs_frontend_get_current_profile_path(void)`
:return: A new pointer to the current profile's path on the
filesystem. Free with `bfree()`
`void obs_frontend_set_current_profile(const char *profile)`
:param profile: Name of the profile to activate
`bool obs_frontend_create_profile(const char *name)`
:param name: Name of the new profile to create (must be unique)
`bool obs_frontend_duplicate_profile(const char *name)`
:param name: Name of the duplicate profile to create (must be unique)
`void obs_frontend_delete_profile(const char *profile)`
Deleting the current profile switches to another profile first, without
asking the user for confirmation.
:param profile: Name of the profile to delete
`void *obs_frontend_add_tools_menu_qaction(const char *name)`
Adds a QAction to the tools menu then returns it.
:param name: Name for the new menu item
:return: A pointer to the added QAction
`void obs_frontend_add_tools_menu_item(const char *name, obs_frontend_cb callback, void *private_data)`
Adds a tools menu item and links the ::clicked signal to the
callback.
:param name: The name for the new menu item
:param callback: Callback to use when the menu item is clicked
:param private_data: Private data associated with the callback
`bool obs_frontend_add_dock_by_id(const char *id, const char *title, void *widget)`
Adds a dock with the widget to the UI with a toggle in the Docks
menu.
When the dock is closed, a custom QEvent of type `QEvent::User + QEvent::Close`
is sent to the widget to enable it to react to the event (e.g., unload elements
to save resources).
A generic QShowEvent is already sent by default when the widget is being
shown (e.g., dock opened).
Note: Use `obs_frontend_remove_dock` to remove the dock
and the id from the UI.
:param id: Unique identifier of the dock
:param title: Window title of the dock
:param widget: QWidget to insert in the dock
:return: *true* if the dock was added, *false* if the id was already
used
.. versionadded:: 30.0
`void obs_frontend_remove_dock(const char *id)`
Removes the dock with this id from the UI.
:param id: Unique identifier of the dock to remove.
.. versionadded:: 30.0
`bool obs_frontend_add_custom_qdock(const char *id, void *dock)`
Adds a custom dock to the UI with no toggle.
Note: Use `obs_frontend_remove_dock` to remove the dock
reference and id from the UI.
:param id: Unique identifier of the dock
:param dock: QDockWidget to add
:return: *true* if the dock was added, *false* if the id was already
used
.. versionadded:: 30.0
`void obs_frontend_add_event_callback(obs_frontend_event_cb callback, void *private_data)`
Adds a callback that will be called when a frontend event occurs.
See `obs_frontend_event` on what sort of events can be
triggered.
:param callback: Callback to use when a frontend event occurs
:param private_data: Private data associated with the callback
`void obs_frontend_remove_event_callback(obs_frontend_event_cb callback, void *private_data)`
Removes an event callback.
:param callback: Callback to remove
:param private_data: Private data associated with the callback
`void obs_frontend_add_save_callback(obs_frontend_save_cb callback, void *private_data)`
Adds a callback that will be called when the current scene collection
is being saved/loaded.
:param callback: Callback to use when saving/loading a scene
collection
:param private_data: Private data associated with the callback
`void obs_frontend_remove_save_callback(obs_frontend_save_cb callback, void *private_data)`
Removes a save/load callback.
:param callback: Callback to remove
:param private_data: Private data associated with the callback
`void obs_frontend_add_preload_callback(obs_frontend_save_cb callback, void *private_data)`
Adds a callback that will be called right before a scene collection
is loaded.
:param callback: Callback to use when pre-loading
:param private_data: Private data associated with the callback
`void obs_frontend_remove_preload_callback(obs_frontend_save_cb callback, void *private_data)`
Removes a pre-load callback.
:param callback: Callback to remove
:param private_data: Private data associated with the callback
`void obs_frontend_push_ui_translation(obs_frontend_translate_ui_cb translate)`
Pushes a UI translation callback. This allows a front-end plugin to
intercept when Qt is automatically generating translating data.
Typically this is just called with obs_module_get_string.
:param translate: The translation callback to use
`void obs_frontend_pop_ui_translation(void)`
Pops the current UI translation callback.
`void obs_frontend_streaming_start(void)`
Starts streaming.
`void obs_frontend_streaming_stop(void)`
Stops streaming.
`bool obs_frontend_streaming_active(void)`
:return: *true* if streaming active, *false* otherwise
`void obs_frontend_recording_start(void)`
Starts recording.
`void obs_frontend_recording_stop(void)`
Stops recording.
`bool obs_frontend_recording_active(void)`
:return: *true* if recording active, *false* otherwise
`void obs_frontend_recording_pause(bool pause)`
:pause: *true* to pause recording, *false* to unpause
`bool obs_frontend_recording_paused(void)`
:return: *true* if recording paused, *false* otherwise
`bool obs_frontend_recording_split_file(void)`
Asks OBS to split the current recording file.
:return: *true* if splitting was successfully requested (this
does not mean that splitting has finished or guarantee that it
split successfully), *false* if recording is inactive or paused
or if file splitting is disabled.
`bool obs_frontend_recording_add_chapter(const char *name)`
Asks OBS to insert a chapter marker at the current output time into the recording.
:param name: The name for the chapter, may be *NULL* to use an automatically generated name ("Unnamed " or localized equivalent).
:return: *true* if insertion was successful, *false* if recording is inactive, paused, or if chapter insertion is not supported by the current output.
.. versionadded:: 30.2
`void obs_frontend_replay_buffer_start(void)`
Starts the replay buffer.
`void obs_frontend_replay_buffer_stop(void)`
Stops the replay buffer.
`void obs_frontend_replay_buffer_save(void)`
Saves a replay if the replay buffer is active.
`bool obs_frontend_replay_buffer_active(void)`
:return: *true* if replay buffer active, *false* otherwise
`void obs_frontend_open_projector(const char *type, int monitor, const char *geometry, const char *name)`
:param type: "Preview", "Source", "Scene", "StudioProgram", or "Multiview" (case insensitive)
:param monitor: Monitor to open the projector on. If -1, this opens a window.
:param geometry: If *monitor* is -1, size and position of the projector window. Encoded in Base64 using Qt's geometry encoding.
:param name: If *type* is "Source" or "Scene", name of the source or scene to be displayed
`void obs_frontend_save(void)`
Saves the current scene collection.
`obs_output_t *obs_frontend_get_streaming_output(void)`
:return: A new reference to the current streaming output.
Release with `obs_output_release()`.
`obs_output_t *obs_frontend_get_recording_output(void)`
:return: A new reference to the current recording output.
Release with `obs_output_release()`.
`obs_output_t *obs_frontend_get_replay_buffer_output(void)`
:return: A new reference to the current replay buffer output.
Release with `obs_output_release()`.
`config_t *obs_frontend_get_profile_config(void)`
:return: The config_t* associated with the current profile
.. deprecated:: 31.0
`config_t *obs_frontend_get_global_config(void)`
:return: The config_t* associated with the global config (global.ini)
`config_t *obs_frontend_get_app_config(void)`
:return: The config_t* associated with system-wide settings (global.ini)
.. versionadded:: 31.0
`config_t *obs_frontend_get_user_config(void)`
:return: The config_t* associated with user settings (user.ini)
.. versionadded:: 31.0
`void obs_frontend_set_streaming_service(obs_service_t *service)`
Sets the current streaming service to stream with.
:param service: The streaming service to set
`obs_service_t *obs_frontend_get_streaming_service(void)`
:return: The current streaming service object. Does not increment the
reference.
`void obs_frontend_save_streaming_service(void)`
Saves the current streaming service data.
`bool obs_frontend_preview_program_mode_active(void)`
:return: *true* if studio mode is active, *false* otherwise
`void obs_frontend_set_preview_program_mode(bool enable)`
Activates/deactivates studio mode.
:param enable: *true* to activate studio mode, *false* to deactivate
studio mode
`void obs_frontend_preview_program_trigger_transition(void)`
Triggers a preview-to-program transition if studio mode is active.
`obs_source_t *obs_frontend_get_current_preview_scene(void)`
:return: A new reference to the current preview scene if studio mode
is active, or *NULL* if studio mode is not active. Release
with `obs_source_release()`.
`void obs_frontend_set_current_preview_scene(obs_source_t *scene)`
Sets the current preview scene in studio mode. Does nothing if studio
mode is disabled.
:param scene: The scene to set as the current preview
`void obs_frontend_set_preview_enabled(bool enable)`
Sets the enable state of the preview display. Only relevant with
studio mode disabled.
:param enable: *true* to enable preview, *false* to disable preview
`bool obs_frontend_preview_enabled(void)`
:return: *true* if the preview display is enabled, *false* otherwise
`void *obs_frontend_take_screenshot(void)`
Takes a screenshot of the main OBS output.
`void *obs_frontend_take_source_screenshot(obs_source_t *source)`
Takes a screenshot of the specified source.
:param source: The source to take screenshot of
`obs_output_t *obs_frontend_get_virtualcam_output(void)`
:return: A new reference to the current virtual camera output.
Release with `obs_output_release()`.
`void obs_frontend_start_virtualcam(void)`
Starts the virtual camera.
`void obs_frontend_stop_virtualcam(void)`
Stops the virtual camera.
`bool obs_frontend_virtualcam_active(void)`
:return: *true* if virtual camera is active, *false* otherwise
`void obs_frontend_reset_video(void)`
Reloads the UI canvas and resets libobs video with latest data from
the current profile.
`void *obs_frontend_open_source_properties(obs_source_t *source)`
Opens the properties window of the specified source.
:param source: The source to open the properties window of
`void *obs_frontend_open_source_filters(obs_source_t *source)`
Opens the filters window of the specified source.
:param source: The source to open the filters window of
`void *obs_frontend_open_source_interaction(obs_source_t *source)`
Opens the interact window of the specified source. Only call if
source has the *OBS_SOURCE_INTERACTION* output flag.
:param source: The source to open the interact window of
`void *obs_frontend_open_sceneitem_edit_transform(obs_sceneitem_t *item)`
Opens the edit transform window of the specified sceneitem.
:param item: The sceneitem to open the edit transform window of
.. versionadded:: 29.1
`char *obs_frontend_get_current_record_output_path(void)`
:return: A new pointer to the current record output path. Free
with `bfree()`
`const char *obs_frontend_get_locale_string(const char *string)`
:return: Gets the frontend translation of a given string.
`bool obs_frontend_is_theme_dark(void)`
:return: Checks if the current theme is dark or light.
.. versionadded:: 29.0.0
`char *obs_frontend_get_last_recording(void)`
:return: The file path of the last recording. Free with `bfree()`
.. versionadded:: 29.0.0
`char *obs_frontend_get_last_screenshot(void)`
:return: The file path of the last screenshot taken. Free with
`bfree()`
.. versionadded:: 29.0.0
`char *obs_frontend_get_last_replay(void)`
:return: The file path of the last replay buffer saved. Free with
`bfree()`
.. versionadded:: 29.0.0
`void obs_frontend_add_undo_redo_action(const char *name, const undo_redo_cb undo, const undo_redo_cb redo, const char *undo_data, const char *redo_data, bool repeatable)`
:param name: The name of the undo redo action
:param undo: Callback to use for undo
:param redo: Callback to use for redo
:param undo_data: String with data for the undo callback
:param redo_data: String with data for the redo callback
:param repeatable: Allow multiple actions with the same name to be merged to 1 undo redo action.
This uses the undo action from the first and the redo action from the last action.
.. versionadded:: 29.1
`void obs_frontend_copy_sceneitem(obs_sceneitem_t *item)`
:param item: The scene item to copy
.. versionadded:: 32.2
`bool obs_frontend_can_paste_sceneitem(bool duplicate)`
:param duplicate: Check if the copied source allows duplication.
:return: Whether there is a scene item copied and can be pasted
.. versionadded:: 32.2
`void obs_frontend_paste_sceneitem(obs_scene_t *scene, bool duplicate)`
:param scene: The scene to paste on
:param duplicate: *true* for paste duplicate, *false* for paste reference
.. versionadded:: 32.2
`bool obs_frontend_is_safe_mode_enabled(void)`
:return: *true* if OBS was launched in Safe Mode, *false* otherwise
.. versionadded:: 33.0
`void obs_frontend_warn_fallback(const char *id, const char *title, const char *message, bool can_cancel, obs_frontend_fallback_cb cb, void *param)`
Tells the user that a feature fell back to a less safe mode, so that it
keeps working (for example a browser source without the Chromium sandbox).
OBS logs *message* at error level at once, from any thread. Then, on the
UI thread, it shows a warning with a countdown that accepts the fallback
after 3 seconds, and calls *cb* once with the result.
A warning shows once per *id* in each OBS session, and only one shows at
a time. Warnings wait until the main window has loaded, and while another
modal dialog is open. With a hidden
main window, or when the same *id* already showed, the warning accepts at
once (after the log line). At exit, an open warning closes and queued
warnings accept.
*cb* is never called inside this call while OBS runs. In a host without
the OBS frontend, and after OBS has begun to shut down, this call logs,
then calls *cb* with *true* inside the call.
See `docs/fallback-warning.md` in OBS-Studio-Rust
(obs-rust/obs-studio#2218).
:param id: A stable name for the fallback, for example
`"browser.sandbox"`. It is in the log line.
:param title: The window title, translated by the caller
:param message: What fell back and why, translated by the caller
:param can_cancel: *true* if the caller can stop instead. The warning
then has a Cancel button.
:param cb: Called once with *accepted*: *true* for the countdown
and "Accept anyway"; *false* for Cancel or a closed
warning if *can_cancel*, else *true*. Can be NULL.
:param param: Passed to *cb*. Keep it valid until *cb* is called.
# Callback API Reference (libobs/callback)
## Calldata
The `calldata_t` object is used to pass parameters from signal
handlers or to procedure handlers.
`calldata_t`
`void calldata_init(calldata_t *data)`
Initializes a calldata structure (zeroes it).
:param data: Calldata structure
`void calldata_free(calldata_t *data)`
Frees a calldata structure. Should only be used if `calldata_init()`
was used. If the object is received as a callback parameter, this function
should not be used.
:param data: Calldata structure
`void calldata_set_int(calldata_t *data, const char *name, long long val)`
Sets an integer parameter.
:param data: Calldata structure
:param name: Parameter name
:param val: Integer value
`void calldata_set_float(calldata_t *data, const char *name, double val)`
Sets a floating point parameter.
:param data: Calldata structure
:param name: Parameter name
:param val: Floating point value
`void calldata_set_bool(calldata_t *data, const char *name, bool val)`
Sets a boolean parameter.
:param data: Calldata structure
:param name: Parameter name
:param val: Boolean value
`void calldata_set_ptr(calldata_t *data, const char *name, void *ptr)`
Sets a pointer parameter.
:param data: Calldata structure
:param name: Parameter name
:param val: Pointer value
`void calldata_set_string(calldata_t *data, const char *name, const char *str)`
Sets a string parameter.
:param data: Calldata structure
:param name: Parameter name
:param val: String
`long long calldata_int(const calldata_t *data, const char *name)`
Gets an integer parameter.
:param data: Calldata structure
:param name: Parameter name
:return: Integer value
`double calldata_float(const calldata_t *data, const char *name)`
Gets a floating point parameter.
:param data: Calldata structure
:param name: Parameter name
:return: Floating point value
`bool calldata_bool(const calldata_t *data, const char *name)`
Gets a boolean parameter.
:param data: Calldata structure
:param name: Parameter name
:return: Boolean value
`void *calldata_ptr(const calldata_t *data, const char *name)`
Gets a pointer parameter. For example, `core_signal_handler_reference`
that have `ptr source` as a parameter requires this function to get the
pointer, which can be casted to `obs_source_t`. Does not have to be freed.
:param data: Calldata structure
:param name: Parameter name
:return: Pointer value
`const char *calldata_string(const calldata_t *data, const char *name)`
Gets a string parameter.
:param data: Calldata structure
:param name: Parameter name
:return: String value
## Signals
Signals are used for all event-based callbacks.
.. code:: cpp
#include
`signal_handler_t`
`void (*signal_callback_t)(void *data, calldata_t *cd)`
Signal callback.
:param data: Private data passed to this callback
:param cd: Calldata object
`signal_handler_t *signal_handler_create(void)`
Creates a new signal handler object.
:return: A new signal handler object
`void signal_handler_destroy(signal_handler_t *handler)`
Destroys a signal handler.
:param handler: Signal handler object
`bool signal_handler_add(signal_handler_t *handler, const char *signal_decl)`
Adds a signal to a signal handler.
:param handler: Signal handler object
:param signal_decl: Signal declaration string
`bool signal_handler_add_array(signal_handler_t *handler, const char **signal_decls)`
Adds multiple signals to a signal handler.
:param handler: Signal handler object
:param signal_decls: An array of signal declaration strings,
terminated by *NULL*
`void signal_handler_connect(signal_handler_t *handler, const char *signal, signal_callback_t callback, void *data)`
Connects a callback to a signal on a signal handler. Does nothing
if the combination of `signal`, `callback`, and `data`
is already connected to the handler.
:param handler: Signal handler object
:param signal: Name of signal to handle
:param callback: Signal callback
:param data: Private data passed to the callback
For scripting, use :py`signal_handler_connect`.
`void signal_handler_connect_ref(signal_handler_t *handler, const char *signal, signal_callback_t callback, void *data)`
Connects a callback to a signal on a signal handler, and increments
the handler's internal reference counter, preventing it from being
destroyed until the signal has been disconnected. Even if the combination of
`signal`, `callback`, and `data` is already connected to the handler,
the reference counter is still incremented.
:param handler: Signal handler object
:param signal: Name of signal to handle
:param callback: Signal callback
:param data: Private data passed to the callback
`void signal_handler_disconnect(signal_handler_t *handler, const char *signal, signal_callback_t callback, void *data)`
Disconnects a callback from a signal on a signal handler. Does nothing
if the combination of `signal`, `callback`, and `data`
is not yet connected to the handler.
:param handler: Signal handler object
:param signal: Name of signal that was handled
:param callback: Signal callback
:param data: Private data passed to the callback
For scripting, use :py`signal_handler_disconnect`.
`void signal_handler_signal(signal_handler_t *handler, const char *signal, calldata_t *params)`
Triggers a signal, calling all connected callbacks.
:param handler: Signal handler object
:param signal: Name of signal to trigger
:param params: Parameters to pass to the signal
## Procedure Handlers
Procedure handlers are used to call functions without having to have
direct access to declarations or callback pointers.
.. code:: cpp
#include
`proc_handler_t`
`void (*proc_handler_proc_t)(void *data, calldata_t *cd)`
Procedure handler callback.
:param data: Private data passed to this callback
:param cd: Calldata object
`proc_handler_t *proc_handler_create(void)`
Creates a new procedure handler.
:return: A new procedure handler object
`void proc_handler_destroy(proc_handler_t *handler)`
Destroys a procedure handler object.
:param handler: Procedure handler object
`void proc_handler_add(proc_handler_t *handler, const char *decl_string, proc_handler_proc_t proc, void *data)`
Adds a procedure to a procedure handler.
:param handler: Procedure handler object
:param decl_string: Procedure declaration string
:param proc: Procedure callback
:param data: Private data to pass to the callback
`bool proc_handler_call(proc_handler_t *handler, const char *name, calldata_t *params)`
Calls a procedure within the procedure handler.
:param handler: Procedure handler object
:param name: Name of procedure to call
:param params: Calldata structure to pass to the procedure
# Axis Angle
Provides a helper structure for conversion to quaternions.
.. code:: cpp
#include
`axisang`
`float axisang.x`
X axis
`float axisang.y`
Y axis
`float axisang.z`
Z axis
`float axisang.w`
Angle
`float axisang.ptr[4]`
`void axisang_zero(struct axisang *dst)`
Zeroes the axis angle.
:param dst: Axis angle
`void axisang_copy(struct axisang *dst, struct axisang *aa)`
Copies an axis angle.
:param dst: Axis angle to copy to
:param aa: Axis angle to copy from
`void axisang_set(struct axisang *dst, float x, float y, float z, float w)`
Sets an axis angle.
:param dst: Axis angle to set
:param x: X axis
:param y: Y axis
:param z: Z axis
:param w: Angle
`void axisang_from_quat(struct axisang *dst, const struct quat *q)`
Creates an axis angle from a quaternion.
:param dst: Axis angle destination
:param q: Quaternion to convert
# Effects (Shaders)
Effects are a single collection of related shaders. They're used for
easily writing vertex and pixel shaders together all in the same file in
HLSL format.
.. code:: cpp
#include
`struct gs_effect gs_effect_t`
Effect object.
`struct gs_effect_technique gs_technique_t`
Technique object.
`struct gs_effect_param gs_eparam_t`
Effect parameter object.
`gs_effect_t *gs_effect_create_from_file(const char *file, char **error_string)`
Creates an effect from file.
:param file: Path to the effect file
:param error_string: Receives a pointer to the error string, which
must be freed with `bfree()`. If
*NULL*, this parameter is ignored.
:return: The effect object, or *NULL* on error
`gs_effect_t *gs_effect_create(const char *effect_string, const char *filename, char **error_string)`
Creates an effect from a string.
:param effect_String: Effect string
:param error_string: Receives a pointer to the error string, which
must be freed with `bfree()`. If
*NULL*, this parameter is ignored.
:return: The effect object, or *NULL* on error
`void gs_effect_destroy(gs_effect_t *effect)`
Destroys the effect
:param effect: Effect object
`gs_technique_t *gs_effect_get_technique(const gs_effect_t *effect, const char *name)`
Gets a technique of the effect.
:param effect: Effect object
:param name: Name of the technique
:return: Technique object, or *NULL* if not found
`gs_technique_t *gs_effect_get_current_technique(const gs_effect_t *effect)`
Gets the current active technique of the effect.
:param effect: Effect object
:return: Technique object, or *NULL* if none currently active
`size_t gs_technique_begin(gs_technique_t *technique)`
Begins a technique.
:param technique: Technique object
:return: Number of passes this technique uses
`void gs_technique_end(gs_technique_t *technique)`
Ends a technique. Make sure all active passes have been ended before
calling.
:param technique: Technique object
`bool gs_technique_begin_pass(gs_technique_t *technique, size_t pass)`
Begins a pass. Automatically loads the vertex/pixel shaders
associated with this pass. Draw after calling this function.
:param technique: Technique object
:param pass: Pass index
:return: *true* if the pass is valid, *false* otherwise
`bool gs_technique_begin_pass_by_name(gs_technique_t *technique, const char *name)`
Begins a pass by its name if the pass has a name. Automatically
loads the vertex/pixel shaders associated with this pass. Draw after
calling this function.
:param technique: Technique object
:param name: Name of the pass
:return: *true* if the pass is valid, *false* otherwise
`void gs_technique_end_pass(gs_technique_t *technique)`
Ends a pass.
:param technique: Technique object
`size_t gs_effect_get_num_params(const gs_effect_t *effect)`
Gets the number of parameters associated with the effect.
:param effect: Effect object
:return: Number of parameters the effect has
`gs_eparam_t *gs_effect_get_param_by_idx(const gs_effect_t *effect, size_t param)`
Gets a parameter of an effect by its index.
:param effect: Effect object
:param param: Parameter index
:return: The effect parameter object, or *NULL* if index
invalid
`gs_eparam_t *gs_effect_get_param_by_name(const gs_effect_t *effect, const char *name)`
Gets parameter of an effect by its name.
:param effect: Effect object
:param name: Name of the parameter
:return: The effect parameter object, or *NULL* if not found
`size_t gs_param_get_num_annotations(const gs_eparam_t *param)`
Gets the number of annotations associated with the parameter.
:param param: Param object
:return: Number of annotations the param has
`gs_eparam_t *gs_param_get_annotation_by_idx(const gs_eparam_t *param, size_t annotation)`
Gets an annotation of a param by its index.
:param param: Param object
:param param: Annotation index
:return: The effect parameter object (annotation), or *NULL* if index
invalid
`gs_eparam_t *gs_param_get_annotation_by_name(const gs_eparam_t *param, const char *annotation)`
Gets parameter of an effect by its name.
:param param: Param object
:param name: Name of the annotation
:return: The effect parameter object (annotation), or *NULL* if not found
`bool gs_effect_loop(gs_effect_t *effect, const char *name)`
Helper function that automatically begins techniques/passes.
:param effect: Effect object
:param name: Name of the technique to execute
:return: *true* to draw, *false* when complete
Here is an example of how this function is typically used:
.. code:: cpp
for (gs_effect_loop(effect, "my_technique")) {
/* perform drawing here */
[...]
}
`gs_eparam_t *gs_effect_get_viewproj_matrix(const gs_effect_t *effect)`
Gets the view/projection matrix parameter ("viewproj") of the effect.
:param effect: Effect object
:return: The view/projection matrix parameter of the effect
`gs_eparam_t *gs_effect_get_world_matrix(const gs_effect_t *effect)`
Gets the world matrix parameter ("world") of the effect.
:param effect: Effect object
:return: The world matrix parameter of the effect
`void gs_effect_get_param_info(const gs_eparam_t *param, struct gs_effect_param_info *info)`
Gets information about an effect parameter.
:param param: Effect parameter
:param info: Pointer to receive the data
Relevant data types used with this function:
.. code:: cpp
enum gs_shader_param_type {
GS_SHADER_PARAM_UNKNOWN,
GS_SHADER_PARAM_BOOL,
GS_SHADER_PARAM_FLOAT,
GS_SHADER_PARAM_INT,
GS_SHADER_PARAM_STRING,
GS_SHADER_PARAM_VEC2,
GS_SHADER_PARAM_VEC3,
GS_SHADER_PARAM_VEC4,
GS_SHADER_PARAM_INT2,
GS_SHADER_PARAM_INT3,
GS_SHADER_PARAM_INT4,
GS_SHADER_PARAM_MATRIX4X4,
GS_SHADER_PARAM_TEXTURE,
};
struct gs_effect_param_info {
const char *name;
enum gs_shader_param_type type;
}
`void gs_effect_set_bool(gs_eparam_t *param, bool val)`
Sets a boolean parameter.
:param param: Effect parameter
:param val: Boolean value
`void gs_effect_set_float(gs_eparam_t *param, float val)`
Sets a floating point parameter.
:param param: Effect parameter
:param val: Floating point value
`void gs_effect_set_int(gs_eparam_t *param, int val)`
Sets a integer parameter.
:param param: Effect parameter
:param val: Integer value
`void gs_effect_set_matrix4(gs_eparam_t *param, const struct matrix4 *val)`
Sets a matrix parameter.
:param param: Effect parameter
:param val: Matrix
`void gs_effect_set_vec2(gs_eparam_t *param, const struct vec2 *val)`
Sets a 2-component vector parameter.
:param param: Effect parameter
:param val: Vector
`void gs_effect_set_vec3(gs_eparam_t *param, const struct vec3 *val)`
Sets a 3-component vector parameter.
:param param: Effect parameter
:param val: Vector
`void gs_effect_set_vec4(gs_eparam_t *param, const struct vec4 *val)`
Sets a 4-component vector parameter.
:param param: Effect parameter
:param val: Vector
`void gs_effect_set_color(gs_eparam_t *param, uint32_t argb)`
Convenience function for setting a color value via an integer value.
:param param: Effect parameter
:param argb: Integer color value (i.e. hex value would be
0xAARRGGBB)
`void gs_effect_set_texture(gs_eparam_t *param, gs_texture_t *val)`
Sets a texture parameter.
:param param: Effect parameter
:param val: Texture
`void gs_effect_set_texture_srgb(gs_eparam_t *param, gs_texture_t *val)`
Sets a texture parameter using SRGB view if available.
:param param: Effect parameter
:param val: Texture
`void gs_effect_set_val(gs_eparam_t *param, const void *val, size_t size)`
Sets a parameter with data manually.
:param param: Effect parameter
:param val: Pointer to data
:param size: Size of data
`void gs_effect_set_default(gs_eparam_t *param)`
Sets the parameter to its default value
:param: Effect parameter
`void gs_effect_set_next_sampler(gs_eparam_t *param, gs_samplerstate_t *sampler)`
Manually changes the sampler for an effect parameter the next time
it's used.
:param param: Effect parameter
:param sampler: Sampler state object
`void *gs_effect_get_val(gs_eparam_t *param)`
Returns a copy of the param's current value.
:param param: Effect parameter
:return: A pointer to the copied byte value of the param's current value. Freed with `bfree()`.
`void gs_effect_get_default_val(gs_eparam_t *param)`
Returns a copy of the param's default value.
:param param: Effect parameter
:return: A pointer to the copied byte value of the param's default value. Freed with `bfree()`.
`size_t gs_effect_get_val_size(gs_eparam_t *param)`
Returns the size in bytes of the param's current value.
:param param: Effect parameter
:return: The size in bytes of the param's current value.
`size_t gs_effect_get_default_val_size(gs_eparam_t *param)`
Returns the size in bytes of the param's default value.
:param param: Effect parameter
:return: The size in bytes of the param's default value.
# Core Graphics API
.. code:: cpp
#include
## Graphics Enumerations
`gs_draw_mode`
Draw mode. Can be one of the following values:
- GS_POINTS - Draws points
- GS_LINES - Draws individual lines
- GS_LINESTRIP - Draws a line strip
- GS_TRIS - Draws individual triangles
- GS_TRISTRIP - Draws a triangle strip
`gs_color_format`
Color format. Can be one of the following values:
- GS_UNKNOWN - Unknown format
- GS_A8 - 8 bit alpha channel only
- GS_R8 - 8 bit red channel only
- GS_RGBA - RGBA, 8 bits per channel
- GS_BGRX - BGRX, 8 bits per channel
- GS_BGRA - BGRA, 8 bits per channel
- GS_R10G10B10A2 - RGBA, 10 bits per channel except alpha, which is 2
bits
- GS_RGBA16 - RGBA, 16 bits per channel
- GS_R16 - 16 bit red channel only
- GS_RGBA16F - RGBA, 16 bit floating point per channel
- GS_RGBA32F - RGBA, 32 bit floating point per channel
- GS_RG16F - 16 bit floating point red and green channels only
- GS_RG32F - 32 bit floating point red and green channels only
- GS_R16F - 16 bit floating point red channel only
- GS_R32F - 32 bit floating point red channel only
- GS_DXT1 - Compressed DXT1
- GS_DXT3 - Compressed DXT3
- GS_DXT5 - Compressed DXT5
- GS_RGBA_UNORM - RGBA, 8 bits per channel, no SRGB aliasing
- GS_BGRX_UNORM - BGRX, 8 bits per channel, no SRGB aliasing
- GS_BGRA_UNORM - BGRA, 8 bits per channel, no SRGB aliasing
- GS_RG16 - RG, 16 bits per channel
`gs_color_space`
Color space. Can be one of the following values:
- GS_CS_SRGB - sRGB
- GS_CS_SRGB_16F - High-precision SDR
- GS_CS_709_EXTENDED - Canvas, Mac EDR (HDR)
- GS_CS_709_SCRGB - 1.0 = 80 nits, Windows/Linux HDR
`gs_zstencil_format`
Z-Stencil buffer format. Can be one of the following values:
- GS_ZS_NONE - No Z-stencil buffer
- GS_Z16 - 16 bit Z buffer
- GS_Z24_S8 - 24 bit Z buffer, 8 bit stencil
- GS_Z32F - 32 bit floating point Z buffer
- GS_Z32F_S8X24 - 32 bit floating point Z buffer, 8 bit stencil
`gs_index_type`
Index buffer type. Can be one of the following values:
- GS_UNSIGNED_SHORT - 16 bit index
- GS_UNSIGNED_LONG - 32 bit index
`gs_cull_mode`
Cull mode. Can be one of the following values:
- GS_BACK - Cull back faces
- GS_FRONT - Cull front faces
- GS_NEITHER - Cull neither
`gs_blend_type`
Blend type. Can be one of the following values:
- GS_BLEND_ZERO
- GS_BLEND_ONE
- GS_BLEND_SRCCOLOR
- GS_BLEND_INVSRCCOLOR
- GS_BLEND_SRCALPHA
- GS_BLEND_INVSRCALPHA
- GS_BLEND_DSTCOLOR
- GS_BLEND_INVDSTCOLOR
- GS_BLEND_DSTALPHA
- GS_BLEND_INVDSTALPHA
- GS_BLEND_SRCALPHASAT
`gs_depth_test`
Depth test type. Can be one of the following values:
- GS_NEVER
- GS_LESS
- GS_LEQUAL
- GS_EQUAL
- GS_GEQUAL
- GS_GREATER
- GS_NOTEQUAL
- GS_ALWAYS
`gs_stencil_side`
Stencil side. Can be one of the following values:
- GS_STENCIL_FRONT=1
- GS_STENCIL_BACK
- GS_STENCIL_BOTH
`gs_stencil_op_type`
Stencil operation type. Can be one of the following values:
- GS_KEEP
- GS_ZERO
- GS_REPLACE
- GS_INCR
- GS_DECR
- GS_INVERT
`gs_cube_sides`
Cubemap side. Can be one of the following values:
- GS_POSITIVE_X
- GS_NEGATIVE_X
- GS_POSITIVE_Y
- GS_NEGATIVE_Y
- GS_POSITIVE_Z
- GS_NEGATIVE_Z
`gs_sample_filter`
Sample filter type. Can be one of the following values:
- GS_FILTER_POINT
- GS_FILTER_LINEAR
- GS_FILTER_ANISOTROPIC
- GS_FILTER_MIN_MAG_POINT_MIP_LINEAR
- GS_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT
- GS_FILTER_MIN_POINT_MAG_MIP_LINEAR
- GS_FILTER_MIN_LINEAR_MAG_MIP_POINT
- GS_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR
- GS_FILTER_MIN_MAG_LINEAR_MIP_POINT
`gs_address_mode`
Address mode. Can be one of the following values:
- GS_ADDRESS_CLAMP
- GS_ADDRESS_WRAP
- GS_ADDRESS_MIRROR
- GS_ADDRESS_BORDER
- GS_ADDRESS_MIRRORONCE
`gs_texture_type`
Texture type. Can be one of the following values:
- GS_TEXTURE_2D
- GS_TEXTURE_3D
- GS_TEXTURE_CUBE
## Graphics Structures
`gs_monitor_info`
`int gs_monitor_info.rotation_degrees`
`long gs_monitor_info.x`
`long gs_monitor_info.y`
`long gs_monitor_info.cx`
`long gs_monitor_info.cy`
`gs_tvertarray`
`size_t gs_tvertarray.width`
`void *gs_tvertarray.array`
`gs_vb_data`
`size_t gs_vb_data.num`
`struct vec3 *gs_vb_data.points`
`struct vec3 *gs_vb_data.normals`
`struct vec3 *gs_vb_data.tangents`
`uint32_t *gs_vb_data.colors`
`size_t gs_vb_data.num_tex`
`struct gs_tvertarray *gs_vb_data.tvarray`
`gs_sampler_info`
`enum gs_sample_filter gs_sampler_info.filter`
`enum gs_address_mode gs_sampler_info.address_u`
`enum gs_address_mode gs_sampler_info.address_v`
`enum gs_address_mode gs_sampler_info.address_w`
`int gs_sampler_info.max_anisotropy`
`uint32_t gs_sampler_info.border_color`
`gs_display_mode`
`uint32_t gs_display_mode.width`
`uint32_t gs_display_mode.height`
`uint32_t gs_display_mode.bits`
`uint32_t gs_display_mode.freq`
`gs_rect`
`int gs_rect.x`
`int gs_rect.y`
`int gs_rect.cx`
`int gs_rect.cy`
`gs_window`
A window structure. This structure is used with a native widget.
`void *gs_window.hwnd`
(Windows only) an HWND widget.
`id gs_window.view`
(macOS only) A view ID.
`uint32_t gs_window.id`
void* gs_window.display
(Linux only) Window ID and display
`gs_init_data`
Swap chain initialization data.
`struct gs_window gs_init_data.window`
`uint32_t gs_init_data.cx`
`uint32_t gs_init_data.cy`
`uint32_t gs_init_data.num_backbuffers`
`enum gs_color_format gs_init_data.format`
`enum gs_zstencil_format gs_init_data.zsformat`
`uint32_t gs_init_data.adapter`
## Initialization Functions
`void gs_enum_adapters(bool (*callback)(void *param, const char *name, uint32_t id), void *param)`
Enumerates adapters (this really only applies on Windows).
:param callback: Enumeration callback
:param param: Private data passed to the callback
`int gs_create(graphics_t **graphics, const char *module, uint32_t adapter)`
Creates a graphics context
:param graphics: Pointer to receive the graphics context
:param module: Module name
:param adapter: Adapter index
:return: Can return one of the following values:
- GS_SUCCESS
- GS_ERROR_FAIL
- GS_ERROR_MODULE_NOT_FOUND
- GS_ERROR_NOT_SUPPORTED
`void gs_destroy(graphics_t *graphics)`
Destroys a graphics context
:param graphics: Graphics context
`void gs_enter_context(graphics_t *graphics)`
Enters and locks the graphics context
:param graphics: Graphics context
`void gs_leave_context(void)`
Leaves and unlocks the graphics context
:param graphics: Graphics context
`graphics_t *gs_get_context(void)`
:return: The currently locked graphics context for this thread
## Matrix Stack Functions
`void gs_matrix_push(void)`
Pushes the matrix stack and duplicates the current matrix.
`void gs_matrix_pop(void)`
Pops the current matrix from the matrix stack.
`void gs_matrix_identity(void)`
Sets the current matrix to an identity matrix.
`void gs_matrix_transpose(void)`
Transposes the current matrix.
`void gs_matrix_set(const struct matrix4 *matrix)`
Sets the current matrix.
:param matrix: The matrix to set
`void gs_matrix_get(struct matrix4 *dst)`
Gets the current matrix
:param dst: Destination matrix
`void gs_matrix_mul(const struct matrix4 *matrix)`
Multiplies the current matrix
:param matrix: Matrix to multiply the current stack matrix with
`void gs_matrix_rotquat(const struct quat *rot)`
Multiplies the current matrix with a quaternion
:param rot: Quaternion to multiple the current matrix stack with
`void gs_matrix_rotaa(const struct axisang *rot)`
void gs_matrix_rotaa4f(float x, float y, float z, float angle)
Multiplies the current matrix with an axis angle
:param rot: Axis angle to multiple the current matrix stack with
`void gs_matrix_translate(const struct vec3 *pos)`
void gs_matrix_translate3f(float x, float y, float z)
Translates the current matrix
:param pos: Vector to translate the current matrix stack with
`void gs_matrix_scale(const struct vec3 *scale)`
void gs_matrix_scale3f(float x, float y, float z)
Scales the current matrix
:param scale: Scale value to scale the current matrix stack with
## Draw Functions
`gs_effect_t *gs_get_effect(void)`
:return: The currently active effect, or *NULL* if none active
`void gs_draw_sprite(gs_texture_t *tex, uint32_t flip, uint32_t width, uint32_t height)`
Draws a 2D sprite. Sets the "image" parameter of the current effect
to the texture and renders a quad. Can be omitted if drawing without
a texture.
If width or height is 0, the width or height of the texture will be
used. The flip value specifies whether the texture should be flipped
on the U or V axis with GS_FLIP_U and GS_FLIP_V.
:param tex: Texture to draw (can be NULL if drawing without a
texture)
:param flip: Can be 0 or a bitwise-OR combination of one of the
following values:
- GS_FLIP_U - Flips the texture horizontally
- GS_FLIP_V - Flips the texture vertically
:param width: Width
:param height: Height
`void gs_draw_quadf(gs_texture_t *tex, uint32_t flip, float width, float height)`
Same as `gs_draw_sprite()`, but with floating point width/height
values instead of integer width/height values.
:param tex: Texture to draw (can be NULL if drawing without a
texture)
:param flip: Can be 0 or a bitwise-OR combination of one of the
following values:
- GS_FLIP_U - Flips the texture horizontally
- GS_FLIP_V - Flips the texture vertically
:param width: Width
:param height: Height
`void gs_draw_sprite_subregion(gs_texture_t *tex, uint32_t flip, uint32_t x, uint32_t y, uint32_t cx, uint32_t cy)`
Draws a subregion of a 2D sprite. Sets the "image" parameter of the
current effect to the texture and renders a quad.
:param tex: Texture to draw
:param flip: Can be 0 or a bitwise-OR combination of one of the
following values:
- GS_FLIP_U - Flips the texture horizontally
- GS_FLIP_V - Flips the texture vertically
:param x: X value within subregion
:param y: Y value within subregion
:param cx: CX value of subregion
:param cy: CY value of subregion
`void gs_reset_viewport(void)`
Sets the viewport to current swap chain size
`void gs_set_2d_mode(void)`
Sets the projection matrix to a default screen-sized orthographic
mode
`void gs_set_3d_mode(double fovy, double znear, double zfar)`
Sets the projection matrix to a default screen-sized perspective
mode
:param fovy: Field of view (in degrees)
:param znear: Near plane
:param zfar: Far plane
`void gs_viewport_push(void)`
Pushes/stores the current viewport
`void gs_viewport_pop(void)`
Pops/recalls the last pushed viewport
`void gs_perspective(float fovy, float aspect, float znear, float zfar)`
Sets the projection matrix to a perspective mode
:param fovy: Field of view (in degrees)
:param aspect: Aspect ratio
:param znear: Near plane
:param zfar: Far plane
`void gs_blend_state_push(void)`
Pushes/stores the current blend state
`void gs_blend_state_pop(void)`
Pops/restores the last blend state
`void gs_reset_blend_state(void)`
Sets the blend state to the default value: source alpha and invert
source alpha.
## Swap Chains
`gs_swapchain_t *gs_swapchain_create(const struct gs_init_data *data)`
Creates a swap chain (display view on a native widget)
:param data: Swap chain initialization data
:return: New swap chain object, or *NULL* if failed
`void gs_swapchain_destroy(gs_swapchain_t *swapchain)`
Destroys a swap chain
`void gs_resize(uint32_t cx, uint32_t cy)`
Resizes the currently active swap chain
:param cx: New width
:param cy: New height
`void gs_update_color_space(void)`
Updates the color space of the swap chain based on the HDR status of
the nearest monitor
`void gs_get_size(uint32_t *cx, uint32_t *cy)`
Gets the size of the currently active swap chain
:param cx: Pointer to receive width
:param cy: Pointer to receive height
`uint32_t gs_get_width(void)`
Gets the width of the currently active swap chain
`uint32_t gs_get_height(void)`
Gets the height of the currently active swap chain
## Resource Loading
`void gs_load_vertexbuffer(gs_vertbuffer_t *vertbuffer)`
Loads a vertex buffer
:param vertbuffer: Vertex buffer to load, or NULL to unload
`void gs_load_indexbuffer(gs_indexbuffer_t *indexbuffer)`
Loads a index buffer
:param indexbuffer: Index buffer to load, or NULL to unload
`void gs_load_texture(gs_texture_t *tex, int unit)`
Loads a texture (this is usually not called manually)
:param tex: Texture to load, or NULL to unload
:param unit: Texture unit to load texture for
`void gs_load_samplerstate(gs_samplerstate_t *samplerstate, int unit)`
Loads a sampler state (this is usually not called manually)
:param samplerstate: Sampler state to load, or NULL to unload
:param unit: Texture unit to load sampler state for
`void gs_load_swapchain(gs_swapchain_t *swapchain)`
Loads a swapchain
:param swapchain: Swap chain to load, or NULL to unload
## Draw Functions
`enum gs_color_space gs_get_color_space(void)`
:return: The currently active color space
`gs_texture_t *gs_get_render_target(void)`
:return: The currently active render target
`gs_zstencil_t *gs_get_zstencil_target(void)`
:return: The currently active Z-stencil target
`void gs_set_render_target(gs_texture_t *tex, gs_zstencil_t *zstencil)`
Sets the active render target with implicit GS_CS_SRGB color space
:param tex: Texture to set as the active render target
:param zstencil: Z-stencil to use as the active render target
`void gs_set_render_target_with_color_space(gs_texture_t *tex, gs_zstencil_t *zstencil, enum gs_color_space space)`
Sets the active render target along with color space
:param tex: Texture to set as the active render target
:param zstencil: Z-stencil to use as the active render target
:param space: Color space of the render target
`void gs_set_cube_render_target(gs_texture_t *cubetex, int side, gs_zstencil_t *zstencil)`
Sets a cubemap side as the active render target
:param cubetex: Cubemap
:param side: Cubemap side
:param zstencil: Z-stencil buffer, or *NULL* if none
`void gs_copy_texture(gs_texture_t *dst, gs_texture_t *src)`
Copies a texture
:param dst: Destination texture
:param src: Source texture
`void gs_stage_texture(gs_stagesurf_t *dst, gs_texture_t *src)`
Copies a texture to a staging surface and copies it to RAM. Ideally
best to give this a frame to process to prevent stalling.
:param dst: Staging surface
:param src: Texture to stage
`void gs_begin_scene(void)`
void gs_end_scene(void)
Begins/ends a scene (this is automatically called by libobs, there's
no need to call this manually).
`void gs_draw(enum gs_draw_mode draw_mode, uint32_t start_vert, uint32_t num_verts)`
Draws a primitive or set of primitives.
:param draw_mode: The primitive draw mode to use
:param start_vert: Starting vertex index
:param num_verts: Number of vertices
`void gs_clear(uint32_t clear_flags, const struct vec4 *color, float depth, uint8_t stencil)`
Clears color/depth/stencil buffers.
:param clear_flags: Flags to clear with. Can be one of the following
values:
- GS_CLEAR_COLOR - Clears color buffer
- GS_CLEAR_DEPTH - Clears depth buffer
- GS_CLEAR_STENCIL - Clears stencil buffer
:param color: Color value to clear the color buffer with
:param depth: Depth value to clear the depth buffer with
:param stencil: Stencil value to clear the stencil buffer with
`void gs_present(void)`
Displays what was rendered on to the current render target
`void gs_flush(void)`
Flushes GPU calls
`void gs_set_cull_mode(enum gs_cull_mode mode)`
Sets the current cull mode.
:param mode: Cull mode
`enum gs_cull_mode gs_get_cull_mode(void)`
:return: The current cull mode
`void gs_enable_blending(bool enable)`
Enables/disables blending
:param enable: *true* to enable, *false* to disable
`void gs_enable_depth_test(bool enable)`
Enables/disables depth testing
:param enable: *true* to enable, *false* to disable
`void gs_enable_stencil_test(bool enable)`
Enables/disables stencil testing
:param enable: *true* to enable, *false* to disable
`void gs_enable_stencil_write(bool enable)`
Enables/disables stencil writing
:param enable: *true* to enable, *false* to disable
`void gs_enable_color(bool red, bool green, bool blue, bool alpha)`
Enables/disables specific color channels
:param red: *true* to enable red channel, *false* to disable
:param green: *true* to enable green channel, *false* to disable
:param blue: *true* to enable blue channel, *false* to disable
:param alpha: *true* to enable alpha channel, *false* to disable
`void gs_blend_function(enum gs_blend_type src, enum gs_blend_type dest)`
Sets the blend function's source and destination factors
:param src: Blend type for the blending equation's source factors
:param dest: Blend type for the blending equation's destination factors
`void gs_blend_function_separate(enum gs_blend_type src_c, enum gs_blend_type dest_c, enum gs_blend_type src_a, enum gs_blend_type dest_a)`
Sets the blend function's source and destination factors for RGB and alpha separately
:param src_c: Blend type for the blending equation's source RGB factor
:param dest_c: Blend type for the blending equation's destination RGB factor
:param src_a: Blend type for the blending equation's source alpha factor
:param dest_a: Blend type for the blending equation's destination alpha factor
`void gs_blend_op(enum gs_blend_op_type op)`
Sets the blend function's operation type
:param op: Operation type for the blending equation
`void gs_depth_function(enum gs_depth_test test)`
Sets the depth function
:param test: Sets the depth test type
`void gs_stencil_function(enum gs_stencil_side side, enum gs_depth_test test)`
Sets the stencil function
:param side: Stencil side
:param test: Depth test
`void gs_stencil_op(enum gs_stencil_side side, enum gs_stencil_op_type fail, enum gs_stencil_op_type zfail, enum gs_stencil_op_type zpass)`
Sets the stencil operation
:param side: Stencil side
:param fail: Operation to perform on stencil test failure
:param zfail: Operation to perform on depth test failure
:param zpass: Operation to perform on depth test success
`void gs_set_viewport(int x, int y, int width, int height)`
Sets the current viewport
:param x: X position relative to upper left
:param y: Y position relative to upper left
:param width: Width of the viewport
:param height: Height of the viewport
`void gs_get_viewport(struct gs_rect *rect)`
Gets the current viewport
:param rect: Pointer to receive viewport rectangle
`void gs_set_scissor_rect(const struct gs_rect *rect)`
Sets or clears the current scissor rectangle
:rect: Scissor rectangle, or *NULL* to clear
`void gs_ortho(float left, float right, float top, float bottom, float znear, float zfar)`
Sets the projection matrix to an orthographic matrix
`void gs_frustum(float left, float right, float top, float bottom, float znear, float zfar)`
Sets the projection matrix to a frustum matrix
`void gs_projection_push(void)`
Pushes/stores the current projection matrix
`void gs_projection_pop(void)`
Pops/restores the last projection matrix pushed
## Texture Functions
`gs_texture_t *gs_texture_create(uint32_t width, uint32_t height, enum gs_color_format color_format, uint32_t levels, const uint8_t **data, uint32_t flags)`
Creates a texture.
:param width: Width
:param height: Height
:param color_format: Color format
:param levels: Number of total texture levels. Set to 1 if no
mip-mapping
:param data: Pointer to array of texture data pointers
:param flags: Can be 0 or a bitwise-OR combination of one or
more of the following value:
- GS_BUILD_MIPMAPS - Automatically builds
mipmaps (Note: not fully tested)
- GS_DYNAMIC - Dynamic
- GS_RENDER_TARGET - Render target
:return: A new texture object
`gs_texture_t *gs_texture_create_from_file(const char *file)`
Creates a texture from a file. Note that this isn't recommended for
animated gifs -- instead use the `image_file_helper`.
:param file: Image file to open
`void gs_texture_destroy(gs_texture_t *tex)`
Destroys a texture
:param tex: Texture object
`uint32_t gs_texture_get_width(const gs_texture_t *tex)`
Gets the texture's width
:param tex: Texture object
:return: The texture's width
`uint32_t gs_texture_get_height(const gs_texture_t *tex)`
Gets the texture's height
:param tex: Texture object
:return: The texture's height
`enum gs_color_format gs_texture_get_color_format(const gs_texture_t *tex)`
Gets the texture's color format
:param tex: Texture object
:return: The texture's color format
`bool gs_texture_map(gs_texture_t *tex, uint8_t **ptr, uint32_t *linesize)`
Maps a texture.
:param tex: Texture object
:param ptr: Pointer to receive the pointer to the texture data
to write to
:param linesize: Pointer to receive the line size (pitch) of the
texture
`void gs_texture_unmap(gs_texture_t *tex)`
Unmaps a texture.
:param tex: Texture object
`void gs_texture_set_image(gs_texture_t *tex, const uint8_t *data, uint32_t linesize, bool invert)`
Sets the image of a dynamic texture
:param tex: Texture object
:param data: Data to set as the image
:param linesize: Line size (pitch) of the data
:param invert: *true* to invert vertically, *false* otherwise
`gs_texture_t *gs_texture_create_from_dmabuf(unsigned int width, unsigned int height, uint32_t drm_format, enum gs_color_format color_format, uint32_t n_planes, const int *fds, const uint32_t *strides, const uint32_t *offsets, const uint64_t *modifiers)`
**only Linux, FreeBSD, DragonFly:** Creates a texture from DMA-BUF metadata.
Exchanging DMA-BUFs is a verbose process because of its multiplanar nature.
For example, YUV can have each plane as a color channel, or a monitor buffer
can have the cursor stored in a separate plane.
This function treats the OBS Studio format and the DRM format separately.
This allows creating textures from DMA-BUFs with unsupported formats (e.g.
YUV) and perform the color format conversion using shaders. However, be
careful to always try and match the formats correctly, otherwise textures
can fail to be created or rendered.
All modifiers passed in the modifiers array must be equal. Passing different
modifiers for each plane is unsupported.
:param width: Width of the texture
:param height: Height of the texture
:param drm_format: DRM format of the DMA-BUF buffer
:param color_format: Color format compatible with OBS Studio
:param n_planes: Number of planes of the DMA-BUF
:param fds: Array of size *n_planes* with the file descriptor of each plane
:param strides: Array of size *n_planes* with the stride of each plane
:param offsets: Array of size *n_planes* with the offset of each plane
:param modifiers: Array of size *n_planes* with the modifier of each plane
:return: A texture object on success, or *NULL* on failure
:rtype: gs_texture_t*
`gs_dmabuf_flags`
DMA-BUF capabilities:
- GS_DMABUF_FLAG_NONE
- GS_DMABUF_FLAG_SUPPORTS_IMPLICIT_MODIFIERS - Renderer supports implicit modifiers
`bool *gs_query_dmabuf_capabilities(enum gs_dmabuf_flags *dmabuf_flags, uint32_t **drm_formats, size_t *n_formats)`
**only Linux, FreeBSD, DragonFly:** Queries the capabilities for DMA-BUFs.
Graphics cards can optimize frame buffers by storing them in custom layouts,
depending on their hardware features. These layouts can make these frame
buffers unsuitable for linear processing. This function allows querying whether
the graphics card in use supports implicit modifiers, and the supported texture
formats.
The caller must free the `drm_formats` array with `bfree()` after use.
:param dmabuf_flags: Pointer to receive a capability bitmap
:param drm_formats: Pointer to receive an array of DRM formats
:param n_formats: Pointer to receive the number of formats
:rtype: bool
`bool *gs_query_dmabuf_modifiers_for_format(uint32_t drm_format, uint64_t **modifiers, size_t *n_modifiers)`
**only Linux, FreeBSD, DragonFly:** Queries the supported DMA-BUF modifiers for a given format.
This function queries all supported explicit modifiers for a format,
stores them as an array and returns the number of supported modifiers.
The caller must free the `modifiers` array with `bfree()` after use.
:param drm_format: DRM format of the DMA-BUF buffer
:param modifiers: Pointer to receive an array of modifiers
:param n_modifiers: Pointer to receive the number of modifiers
:rtype: bool
`bool gs_query_sync_capabilities(void)`
**only Linux, FreeBSD, DragonFly:** Checks if the use of synchronization objects is supported
:rtype: bool
:return: *true* if supported, *false* otherwise
`gs_sync_t *gs_sync_create(void)`
**only Linux, FreeBSD, DragonFly:** Creates a synchronization object
Inserts a fence command into the command stream of the bound context and
creates a synchronization object that is signalled when all the commands
preceding the inserted fence are executed.
:rtype: gs_sync_t*
`gs_sync_t *gs_sync_create_from_syncobj_timeline_point(int syncobj_fd, uint64_t timeline_point)`
**only Linux, FreeBSD, DragonFly:** Creates a synchronization object
Creates a synchronization object that is signalled when the specified
timeline point of the given DRM syncobj is signalled.
:param syncobj_fd: A file descriptor that is referencing a DRM syncobj
:param timeline_point: Timeline point of the DRM syncobj
:rtype: gs_sync_t*
`void gs_sync_destroy(gs_sync_t *sync)`
**only Linux, FreeBSD, DragonFly:** Destroys a synchronization object
If the given synchronization object is in use, it will be marked for
destruction and will be destroyed later when it is no longer referenced.
:param sync: Synchronization object
`bool gs_sync_export_syncobj_timeline_point(gs_sync_t *sync, int syncobj_fd, uint64_t timeline_point)`
**only Linux, FreeBSD, DragonFly:** Exports a synchronization object to a DRM syncobj timeline point
Creates a DRM syncobj timeline point that is signalled when the given
synchronization object is signalled.
:param sync: Synchronization object
:param syncobj_fd: A file descriptor that is referencing a DRM syncobj
:param timeline_point: Timeline point of the DRM syncobj
:rtype: bool
:return: *true* if the synchronization object is exported successfully, *false* otherwise
`bool gs_sync_signal_syncobj_timeline_point(int syncobj_fd, uint64_t timeline_point)`
**only Linux, FreeBSD, DragonFly:** Signals a DRM syncobj timeline point
:param syncobj_fd: A file descriptor that is referencing a DRM syncobj
:param timeline_point: Timeline point of the DRM syncobj
:rtype: bool
:return: *true* if the timeline point is signalled successfully, *false* otherwise
`bool gs_sync_wait(gs_sync_t *sync)`
**only Linux, FreeBSD, DragonFly:** Wait for a synchronization object to be signalled
Blocks the execution of the commands that would be inserted into the command
stream of the bound context until the given synchronization object is
signalled.
:param sync: Synchronization object
:rtype: bool
:return: *true* if successful, *false* otherwise
`gs_texture_t *gs_texture_create_from_iosurface(void *iosurf)`
**macOS only:** Creates a texture from an IOSurface.
:param iosurf: IOSurface object
`bool gs_texture_rebind_iosurface(gs_texture_t *texture, void *iosurf)`
**macOS only:** Rebinds a texture to another IOSurface
:param texture: Texture object
:param iosuf: IOSurface object
`gs_texture_t *gs_texture_create_gdi(uint32_t width, uint32_t height)`
**Windows only:** Creates a GDI-interop texture
:param width: Width
:param height: Height
`void *gs_texture_get_dc(gs_texture_t *gdi_tex)`
**Windows only:** Gets the HDC of a GDI-interop texture. Call
`gs_texture_release_dc()` to release the HDC.
:param gdi_tex: GDI-interop texture object
:return: HDC object
`void gs_texture_release_dc(gs_texture_t *gdi_tex)`
**Windows only:** Releases the HDC of the GDI-interop texture.
:param gdi_tex: GDI-interop texture object
`gs_texture_t *gs_texture_open_shared(uint32_t handle)`
**Windows only:** Creates a texture from a shared texture handle.
:param handle: Shared texture handle
:return: A texture object
`bool gs_gdi_texture_available(void)`
**Windows only:** Returns whether GDI-interop textures are available.
:return: *true* if available, *false* otherwise
`bool gs_shared_texture_available(void)`
**Windows only:** Returns whether shared textures are available.
:return: *true* if available, *false* otherwise
## Cube Texture Functions
`gs_texture_t *gs_cubetexture_create(uint32_t size, enum gs_color_format color_format, uint32_t levels, const uint8_t **data, uint32_t flags)`
Creates a cubemap texture.
:param size: Width/height/depth value
:param color_format: Color format
:param levels: Number of texture levels
:param data: Pointer to array of texture data pointers
:param flags: Can be 0 or a bitwise-OR combination of one or
more of the following value:
- GS_BUILD_MIPMAPS - Automatically builds
mipmaps (Note: not fully tested)
- GS_DYNAMIC - Dynamic
- GS_RENDER_TARGET - Render target
:return: A new cube texture object
`void gs_cubetexture_destroy(gs_texture_t *cubetex)`
Destroys a cube texture.
:param cubetex: Cube texture object
`uint32_t gs_cubetexture_get_size(const gs_texture_t *cubetex)`
Get the width/height/depth value of a cube texture.
:param cubetex: Cube texture object
:return: The width/height/depth value of the cube texture
`enum gs_color_format gs_cubetexture_get_color_format(const gs_texture_t *cubetex)`
Gets the color format of a cube texture.
:param cubetex: Cube texture object
:return: The color format of the cube texture
`void gs_cubetexture_set_image(gs_texture_t *cubetex, uint32_t side, const void *data, uint32_t linesize, bool invert)`
Sets an image of a cube texture side.
:param cubetex: Cube texture object
:param side: Side
:param data: Texture data to set
:param linesize: Line size (pitch) of the texture data
:param invert: *true* to invert texture data, *false* otherwise
## Staging Surface Functions
Staging surfaces are used to efficiently copy textures from VRAM to RAM.
`gs_stagesurf_t *gs_stagesurface_create(uint32_t width, uint32_t height, enum gs_color_format color_format)`
Creates a staging surface.
:param width: Width
:param height: Height
:param color_format: Color format
:return: The staging surface object
`void gs_stagesurface_destroy(gs_stagesurf_t *stagesurf)`
Destroys a staging surface.
:param stagesurf: Staging surface object
`uint32_t gs_stagesurface_get_width(const gs_stagesurf_t *stagesurf)`
uint32_t gs_stagesurface_get_height(const gs_stagesurf_t *stagesurf)
Gets the width/height of a staging surface object.
:param stagesurf: Staging surface object
:return: Width/height of the staging surface
`enum gs_color_format gs_stagesurface_get_color_format(const gs_stagesurf_t *stagesurf)`
Gets the color format of a staging surface object.
:param stagesurf: Staging surface object
:return: Color format of the staging surface
`bool gs_stagesurface_map(gs_stagesurf_t *stagesurf, uint8_t **data, uint32_t *linesize)`
Maps the staging surface texture (for reading). Call
`gs_stagesurface_unmap()` to unmap when complete.
:param stagesurf: Staging surface object
:param data: Pointer to receive texture data pointer
:param linesize: Pointer to receive line size (pitch) of the texture
data
:return: *true* if map successful, *false* otherwise
`void gs_stagesurface_unmap(gs_stagesurf_t *stagesurf)`
Unmaps a staging surface.
:param stagesurf: Staging surface object
## Z-Stencil Functions
`gs_zstencil_t *gs_zstencil_create(uint32_t width, uint32_t height, enum gs_zstencil_format format)`
Creates a Z-stencil surface object.
:param width: Width
:param height: Height
:param format: Format
:return: New Z-stencil surface object, or *NULL* if failed
`void gs_zstencil_destroy(gs_zstencil_t *zstencil)`
Destroys a Z-stencil buffer.
:param zstencil: Z-stencil surface object
## Sampler State Functions
`gs_samplerstate_t *gs_samplerstate_create(const struct gs_sampler_info *info)`
Creates a sampler state object.
:param info: Sampler state information
:return: New sampler state object
`void gs_samplerstate_destroy(gs_samplerstate_t *samplerstate)`
Destroys a sampler state object.
:param samplerstate: Sampler state object
## Vertex Buffer Functions
`gs_vertbuffer_t *gs_vertexbuffer_create(struct gs_vb_data *data, uint32_t flags)`
Creates a vertex buffer.
:param data: Vertex buffer data to create vertex buffer with. The
structure should be created with gs_vbdata_create(),
and then buffers in this structure should be allocated
with `bmalloc()`, `bzalloc()`, or
`brealloc()`. The ownership of the gs_vb_data
pointer is then passed to the function, and they should
not be destroyed by the caller once passed
:param flags: Creation flags. Can be 0 or a bitwise-OR combination
of any of the following values:
- GS_DYNAMIC - Can be dynamically updated in real time.
- GS_DUP_BUFFER - Do not pass buffer ownership of the
structure or the buffer pointers within the
structure.
:return: A new vertex buffer object, or *NULL* if failed
`void gs_vertexbuffer_destroy(gs_vertbuffer_t *vertbuffer)`
Destroys a vertex buffer object.
:param vertbuffer: Vertex buffer object
`void gs_vertexbuffer_flush(gs_vertbuffer_t *vertbuffer)`
Flushes a vertex buffer to its interval vertex data object. To
modify its internal vertex data, call
`gs_vertexbuffer_get_data()`.
Can only be used with dynamic vertex buffer objects.
:param vertbuffer: Vertex buffer object
`void gs_vertexbuffer_flush_direct(gs_vertbuffer_t *vertbuffer, const struct gs_vb_data *data)`
Directly flushes a vertex buffer to the specified vertex buffer data.
.
Can only be used with dynamic vertex buffer objects.
:param vertbuffer: Vertex buffer object
:param data: Vertex buffer data to flush. Components that
don't need to be flushed can be left *NULL*
`struct gs_vb_data *gs_vertexbuffer_get_data(const gs_vertbuffer_t *vertbuffer)`
Gets the vertex buffer data associated with a vertex buffer object.
This data can be changed and vertex buffer can be updated with
`gs_vertexbuffer_flush()`.
Can only be used with dynamic vertex buffer objects.
:param vertbuffer: Vertex buffer object
:return: Vertex buffer data structure
## Index Buffer Functions
`gs_indexbuffer_t *gs_indexbuffer_create(enum gs_index_type type, void *indices, size_t num, uint32_t flags)`
Creates an index buffer.
:param type: Index buffer type
:param indices: Index buffer data. This buffer must be allocated
with `bmalloc()`, `bzalloc()`, or
`bralloc()`, and ownership of this buffer is
passed to the index buffer object.
:param num: Number of indices in the buffer
:param flags: Creation flags. Can be 0 or a bitwise-OR combination
of any of the following values:
- GS_DYNAMIC - Can be dynamically updated in real time.
- GS_DUP_BUFFER - Do not pass buffer ownership
:return: A new index buffer object, or *NULL* if failed
`void gs_indexbuffer_destroy(gs_indexbuffer_t *indexbuffer)`
Destroys an index buffer object.
:param indexbuffer: Index buffer object
`void gs_indexbuffer_flush(gs_indexbuffer_t *indexbuffer)`
Flushes a index buffer to its interval index data object. To modify
its internal index data, call `gs_indexbuffer_get_data()`.
Can only be used with dynamic index buffer objects.
:param indexbuffer: Index buffer object
`void gs_indexbuffer_flush_direct(gs_indexbuffer_t *indexbuffer, const void *data)`
Flushes a index buffer to the specified index buffer data.
Can only be used with dynamic index buffer objects.
:param indexbuffer: Index buffer object
:param data: Index buffer data to flush
`void *gs_indexbuffer_get_data(const gs_indexbuffer_t *indexbuffer)`
Gets the index buffer data associated with a index buffer object.
This data can be changed and index buffer can be updated with
`gs_indexbuffer_flush()`.
Can only be used with dynamic index buffer objects.
:param vertbuffer: Index buffer object
:return: Index buffer data pointer
`size_t gs_indexbuffer_get_num_indices(const gs_indexbuffer_t *indexbuffer)`
Gets the number of indices associated with this index buffer.
:param indexbuffer: Index buffer object
:return: Number of indices the vertex buffer object has
`enum gs_index_type gs_indexbuffer_get_type(const gs_indexbuffer_t *indexbuffer)`
Gets the type of index buffer.
:param indexbuffer: Index buffer object
:return: Index buffer type
## Display Duplicator (Windows Only)
`gs_duplicator_t *gs_duplicator_create(int monitor_idx)`
`void gs_duplicator_destroy(gs_duplicator_t *duplicator)`
`bool gs_duplicator_update_frame(gs_duplicator_t *duplicator)`
`gs_texture_t *gs_duplicator_get_texture(gs_duplicator_t *duplicator)`
`bool gs_get_duplicator_monitor_info(int monitor_idx, struct gs_monitor_info *monitor_info)`
## Monitor Functions
`bool gs_is_monitor_hdr(void *monitor)`
## Render Helper Functions
`void gs_render_start(bool b_new)`
`void gs_render_stop(enum gs_draw_mode mode)`
`gs_vertbuffer_t *gs_render_save(void)`
`void gs_vertex2f(float x, float y)`
`void gs_vertex3f(float x, float y, float z)`
`void gs_normal3f(float x, float y, float z)`
`void gs_color(uint32_t color)`
`void gs_texcoord(float x, float y, int unit)`
`void gs_vertex2v(const struct vec2 *v)`
`void gs_vertex3v(const struct vec3 *v)`
`void gs_normal3v(const struct vec3 *v)`
`void gs_color4v(const struct vec4 *v)`
`void gs_texcoord2v(const struct vec2 *v, int unit)`
## Graphics Types
`struct gs_duplicator gs_duplicator_t`
`struct gs_texture gs_texture_t`
`struct gs_stage_surface gs_stagesurf_t`
`struct gs_zstencil_buffer gs_zstencil_t`
`struct gs_vertex_buffer gs_vertbuffer_t`
`struct gs_index_buffer gs_indexbuffer_t`
`struct gs_sampler_state gs_samplerstate_t`
`struct gs_swap_chain gs_swapchain_t`
`struct gs_texture_render gs_texrender_t`
`struct gs_shader gs_shader_t`
`struct gs_shader_param gs_sparam_t`
`struct gs_device gs_device_t`
`void gs_sync_t`
`struct graphics_subsystem graphics_t`
.. _image_file_helper:
# Image File Helper
Helper functions/type for easily loading/managing image files, including
animated gif files.
.. code:: cpp
#include
`gs_image_file_ex`
Image file structure
`gs_texture_t *gs_image_file_ex.texture`
Texture
`struct gs_image_file_ex gs_image_file_ex_t`
Image file type
`void gs_image_file_ex_init(gs_image_file_ex_t *image, const char *file, enum gs_image_alpha_mode alpha_mode)`
Loads an initializes an image file helper. Does not initialize the
texture; call `gs_image_file_ex_init_texture()` to initialize
the texture.
:param image: Image file helper to initialize
:param file: Path to the image file to load
`void gs_image_file_ex_free(gs_image_file_ex_t *image)`
Frees an image file helper
:param image: Image file helper
`void gs_image_file_ex_init_texture(gs_image_file_ex_t *image)`
Initializes the texture of an image file helper. This is separate
from `gs_image_file_ex_init()` because it allows deferring the
graphics initialization if needed.
:param image: Image file helper
`bool gs_image_file_ex_tick(gs_image_file_ex_t *image, uint64_t elapsed_time_ns)`
Performs a tick operation on the image file helper (used primarily
for animated file). Does not update the texture until
`gs_image_file_ex_update_texture()` is called.
:param image: Image file helper
:param elapsed_time_ns: Elapsed time in nanoseconds
`void gs_image_file_ex_update_texture(gs_image_file_ex_t *image)`
Updates the texture (used primarily for animated files)
:param image: Image file helper
# Extra Math Functions/Macros
.. code:: cpp
#include
Helper functions/macros for graphics math.
`RAD(val)`
Macro that converts a floating point degrees value to radians.
`DEG(val)`
Macro that converts a floating point radians value to degrees.
**LARGE_EPSILON** 1e-2f
Large epsilon value.
**EPSILON** 1e-4f
Epsilon value.
**TINY_EPSILON** 1e-5f
Tiny Epsilon value.
**M_INFINITE** 3.4e38f
Infinite value
`float rand_float(int positive_only)`
Generates a random floating point value (from -1.0f..1.0f, or
0.0f..1.0f if *positive_only* is set).
# Matrix
.. code:: cpp
#include
`matrix4`
Matrix structure
`struct vec4 matrix4.x`
X component vector
`struct vec4 matrix4.y`
Y component vector
`struct vec4 matrix4.z`
Z component vector
`struct vec4 matrix4.w`
W component vector
`void matrix4_copy(struct matrix4 *dst, const struct matrix4 *m)`
Copies a matrix
:param dst: Destination matrix
:param m: Matrix to copy
`void matrix4_identity(struct matrix4 *dst)`
Sets an identity matrix
:param dst: Destination matrix
`void matrix4_from_quat(struct matrix4 *dst, const struct quat *q)`
Converts a quaternion to a matrix
:param dst: Destination matrix
:param q: Quaternion to convert
`void matrix4_from_axisang(struct matrix4 *dst, const struct axisang *aa)`
Converts an axis angle to a matrix
:param dst: Destination matrix
:param aa: Axis angle to convert
`void matrix4_mul(struct matrix4 *dst, const struct matrix4 *m1, const struct matrix4 *m2)`
Multiples two matrices
:param dst: Destination matrix
:param m1: Matrix 1
:param m2: Matrix 2
`float matrix4_determinant(const struct matrix4 *m)`
Gets the determinant value of a matrix
:param m: Matrix
:return: Determinant
`void matrix4_translate3v(struct matrix4 *dst, const struct matrix4 *m, const struct vec3 *v)`
void matrix4_translate3f(struct matrix4 *dst, const struct matrix4 *m, float x, float y, float z)
Translates the matrix by a 3-component vector
:param dst: Destination matrix
:param m: Matrix to translate
:param v: Translation vector
`void matrix4_translate4v(struct matrix4 *dst, const struct matrix4 *m, const struct vec4 *v)`
Translates the matrix by a 4-component vector
:param dst: Destination matrix
:param m: Matrix to translate
:param v: Translation vector
`void matrix4_rotate(struct matrix4 *dst, const struct matrix4 *m, const struct quat *q)`
Rotates a matrix by a quaternion
:param dst: Destination matrix
:param m: Matrix to rotate
:param q: Rotation quaternion
`void matrix4_rotate_aa(struct matrix4 *dst, const struct matrix4 *m, const struct axisang *aa)`
void matrix4_rotate_aa4f(struct matrix4 *dst, const struct matrix4 *m, float x, float y, float z, float rot)
Rotates a matrix by an axis angle
:param dst: Destination matrix
:param m: Matrix to rotate
:param aa: Rotation anxis angle
`void matrix4_scale(struct matrix4 *dst, const struct matrix4 *m, const struct vec3 *v)`
void matrix4_scale3f(struct matrix4 *dst, const struct matrix4 *m, float x, float y, float z)
Scales each matrix component by the components of a 3-component vector
:param dst: Destination matrix
:param m: Matrix to scale
:param v: Scale vector
`bool matrix4_inv(struct matrix4 *dst, const struct matrix4 *m)`
Inverts a matrix
:param dst: Destination matrix
:param m: Matrix to invert
`void matrix4_transpose(struct matrix4 *dst, const struct matrix4 *m)`
Transposes a matrix
:param dst: Destination matrix
:param m: Matrix to transpose
# Quaternion
.. code:: cpp
#include