Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Problem: DESCRIBE offers the host's DRC, DFC and GRC QP thresholds on the H.264/H.265 scale (0..=51, e.g. drc.upperQpThreshold 39). AV1 QP runs 0..=255, so the host's dynamic quality control sees every AV1 frame as badly over-quantized and steps quality down. Measured on v1.0.3 with save-bandwidth on (dynamicStreamingMode 1) at 3840x2160@120, 8-bit AV1 received 70-99 fps and 10-bit AV1 sessions ended with 0x800e8605 7-20 s after PLAY, a code PR OpenCloudGaming#1269 decodes as NVST_DISCONN_SERVER_VIDEO_PIPELINE_SCALE_FRAME_FAILED. Those runs sent chromaFormat:1, which dev's docs (OpenCloudGaming#1265) also tie to 0x800e8605, but that failure ends the session before the first frame; these ended mid-stream and only with the policy on. Cause: ANNOUNCE passes the H.26x-scale thresholds through. The official Linux client 2.0.89.141 rewrites 18 of these fields when the codec is AV1 and drc.upperQpThreshold is at most 49 ("Applying default AV1 QP settings" in libBifrost2.so). OpenNOW's legacy Electron and GStreamer paths sent these AV1 values; the Rust rewrite dropped them. Change: av1_qp_settings, called from negotiated_announce, applies the official values when ANNOUNCE carries vqos[0].bitStreamFormat:2 and the offered threshold is at most 49 or absent: headroom 20, lower 100, upper 200, an adaptive limit of 200 from 3440x1440 pixels and 180 below, qpCodecThresholdAdj 0, and five times each offered qpMaxResThresholdAdj with the official byte wrap. It logs av1-qp-settings applied=[...] or skipped. set_session_attributes replaces a line of the same name or inserts before t=. H.264/H.265 ANNOUNCE is unchanged. The streamer-comparison docs gain an "AV1 QP scale" section with provenance (BuildID, SHA-256, addresses), and their README now lists the binary analyses the set relies on. Verification: cargo fmt --check (streamer, --all); cargo clippy --locked --workspace --all-targets -- -D warnings (streamer); cargo test --locked -p opennow-streamer-core: 236 passed, 6 of them new; cargo test --locked --workspace (streamer): 1338 passed, 0 failed, 13 ignored. Not yet measured live on dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
91d291b to
37175f4
Compare
|
Rebased onto the latest The conflict came from #1306, which merged into
|
Problem
DESCRIBE offers the host's DRC, DFC and GRC QP thresholds on the H.264/H.265
scale (0..=51, e.g.
drc.upperQpThreshold39). AV1 QP runs 0..=255, so thehost's dynamic quality control sees every AV1 frame as badly over-quantized and
steps quality down. On a v1.0.3-based build with save-bandwidth on
(
dynamicStreamingMode1) at 3840×2160@120:0x800e86057–20 s after PLAY in every run. fix(core): send clientPhysicalResolution so seats capture 10-bit SDR at stream size #1269decodes it as
NVST_DISCONN_SERVER_VIDEO_PIPELINE_SCALE_FRAME_FAILED.Dev's docs (#1265) attribute
0x800e8605to the chroma enum, and these runssent
chromaFormat:1. That failure ends the session before the first frame;these ended mid-stream and only with the policy on. The chroma enum does not
explain them: dev sends
chromaFormat:0, and the same profile on a devnightly still ended with
0x800e860513 s after PLAY (see Verification).Cause
ANNOUNCE passes the H.26x-scale thresholds through. The official Linux client
(2.0.89.141) rewrites 18 of them when the codec is AV1 and
drc.upperQpThreshold≤ 49 ("Applying default AV1 QP settings" inlibBifrost2.so). The legacy ElectronnvstOffer.tsand GStreamersdp.rssent these values with a fixed 180 limit (#567, #451); the Rust rewrite dropped
them.
Change
av1_qp_settings(nvst_rtsp_negotiation.rs), called fromnegotiated_announce: forbitStreamFormat:2with an offered threshold ≤ 49or none, drc/dfc/grc get headroom 20, lower 100, upper 200, adaptive limit 200
from 3440×1440 pixels (else 180),
qpCodecThresholdAdj0, and 5 × eachoffered
qpMaxResThresholdAdjwith the official byte wrap. Logsav1-qp-settings applied=[...]orskipped.set_session_attributes: replace a line of the same name, else insertbefore
t=. fix(streamer): return the server's split-encode feature in ANNOUNCE #1306 adds the identical helper, so whichever of the twomerges second drops its copy in a trivial rebase.
docs/streamer-comparison/rtsp-negotiation.md(provenance: BuildID, SHA-256, addresses); the comparison README now lists
the binary analyses it relies on. No binary, log or pseudocode is committed.
H.264/H.265 ANNOUNCE is unchanged. Shared core: Linux, Windows and macOS.
Verification
Linux x86_64, cargo 1.99.0:
cargo fmt --manifest-path native/opennow-streamer/Cargo.toml --all -- --check: cleancargo clippy --locked --manifest-path native/opennow-streamer/Cargo.toml --workspace --all-targets -- -D warnings: cleancargo test --locked --manifest-path native/opennow-streamer/Cargo.toml -p opennow-streamer-core: 236 passed (6 new)cargo test --locked --manifest-path native/opennow-streamer/Cargo.toml --workspace: 1338 passed, 0 failed, 13 ignoredWith this change on v1.0.3, the 10-bit profile ran three sessions (120, 150,
180 s) at 120 fps without termination, and 8-bit held 120 fps from 20 s on.
On dev (10-bit AV1,
chromaFormat:0, save-bandwidth on, 3840×2160@120, sameday and zone), one session per arm:
0x800e860513 s after PLAY.libopennow_streamer_ffi.sobuilt from thisbranch (dev 0467152 + this commit) ran 120 s without termination, logging
av1-qp-settings applied=[...]. It received 920–932 frames per 10 s from20 s on, the separate 4K split-encode cap this change does not touch.
Not verified
dynamicStreamingMode2, a congested link, Windows/macOS clients.video[0].minQp25 on AV1 andchanges encoder preset and split-encode settings by resolution level.
Related
#1265 #1269 #1289 #1166 #1003 #567 #451
🤖 Generated with Claude Code