Skip to content

bug: obs-websocket: GetStats reports 0 / 0 output frames while a recording uses Rescale Output (follow-up of #337) #514

Closed
obs-rust/obs-websocket
#4

Description

@rdoupe

Follow-up of our #337, which fixed OBS's Stats dock and status bar for encoders that rescale the output (upstream obsproject/obs-studio#11078) and listed obs-websocket's GetStats under "Not tested" as a later follow-up. GetStats still reports outputSkippedFrames / outputTotalFrames = 0 / 0 while a recording with Rescale Output runs, so stream-deck, bot and overlay users who watch encoder lag over obs-websocket get no warning, which is the same blind spot #337 fixed in the UI.

Location

  • plugins/obs-websocket src/utils/Obs_ObjectHelper.cpp, Utils::Obs::ObjectHelper::GetStats(): outputSkippedFrames and outputTotalFrames come from video_output_get_skipped_frames(obs_get_video()) and video_output_get_total_frames(obs_get_video()).
  • obs_get_video() is the main video mix. An encoder that rescales the output (Settings > Output > Recording > Rescale Output) encodes from a video mix of its own, so while only such an encoder runs, the main mix counts nothing.
  • libobs, frontend: Count encoding lag of encoders that rescale the output #337 added obs_get_video_frame_counts() to libobs. It counts the main mix plus each rescaling encoder's mix, once each, and the Stats dock and status bar use it. GetStats doesn't use it yet.

The counters on obs_get_video() aren't wrong for their other callers (they describe that mix), so the fix belongs in GetStats and not in libobs. plugins/obs-websocket points at the project fork, obs-rust/obs-websocket (since #477).

Class

Wrong value reported (no crash).

How it is reached

Settings > Output > Advanced > Recording: Rescale Output on (any size), start recording, then call obs-websocket GetStats.

Reproduced in the current release

AppImage 33.0.0-beta6-799-gd711a972c, headless (private Xvfb, software GL), with an Advanced output profile recording x264 at 640x360 from a 1280x720 canvas (Rescale Output, bilinear). StartRecord, wait 3 s, GetStats: outputSkippedFrames / outputTotalFrames = 0 / 0 in 3 of 3 runs, while the recording runs and writes 640x360 frames. The release check saw the same under load: 0 / 0 while OBS's Stats dock showed 25 / 94 skipped / total; without Rescale Output the same load gave 2 / 71.

Proposed fix and failing test

Fix (obs-rust/obs-websocket, 3 lines): GetStats takes both values from obs_get_video_frame_counts(). Then a submodule bump here.

RED test: a new phase in the Tier 4 obs-websocket suite (test/websocket-tier4/run_tier4.py). It starts OBS on that rescaled-recording profile, records for 3 s and checks that GetStats counts the frames. It fails today with 0 / 0, in both libobs lanes.

Activity

  1. rdoupe commented on Oct 13, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: this issue.

    1. RED: a "stats with Rescale Output" phase in the Tier 4 obs-websocket suite records at 640x360 from a 1280x720 canvas and checks that GetStats counts the frames. Today it reports 0 / 0.
    2. GREEN: obs-rust/obs-websocket's GetStats takes its output frame counts from obs_get_video_frame_counts() (libobs, frontend: Count encoding lag of encoders that rescale the output #337), and the submodule is bumped here.
      PR today.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions