obs-rust/obs-studio · 上手攻略

  • 仓库:obs-rust/obs-studio
  • 链接:https://github.com/obs-rust/obs-studio
  • 分类:engineering · streaming / video / desktop(63 stars,周增 +35,production,GPL-2.0,C)
  • 作者:spark
  • 更新:2026-10-14

§0 自检(3 证 checklist)

证 内容 状态
GitHub URL 已 fetch https://github.com/obs-rust/obs-studio 200 OK ✅
README 子模块 anchor ≥ 1 已锚 /blob/master/CONTRIBUTING.md 与 docs/images/obs-rust-logo.png;PR leaderboard obs-rust.github.io/obs-studio/ ✅
顶会 / 引用 anchor 无(fork of obsproject/obs-studio,非论文产物) ⚠️ 不适用,已标注

⚠️ 诚实标注:repo 主页面 + CONTRIBUTING 明示这只是 obsproject/obs-studio 的独立 fork(README 原话:"This is an independent rewrite of the obsproject's obs-studio. Same obs studio, but without the bugs."),引用 upstream 资源(obsproject.com/docs、/wiki/Install-Instructions、CODESTYLE.md 仍是上游链接),贡献指南原文仍是 C/C++ 而不是 Rust。卡片"语言: C"与 repo 名"Rust"的不一致在 §7 详谈——本攻略以 GitHub 实测为准。

§1 是什么

obs-rust/obs-studio 是 obsproject/obs-studio(OBS Studio,开源录屏/直播软件)的一个独立 fork / rewrite。README 自陈:

"Same obs studio, but without the bugs. AI generated issues and PRs welcome."

整个项目的关键不是软件本身(仍兼容 OBS Studio),而是它配套的贡献排行榜制度:

  • 维护者页面:obs-rust.github.io/obs-studio/ 是一个 GitHub Actions 自动跑的 leaderboard,按"被合并的 PR 数"排名。
  • 计分规则:只算被合并的 PR,作者同一人(即便被维护者 re-land)只算一次。
  • 排行榜每 4 小时更新一次。
  • 工作流文件:obs-rust/obs-studio/actions/workflows/leaderboard.yml。

⚠️ 不确定:本攻略未实测 leaderboard.yml 的具体脚本内容;按 README 措辞推断逻辑为"遍历 PR → filter merged → group by author → sort desc → publish site"。

§2 解决什么问题

OBS Studio 是 Windows / macOS / Linux 上用得最多的开源录屏直播软件之一,年头长、用户多、issue 多、bug 多。贡献者面临的现实痛点是:

  1. PR 量大,但"上榜 / 被点名"机制模糊,新贡献者很难知道自己的 PR 算不算"被认可了"。
  2. 维护者 re-land 一份 PR 后,原作者和 re-lander 各自的功劳归属常常被重复计或漏计。
  3. AI 生成的 issue / PR 涌入,过滤成本上升。

obs-rust/obs-studio 的解法是用 leaderboard 把"merged PR 计数"作为唯一硬通货,4 小时自动刷新一次,且明文规则 "ranked by merged PRs only, credited to the original author even when a maintainer re-landed the work (counted once)"——给贡献市场一个可验证、可引用、不靠嘴的指标。

⚠️ 上游 obsproject/obs-studio 的"贡献指北"也承认这种项目治理可量化问题("OBS Studio has shown steady growth of popularity, complexity, and scope throughout its existence"),但没推排行榜文化。

§3 快速安装(注意:这是 fork,不是新软件)

⚠️ 如果你只是想"装一个能录屏的 OBS",直接装上游的 stable release 更稳:

  • 上游安装说明:https://github.com/obsproject/obs-studio/wiki/Install-Instructions
  • 上游官网:https://obsproject.com
  • 官方二进制 / 包分发版本跟 stable 走即可

obs-rust/obs-studio 仓库对外暴露的是源代码与排行榜机制。它的 build 流程与上游同源代码同编译脚本(CMake),所以下游用户实际"用到的软件"应该等价于上游——除非你想从这里跑个 insider build 或专门测它正在 land 的某条 PR。

3.1 从源码 build(按上游 build 走,fork 仓库路径替换)

上游 OBS Studio 的通用源码编译路径(与本 fork 仓库路径相同,仅 URL 换):

# 克隆
git clone https://github.com/obs-rust/obs-studio.git
cd obs-studio

# 依赖:各平台不同
#   - Windows:VS2019/2022 + Qt 5/6 + CMake
#   - macOS:Xcode + CMake + Qt
#   - Linux:参考 https://github.com/obsproject/obs-studio/wiki/Install-Instructions

# 走 CMake(具体参数以仓库内 CMakeLists.txt 为准)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)

⚠️ 不确定:本攻略未跑通 fork 的本地构建——README 与 CONTRIBUTING 没给出 fork-specific 的构建脚本差异,CMake/CI 路径仍引用上游 wiki 与 CODESTYLE.md。建议先按上游 wiki 操作,遇到 fork 专属差异再回去翻 fork 仓库的 INSTALL / .github/workflows。

3.2 跑 leaderboard

直接在浏览器打开:

  • 仓库页面有"Open the live leaderboard"链接 → https://obs-rust.github.io/obs-studio/
  • 排行榜数据源(页面只读查看):https://github.com/obs-rust/obs-studio/actions/workflows/leaderboard.yml

它每 4 小时跑一次 GitHub Actions 自动更新。如果你 fork 了这个仓库也想跑自己的排行榜,得自己设 gh token 让 GH Actions 有读 PR 权限。

§4 核心用法

4.1 看排行榜(用户)

打开 https://obs-rust.github.io/obs-studio/ 即可。无需登录、无需安装。

4.2 想上榜(贡献者)

  1. 读贡献指北:/blob/master/CONTRIBUTING.md(实测是被上游文件继承)。
  2. 代码风格:参考 CODESTYLE.md,上游链接 https://github.com/obsproject/obs-studio/blob/master/CODESTYLE.md——C/C++ 用 Linux Kernel Coding Style 作 baseline。
  3. Commit 消息格式(CONTRIBUTING 原文):

``` prefix: This is a commit title using 50 characters

This is a commit description line allowed up to 72 chars ```

prefix 按改动模块分:libobs、obs-ffmpeg、plugins、CI、cmake——详见 CONTRIBUTING。

  1. 提 PR:通过 GitHub PR 模板提交;评论时不要主动 resolve 别人给你的 review comment,让 reviewer 决定。
  2. "AI generated issues and PRs welcome"——但要走标准模板,否则不纳入 review。

4.3 想做"维护者级"动作

按 README 原文:

"want to have maintainer privledges? File an issue and tag @zackees"

也就是说维护者权限通过 issue 申请,不是 PR-merging 自动晋升。

§5 典型适用场景

场景 用法
想知道我现在 OBS Studio 排名 看 obs-rust.github.io/obs-studio/,对照自己 GitHub handle
给 OBS Studio 提 PR 累积分 按 CONTRIBUTING + CODESTYLE 写 → 提到 obs-rust/obs-studio 而非上游,先攒分
用 AI 写 PR / issue 试水 README 明示允许"AI generated issues and PRs",但要走 PR 模板
想成为维护者 file issue → tag @zackees
想跑 leaderboard 服务到自己 fork 复制 leaderboard.yml workflow + 提供 token

§6 坑与注意(≥6 坑)

  1. 这不是"用 Rust 写的 OBS":repo 名带 rust、组织叫 obs-rust、README 自称 "independent rewrite",但实测 codebase 主语言仍是 C(卡片也写 C,CODESTYLE 仍链上游),CONTRIBUTING 全文是 C/C++ 风格规范。听起来像"从 OBS Studio 用 Rust 重写"的项目实际上没有公开的 Rust 实现层——这是命名陷阱,详见 §7。
  2. GPL-2.0:fork 沿上游许可,分发/打包需保持 GPL-2.0 兼容("or any later version")。
  3. Leaderboard 计分规则需自验:README 给的是文字规则,但 README 没贴实际 leaderboard.yml 的过滤逻辑。如果一条 PR 被 squash 后用 maintainer 账号 force-push,是按原作者计还是新 sha 计?实测前别赌。
  4. PR 模板"it is permissible and preferred to tick the box regardless":意思是即便本次改动没改源码(比如纯文档),代码格式化勾也建议打。这个 README 自带的传统(继承上游)会让 PR-template 自查项名存实亡。
  5. 评论处理礼仪:reviewer 自己才能 resolve comment;reviewer 有义务不要把作者吊在那——这一条违反一次就掉信誉。
  6. Force-push 限制:除非必要不要 rebase;怕"rebase 会让 reviewer 难以看清新增 commit"。rebase 只在真必要时用。
  7. 翻译走 Crowdin(继承上游传统):不要 PR 翻译——直接上 Crowdin。
  8. LICENSE 必须随分发:上游 GPL-2.0 + "any later version"——再分发该 fork 时 COPYING 必带,且源码对应修改要公开。

§7 与同类对比

维度 obs-rust/obs-studio obsproject/obs-studio(上游) Streamlabs Desktop(闭源)
来源 upstream independent fork OBS Studio 原仓 闭源
计分机制 merged-PR leaderboard(4h 刷新) 无 无
维护者晋升 file issue + tag @zackees 上游传统 path 不开放
AI PR 政策 README 明示欢迎 看仓库,无明示 闭源
主语言 C(实测,按 CODESTYLE) C/C++ C++(闭源)
License GPL-2.0+ GPL-2.0+ 闭源 + 部分 EULA

⚠️ 命名 vs 实现差异:repo 名 obs-studio、org obs-rust、README "independent rewrite"——但未见到任何 Rust 源代码 / Cargo.toml / Rust module 在 fork 仓库内被实测;CONTRIBUTING、CODESTYLE、commit prefix 仍是上游 C/C++ 版本。本攻略保留诚实标注:从今天抓到的内容看,名字暗示"用 Rust 写"是不可证伪的虚标;如果你的目标是"找一份用 Rust 写 OBS",应当另寻项目。

§8 一句话推荐结论

一句话:OBS Studio 上游的独立 fork,配一套 merged-PR leaderboard,改 fork 不改语言——目的是给贡献者一个可被自动计数的"积分榜",不是"换 Rust 重写"。

适用:想要在 OBS Studio 圈内刷影响力分;想以"AI generated PR"路径低门槛进入 OBS 维护圈。

不适用:希望用 Rust 直接替换 OBS C/C++ 代码库——目前没有公开证据支持 repo 名暗示的"Rust rewrite";普通用户想录屏直播,仍建议用上游 stable release。

最大风险:license 合规(GPL-2.0 分发需保留 COPYING + 公开修改);leaderboard 评分规则仍按文字描述实运作,没看到 audit log;PR 评审权集中在少数维护者(tag @zackees 路径),对外部贡献者不友好——量力而行,别赌"合并即上榜"。