Repository navigation
test: Cover GetStats output frames with Rescale Output in Tier 4 - #751
Merged
Merged
Conversation
obs-rust#337 made OBS's Stats dock and status bar count the frames of encoders that rescale the output (Rescale Output), which encode from a video mix of their own. obs-websocket's GetStats still read obs_get_video(), the main mix, so while only a rescaled recording ran it reported outputSkippedFrames / outputTotalFrames = 0 / 0. obs-rust/obs-websocket#4 takes both values from obs_get_video_frame_counts(), like the Stats dock. That fix already shipped with the submodule pin to 547f5ea; this adds the regression test. Add a Tier 4 phase: the suite can now start OBS on a profile written before launch, and "stats with Rescale Output" records at 640x360 from a 1280x720 canvas for 3 seconds and checks that GetStats counts the frames. It retries StartRecord while the server answers 207 (NotReady) during frontend startup. OBS is now started with --multi, so another OBS on the same machine does not hold it at the single-instance dialog. The phase fails with 0 / 0 with the submodule at caf0527, the fork commit before obs-rust#4 was merged, and passes at 547f5ea. Refs obs-rust#514. Co-Authored-By: Claude Opus 5.5 <[email protected]> Local-Gate: v1 tree=2586eb5231297f7e5ac0663ab8afd50d7755feea secs=528 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1792004952,"gate":"rust/all/fmt","host":"linux-x86_64","key":"fb9af536766902129ece46b231d51d356c88cd44b7a4ae4278693b9589973c1d","lane":"lint","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":53,"stamp":"522c5232d38c5379b2dbdf95d6745ae5","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"fb9af536766902129ece46b231d51d356c88cd44b7a4ae4278693b9589973c1d","lane":"lint","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":53,"stamp":"f72e64d0d7ce082ae99190cd946305de","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"f82a96a3ebf8185e9afc6a6936d54c407534dcd196aae1a51d822fd4982f8c3f","lane":"rust-test","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":121,"stamp":"211b88942d2ba50ac8803d0a66ddb031","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"d479cf2a3ac23b07a86c528e60bee7f4","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"a48f50b7437a052e74e2aa246a68bc7a","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"2b3f87af06084f79f56949749d6f7c82","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"c5a41a7056c65e335124d197bda80fd4","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"f85c003f8e3ecc00d28d7870ed9b8e24","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"525209b94219c953eac4c0a7dc73aa9c42c3767378810ea5160b1b49650d3bfa","lane":"cross","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":109,"stamp":"89a7bf52adb3b008dd2dd6eeb5cfdb92","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"} Ci-Attestation: {"at":1792004952,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"c0c4ea416ea70ee6dcb2acee436be364dea927882183c8c32e588e15bab63775","lane":"tier2-linux","parents":["d9328f4c24bb4ceb49c67e3abb0cd4d74b453f2e"],"secs":244,"stamp":"9c59ada4512d7f5b22fc44fe799716d9","tree":"2586eb5231297f7e5ac0663ab8afd50d7755feea","v":1,"via":"run"}
Member
|
Rebased onto master and ran the stamped local gate. Your RED (caf0527: outputTotalFrames=0 with a rescaled recording) / GREEN evidence above stands.
|
zackees
force-pushed
the
fix/getstats-rescale-bump
branch
from
October 14, 2026 19:09
b1a58f8 to
3b564f8
Compare
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.
Description
Adds a regression test for obs-websocket's
GetStatsoutput frame counts with Rescale Output. The fix itself, obs-rust/obs-websocket#4 (utils: Count rescaled encoders in GetStats output frames), already landed in master with the submodule pin to 547f5ea and shipped in v0.1.0-beta.20261014. This PR does not touch the submodule; it only adds the test.The bug: while a recording with Rescale Output ran,
GetStatsreportedoutputSkippedFrames/outputTotalFrames= 0 / 0, the same blind spot #337 fixed in OBS's Stats dock and status bar.GetStatsread both values fromobs_get_video(), the main video mix. A rescaling encoder encodes from a mix of its own, so the main mix counts nothing while only that encoder runs. The fork fix takes both values fromobs_get_video_frame_counts(), which libobs, frontend: Count encoding lag of encoders that rescale the output #337 added and the Stats dock already uses.The test is in
test/websocket-tier4/run_tier4.py: the suite can now start OBS on a profile written before launch. A new phase, "stats with Rescale Output", starts OBS on an Advanced output profile that records x264 at 640x360 from a 1280x720 canvas (Rescale Output, bilinear), records for 3 s and checks thatGetStatscounts the frames, then stops the recording and lets it finish before OBS exits. It retriesStartRecordwhile the server answers 207 (NotReady) during frontend startup, as the auth phase already does forGetVersion. The suite also starts OBS with--multinow, so another OBS on the same machine can't hold it at the single-instance dialog. The wait for the previous OBS to release the port is now a helper, used before both later phases.Motivation and Context
Refs #514.
This is a follow-up of our #337 (upstream obsproject/obs-studio#11078). #337 fixed Stats and the status bar and listed
GetStatsunder "Not tested"; the fork fix closed that gap, and this PR adds the test that was missing for it.Why this one: stream-deck, bot and overlay users who watch encoder lag over obs-websocket get no warning if this regresses, and nothing else in the repo exercises
GetStatswith Rescale Output.How Has This Been Tested?
On top of current master, in both libobs lanes (
ENABLE_RUST_LIBOBSOFF and ON), with OBS built with the frontend and obs-websocket, Tier 4 suite (test/websocket-tier4/run_tier4.py --obs <build>/rundir/RelWithDebInfo/bin/<obs binary>, websockets 13.1):stats:outputTotalFrames counts a rescaled recordingfails withrecording active=True outputSkippedFrames=0 outputTotalFrames=0, in both lanes. caf0527 predates the fork'sImageFormat.hinclude fix, so for this run only the plugin carried that one-line include on top; without it the plugin does not compile in a build with the frontend.stats:rescaled recording starts,stats:outputTotalFrames counts a rescaled recording,stats:outputSkippedFrames <= outputTotalFrames). The other failure isreq:GetVirtualCamStatus(604, "VirtualCam is not available."): this machine has no v4l2loopback device, and it fails the same before and after. 147 of 147 documented request types exercised.open_crashes_without_obs_coreand master'stest_startup_alloc_stable/test_startup_cycle_stress, which skip here under the nested Xvfb harness and are not touched by this PR.Not tested:
run_tier4.py), so CI won't exercise the new phase; the runs above are the evidence.Types of changes
Checklist:
🤖 Generated with Claude Code