Skip to content

UI: Add graphs for Stats dock#9190

Closed
pkviet wants to merge 7 commits into
obsproject:masterfrom
pkviet:statsgraphs
Closed

UI: Add graphs for Stats dock#9190
pkviet wants to merge 7 commits into
obsproject:masterfrom
pkviet:statsgraphs

Conversation

@pkviet
Copy link
Copy Markdown
Member

@pkviet pkviet commented Jul 1, 2023

Description

This adds in the Stats dock a graph plotting bitrate over time as well as dropped frames.
This allows better monitoring of network issues.

Dynamic bitrate was triggered in the next screenshot, and after the congestion ended, one can see clearly the bitrate increasing.

In the next screenshot, one can see dropped frames (when dynamic bitrate is disabled).

The graph can be zoomed in and zoomed out with the mouse.
There's a tooltip explaining it.

The time span for the horizontal time axis can be adjusted.

NOTE: the last commit should be dropped eventually. Since the PR requires QCharts, that commit pulls binaries from a a companion obs-deps PR [1] generated from CI in my obs-deps fork.
[1] obsproject/obs-deps#192

Motivation and Context

Allow better monitoring of the stream.
On default the graph displays the last minute of data but this can be expanded to 4 hrs. This allows an analysis of network conditions on both short medium and long time scales.

How Has This Been Tested?

See screenshots.
I simulated network issues using 'clumsy', allowing to test both dynamic bitrate & frame dropping.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@sebastian-s-beckmann sebastian-s-beckmann added the area/ui-ux Anything to do with changes or additions to UI/UX elements. label Jul 1, 2023
@alinsavix

This comment was marked as abuse.

@WizardCM WizardCM added the kind/feature Functionality or other elements that the project doesn't currently have. label Jul 1, 2023
@pkviet pkviet force-pushed the statsgraphs branch 4 times, most recently from c4faa1e to 54d82f4 Compare July 2, 2023 17:23
@pkviet pkviet added the Seeking Testers Build artifacts on CI label Jul 3, 2023
@pkviet
Copy link
Copy Markdown
Member Author

pkviet commented Jul 3, 2023

Update
Added a show / hide button.

obs64_2023-07-03_10-09-52

I plan to move the graphs to a separate tab in the Stats dock.

@alinsavix 👋 hi it's been a while !
i can add the frames missed due to rendering lag / skipped frames due to encoding lag.
But I need to check what would be the useful format:

  • percentage,
  • raw number,
  • raw number per second
    This impacts whether all the data can be displayed in the same graph.
    I'll probably go with the last format.

@alinsavix

This comment was marked as abuse.

@pkviet
Copy link
Copy Markdown
Member Author

pkviet commented Jul 4, 2023

Ok i'll go with raw per sec.
As to the case of large number of datapoints higher than the pixel number, there's no way in qt to customize that. Qtcharts makes its own sauce to adjust what's displayed.

@alinsavix

This comment was marked as abuse.

Comment thread UI/data/locale/en-US.ini
Basic.Stats.Bitrate.kbps="Bitrate (kbps)"
Basic.Stats.Graphs="Live Graphs (Bitrate & Dropped Frames)"
Basic.Stats.Graph.Tooltip="zoom out: right-click.\n zoom in: select a vertical span."
Basic.Stats.Graphs.Show.Hide="Show / Hide Graphs."
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Basic.Stats.Graphs.Show.Hide="Show / Hide Graphs."
Basic.Stats.Graphs.Show.Hide="Toggle Graphs"

@derrod
Copy link
Copy Markdown
Member

derrod commented Jul 8, 2023

Perhaps rather than hiding/unhiding the graphs they could just be a separate dock entirely?

@pkviet
Copy link
Copy Markdown
Member Author

pkviet commented Jul 9, 2023

Perhaps rather than hiding/unhiding the graphs they could just be a separate dock entirely?

I can certainly do that.
I'm waiting for more instructions from @Warchamp7 and @GeorgesStavracas and ui/ix discussions. Mockups are planned by George.
Warchamp suggested tabs. Also he wanted output specific stats (ex SRT) in these tabs. And the possibility to expand to other outputs (whip? MoQ? Rist ?)
I'm planning to implement these suggestions.

@pkviet pkviet force-pushed the statsgraphs branch 4 times, most recently from b769a2b to 9dd67d4 Compare December 24, 2023 21:51
This splits the ffmpeg mpegts muxer output from obs-ffmpeg project.
There's some common code between obs-ffmpeg-output.c &
obs-ffmpeg-mpegts.c.
But most of it had already been factored out to allow for easier
maintainance and readability.
The goal is to allow simpler maintainance of the mpegts output.

Signed-off-by: pkv <pkv@obsproject.com>
This adds a proc handler for statistics for SRT protocol.

Signed-off-by: pkv <pkv@obsproject.com>
This copies QtCharts.dll as well as QtOpenGL.dll & QtOpenGLWidgets.dll
on which it depends.

Signed-off-by: pkv <pkv@obsproject.com>
This adds a new SRT Stats dock with several important statistics for the
SRT protocol (RTT, retransmitted packets, dropped packets) in a chart
which is updated live.

Signed-off-by: pkv <pkv@obsproject.com>
This is to ensure test builds are working.
This commit should be removed on merging of the PR.

Signed-off-by: pkv <pkv@obsproject.com>
This plots the bitrate over time and dropped frames.
The time span is selectable.

Signed-off-by: pkv <pkv@obsproject.com>
This adds QtCharts in CI for the linux script installing deps.

Signed-off-by: pkv <pkv@obsproject.com>
@Warchamp7
Copy link
Copy Markdown
Member

Closing old PRs that require a rebase for the big frontend reorganization we did. Feel free to rebase and re-open a new pull request for this if you would still be interested in this functionality.

Please note this does not necessarily mean the change itself will be accepted. Review and consideration will happen if it's re-opened.

@Warchamp7 Warchamp7 closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ui-ux Anything to do with changes or additions to UI/UX elements. kind/feature Functionality or other elements that the project doesn't currently have. Seeking Testers Build artifacts on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants