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

feat: add 'frame_delay' to stats #55

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rickstaa
Copy link
Collaborator

@rickstaa rickstaa commented Feb 7, 2025

This pull request adds the frame delay between the processing time and the expected presentation time to the /stats endpoints.

Current implementation

I calculate the delay between the expected presentation time and the processing time to get a metric for frame delay. This metric will be returned in the stats endpoint that was implemented in #48. It does not take the roundtrip time into account so it does not reflect full perceived latency. The response of the endpoitn will look like this:

{"913cf9e4-ab7d-4d4a-804f-5922793f5410": {"fps": 13.998930775037604, "frame_delay": 59.76668844101066}}

Important

Merge after #48.

This commit adds a new stream stats endpoint which can be used to retrieve the
fps metrics in a way that doesn't affect performance.
This commit ensures that the paths are also available under the `live`
prefix. This will allow consistency with the hosted experience and
improve the user experience.
@rickstaa rickstaa marked this pull request as draft February 7, 2025 15:41
This commit improves the naming of the parameters that are used in the fps
calculation to ensure they are more descriptive.
This commit ensures that the video stream reference is removed from the app's
`video_tracks` object when a stream ends, preventing potential memory leaks,
incorrect data and ensuring proper cleanup.
This commit adds the frame delay between the processing time and the
expected presentation time to the `/stats` endpoints.
@rickstaa rickstaa force-pushed the add_frame_delay_metric branch from b945133 to 0b4a297 Compare February 7, 2025 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant