Repository navigation
fix(streamer): return the server's split-encode feature in ANNOUNCE - #1306
Merged
Merged
Conversation
Problem: at 3840x2160@120 the host sends a steady ~10.4 ms frame cadence (about 96 fps), while 2560x1440@120 on the same machine, account, zone and title gets 120 fps. Codec, bitrate cap, Cloud G-SYNC, L4S, save-bandwidth and 10-bit color do not change the 4K rate. Cause: DESCRIBE answers `main ;; features || upstream`, and the `;;` section is separately signed (o=NvStreamer, k=HMAC:). ANNOUNCE never returns its video[0].videoSplitEncodeStripsPerFrame. v1.0.0 and v1.0.1 sent a fixed 64 there; OpenCloudGaming#1025 removed it as an invented value. Change: negotiated_announce calls forward_server_features, which returns exactly one allowlisted key, video[0].videoSplitEncodeStripsPerFrame, with the server's own `;;` value. Main-section and `||` values are never returned, nothing is sent when `;;` lacks the key, and a value that is not an unsigned integer is dropped with ignored-server-offer. The line replaces a same-name client line or goes before t= (set_session_attributes), and the transport logs server-features returned=[...]. The key stays out of SERVER_NEGOTIATED, whose equal-value suppression would drop a value that always equals the signed offer. This is not an echo of the feature section; other feature attributes stay withheld. Verification: cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, and cargo test pass (opennow-streamer-core: 236 passed; workspace: 1338 passed). The no-echo test keeps its assertions and adds main-section-only, signed `;;` and `||` cases; it fails if the key joins SERVER_NEGOTIATED. Six negotiation tests cover `;;`-only parsing, placement, replacement, withheld and credential keys, a missing section, and value validation. Live A/B on a v1.0.3-based build at 3840x2160@120: 18 sessions without the attribute at <=97 fps, 12 with it at 119-120 fps (H.265 10-bit, AV1 8/10-bit); returning only framePacing.pid.minTargetFrameTimeUs instead stayed at 96 fps. Not yet repeated on dev. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
At 3840×2160 @ 120 the host sends a steady ~10.4 ms frame cadence (about 96 fps). 2560×1440 @ 120 on the same machine, account, zone and title gets 120 fps. Codec, bitrate cap, Cloud G-SYNC, L4S, save-bandwidth and 10-bit color did not change the 4K rate.
Cause
DESCRIBE answers
main ;; features || upstream, and the;;section is separately signed (o=NvStreamer,k=HMAC:). ANNOUNCE never returns itsvideo[0].videoSplitEncodeStripsPerFrame. v1.0.0 and v1.0.1 sent a fixed 64 there; #1025 removed it as an invented value. The A/B below shows that the 4K rate depends on ANNOUNCE carrying the server's value. It does not show how the host uses the value.Change
forward_server_features, at the end ofnegotiated_announce, returns exactly one allowlisted key,video[0].videoSplitEncodeStripsPerFrame, with the server's own;;value. Nothing is invented: main-section and||values are never returned, nothing is sent when;;lacks the key, and a value that is not an unsigned integer is dropped withignored-server-offer.t=(set_session_attributes). The transport logsserver-features returned=[name=value], never SDP or credentials. fix(streamer): put dynamic quality thresholds on the AV1 QP scale #1305 adds the identical helper, so whichever of the two merges second drops its copy in a trivial rebase.SERVER_NEGOTIATED. Its equal-value suppression (fix(streamer): honor RTSP offer values and authenticate before PLAY #1168) runs afternegotiated_announceand would drop a value that always equals the signed offer.docs/streamer-comparison/rtsp-negotiation.md.This does not claim that the official client echoes the feature block; #1166 shows its ANNOUNCE is a difference against the offer. Supporting evidence only: v1.0.0/1.0.1 sent 64, 72befd0 labelled 64 part of the "Official macOS ANNOUNCE baseline", and the wire capture in closed #1289 shows feature-block QoS values in an official ANNOUNCE.
Verification
Streamer workspace, Steam Runtime 4 SDK container:
cargo fmt --all -- --check: clean.cargo clippy --locked --workspace --all-targets -- -D warnings: clean.cargo test --locked -p opennow-streamer-core: 236 passed, 0 failed.--workspace: 1,338 passed, 0 failed, 13 ignored.announce_does_not_echo_server_config_or_invent_server_owned_valueskeeps its assertions and adds cases: a main-section-only offer stays absent; a;;offer is returned once, with the server's value, beforet=; the||value is never used; the other server-owned keys stay absent even when signed beside it.;;-only parsing, placement, replacement, withheld and credential keys, no features section, last value wins and must be an unsigned integer.SERVER_NEGOTIATED, reading the main section, dropping validation, or unwiring the call each fails a test.Live, on a v1.0.3-based Linux build (Fedora 44, KDE Wayland, RTX 3080 Ti, Ultimate, us-texas, SUPERHOT; fps from
nvst-video frames=deltas), 3840×2160 @ 120:framePacing.pid.minTargetFrameTimeUs=7936stayed at 96 fps.On dev, same day, zone and settings (AV1 10-bit 4:2:0,
chromaFormat:0, save-bandwidth off), one session per arm:libopennow_streamer_ffi.sobuilt from this branch (dev 0467152 + this commit), 1,193–1,208 frames per 10 s (median 1,200) for 60 s.Not verified
Related
#1025 #1168 #981 #1166 #1289
🤖 Generated with Claude Code