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

Custom video frame processing #530

Merged
merged 12 commits into from
Jan 12, 2025
Merged

Conversation

hiroshihorie
Copy link
Member

No description provided.

@bcherry bcherry self-requested a review December 17, 2024 07:26
@hiroshihorie hiroshihorie marked this pull request as ready for review December 17, 2024 07:35
Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

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

This looks pretty simple which is great. is there any particular reason why the interface can't be on track instead of on capturer? that would more cleanly match how we do it on the other sdks

@hiroshihorie
Copy link
Member Author

@bcherry Good point, will check other SDK interface and try to align 🙂

@hiroshihorie
Copy link
Member Author

@bcherry createCameraTrack(processor:) is available now and also exposed LocalVideoTrack.processor property.
I wonder if I should add auto-frame dropping if processing frame hasn't completed 🤔

Copy link
Contributor

@bcherry bcherry left a comment

Choose a reason for hiding this comment

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

thank you! lgtm.

What is the behavior if you do fail to process frames fast enough? It does sound like dropping frames would be the right behavior if we're still processing older ones. we'd want to have the same behavior across every SDK - does JS do anything like this @lukasIO ?

@lukasIO
Copy link
Contributor

lukasIO commented Jan 2, 2025

there's no timeout for frame processing in the JS processors we provide.
The functionality is not tied to the client SDK, but rather implemented in the processors themselves, so the behaviour might differ across (custom) processor implementations.

@bcherry
Copy link
Contributor

bcherry commented Jan 2, 2025

if your input video is coming from the camera at 30fps but your processor takes longer than 1/30th of a second to process each frame, what will the users experience? It seems like we should do something here at the framework level to guide users into a happy path that just works?

@hiroshihorie hiroshihorie merged commit e5efe56 into main Jan 12, 2025
12 checks passed
@hiroshihorie hiroshihorie deleted the hiroshi/custom-video-frame-processing branch January 12, 2025 16:46
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.

3 participants