Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: GetStreamStatus: outputDuration is higher than expected with Enhanced Broadcasting enabled #1234

Open
cjmaxik opened this issue Jun 20, 2024 · 2 comments

Comments

@cjmaxik
Copy link

cjmaxik commented Jun 20, 2024

Operating System Info

Windows 11

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

30.2.0-beta4

obs-websocket Version

5.1.0

OBS Studio Log URL

https://obsproject.com/logs/iy9DaINiISXI44EM

OBS Studio Crash Log URL

No response

Expected Behavior

When Enhanced Broadcasting enabled, outputDuration field in GetStreamStatus output request must represent the current duration in milliseconds for the output.

Current Behavior

The current duration in milliseconds for the output is multiplied by the number of video tracks set by Enhanced Broadcasting. The actual multiplication factor is unknown when "Maximum Video Tracks" option is set to Auto.

Steps to Reproduce

  1. Enable "Enable Enhanced Broadcasting" option in "Stream" tab
  2. Start streaming
  3. Observe the GetStreamStatus output request

Anything else we should know?

No response

@Yelnats321
Copy link

Reproduced on Windows 10, OBS 30.2.2.

@cjmaxik
Copy link
Author

cjmaxik commented Oct 19, 2024

obs-websocket calculated the stream duration by multiplying the amount of produced frames to the frame time (see https://github.com/obsproject/obs-websocket/blob/master/src/utils/Obs_NumberHelper.cpp#L26).

When using the Enhanced Broadcasting feature, it calculates that amount for ALL the streams. By default, there are 5 streams in total, 2 of which run at 60.03 FPS, and 3 of which run at 30.02 FPS (on average). Given that 60.03 FPS gives us 1 second of runtime on our scale, 30.02 FPS gives us 0.5000832917 seconds of runtime on our scale. So, 1 + 1 + 0.5000832917 + 0.5000832917 + 0.5000832917 = 3.5002498751 seconds. So, the difference is around 3.5 seconds per each second of the stream. It heavily depends on the frame time, so that's not the constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants