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

Inaccurate keyframe interval, fps metrics when querying stream info over API #1445

Closed
hernanrz opened this issue Nov 16, 2023 · 8 comments
Closed
Assignees
Labels
improvement Suggested change or modification to enhance user experience resolved Fixed and confirmed

Comments

@hernanrz
Copy link

Describe the bug
When querying a stream info (api endpoint: v1/vhosts/default/apps/live/streams/<stream>), the server reports strange values for keyframe interval and fps (fractional values)

image
while querying the same stream but in the origin server returns correct FPS values, although the keyframe value reported is definitely different from the one set in OBS

image

OME origin/edge Config https://gist.github.com/hernanrz/87fb0ff693cbd91ff50c3f6be1436a58

Version: OvenMediaEngine v0.16.0 ((From archive)) running with docker image airensoft/ovenmediaengine@sha256:167de56e8b6600e0f459038780fff17659d7f835a3464834c20403b1e694564e

@getroot getroot self-assigned this Nov 20, 2023
@getroot
Copy link
Sponsor Member

getroot commented Nov 20, 2023

This is the difference between the config value and the measured value. In the API, the origin responds with setting values, and the edge responds with actual measured values.
To eliminate this confusion, I will output config values and measured values separately in the API response.

@getroot getroot added the improvement Suggested change or modification to enhance user experience label Nov 20, 2023
@hernanrz
Copy link
Author

That sounds like a reasonable solution, thank you 👍

Copy link

stale bot commented Jan 20, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 20, 2024
@stale stale bot closed this as completed Jan 27, 2024
@getroot getroot removed the stale label Apr 30, 2024
@getroot getroot reopened this Apr 30, 2024
@getroot
Copy link
Sponsor Member

getroot commented May 17, 2024

@hernanrz

I added the following information to the GET Stream API: It has been committed to the master branch and will be available from the next release.

bitrate_conf
bitrate_measured
framerate_conf
framerate_measured
keyFrameInterval_conf
keyFrameInterval_measured

Sorry I'm so late!

@getroot getroot added the resolved Fixed and confirmed label May 17, 2024
@getroot
Copy link
Sponsor Member

getroot commented May 17, 2024

I updated this to this:

bitrateLatest is the value measured in the most recent second.
framerateLatest is the value measured in the most recent second.
keyFrameIntervalLatest is the number of delta frames between the immediately previous keyframe and the keyframe before it.

~Avg is the overall average.

deltaFramesSinceLastKeyFrame is the number of delta frames counted from the last keyframe.

"bitrate": "1000000",
"bitrateAvg": "1015679",
"bitrateConf": "1000000",
"bitrateLatest": "1094189",

"framerate": 30.0,
"framerateAvg": 30.022541046142578,
"framerateConf": 30.0,
"framerateLatest": 29.721956253051758,

"keyFrameInterval": 28,
"keyFrameIntervalAvg": 28.619047164916992,
"keyFrameIntervalConf": 0.0,
"keyFrameIntervalLatest": 30,
"deltaFramesSinceLastKeyFrame": 25,

@naanlizard
Copy link

I was going to suggest not changing the old names, this is a good update thank you!

@getroot
Copy link
Sponsor Member

getroot commented May 17, 2024

@bchah I thought you said you needed this too, right?

@bchah
Copy link
Sponsor Collaborator

bchah commented May 17, 2024

@getroot yes, thank you! I saw the commits and am excited to incorporate this in the next release. It gives users a way to see their "current" frame and bit rates. Great work and thank you very much :)

@getroot getroot closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Suggested change or modification to enhance user experience resolved Fixed and confirmed
Projects
None yet
Development

No branches or pull requests

4 participants