Skip to content

feat(media): add 256/320 kbps screen audio presets - #462

Open
fovepig wants to merge 1 commit into
TNTcraftHIM:mainfrom
fovepig:feat/audio-256-320-presets
Open

fovepig wants to merge 1 commit into
TNTcraftHIM:mainfrom
fovepig:feat/audio-256-320-presets

Conversation

@fovepig

@fovepig fovepig commented Oct 7, 2026

Copy link
Copy Markdown

Problem and outcome / 问题与结果

屏幕共享音频档位自 #165 起为 64/128/192 kbps(普通/音乐/保真),且接收端协商封顶同为 192 kbps —— 选择更高音质也无法生效,因为接收侧的 maxaveragebitrate 封顶会把发送端压回 192 kbps。对音乐、演奏等对高频细节敏感的场景,该上限过紧。

本 PR 保持原三档不变,新增两个更高档位,并把接收端封顶同步提升:

  • 超保真 / Ultra:256 kbps
  • 录音室 / Master:320 kbps

各端保持一致:Web 档位表与协商封顶、服务端质量设置校验、桌面端原生采集映射与码率白名单、媒体边的 Opus 接收参数。

Release notes

中文

本次更新为音频质量提升:在「普通 / 音乐 / 保真」之外新增「超保真」(256 kbps)与「录音室」(320 kbps)两档,适合音乐、演出等对音质要求更高的分享场景。

  • 发送端码率上限与接收端协商封顶同步提升到 320 kbps,选择新档位不再被 192 kbps 限制。
  • 服务端校验、桌面原生采集与媒体边同步支持新档位,各端行为一致。
  • 网页端随站点更新自动生效;无需其他升级操作。

English

This is an audio quality update: two higher tiers join Standard / Music / Studio — "Ultra" (256 kbps) and "Master" (320 kbps) — for music and performance-style shares.

  • The sender ceiling and the receiver-negotiated cap rise to 320 kbps together, so the new tiers are no longer clamped at 192 kbps.
  • Server validation, native desktop capture and the media edge accept the new tiers, keeping every surface consistent.
  • The web UI picks it up with the site update; no further upgrade steps.

Verification / 验证

  • npm run typecheck — passed
  • npx vitest run — 1379 passed / 0 failed(含针对 320 kbps 封顶更新的 SDP 与 peer-generation 断言)
  • go test ./internal/server/protocol/ ./internal/app/nativecontrol/ ./internal/app/nativehost/ ./internal/app/mediaedge/ — passed
  • 同一提交在 fork 的完整流水线上通过:validate(Go core、race、typecheck + tests)及全部打包(服务器容器 amd64 + arm64、五个平台 App 候选)。
  • 未验证:真实多端、物理设备上的主观听感对比(本 fork 无此环境)。

Impact / 影响

  • 兼容性:枚举扩展 + 数值上限提升,无破坏性变更。网页端与服务器同源发布;旧版桌面 App 遇到新档位会按其既有校验拒绝该配置(原有行为),建议 App 与站点版本保持同步。
  • 发布流程:无中断或恢复要求;新档位随下个常规版本发布,无强制升级动作。
  • 文档影响:无。

(沿革:本 PR 扩展 #165 引入的档位阶梯。)

## Release notes

### 中文
- 新增「超保真」(256 kbps)与「录音室」(320 kbps)两个音频档位;发送上限与接收封顶同步提升至 320 kbps。

### English
- Add "Ultra" (256 kbps) and "Master" (320 kbps) audio presets; the send ceiling and the receiver cap are raised to 320 kbps.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant