-
Notifications
You must be signed in to change notification settings - Fork 225
Workflows Streaming - Add transport via datachannel for guaranteed frame processing #1704
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
Open
balthazur
wants to merge
16
commits into
main
Choose a base branch
from
webrtc-transport-datachannel
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+214
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
|
Run a test with this small test script and the following terminal command (you need to reference a video on your machine): Command: Script: |
Contributor
Author
|
not ready yet |
Contributor
Author
|
bugbot run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new way of providing frames for our webrtc streaming implemention by creating a new datachannel where we can send extracted frames from a recorded video, and are guaranteed to have them all processed in the provided quality.
Update, implemented binary chunk streaming for frame ingestion and sending back data via the datachannel. both directions:
Corresponding app PR: https://github.com/roboflow/roboflow/pull/8537
Overview
Both directions (client → server and server → client) use the same binary chunking protocol with a 12-byte header followed by payload data. This ensures:
Binary Message Format
Header Fields:
Payload Types:
Type of change
Please delete options that are not relevant.
How has this change been tested, please provide a testcase or example of how you tested the change?
See comment below
Any specific deployment considerations
For example, documentation changes, usability, usage/costs, secrets, etc.
Docs
Note
Implements a binary chunked data-channel protocol for client→server frame ingestion and server→client responses, with a new
use_data_channel_framesmode enabling data-only processing without a media track.create_chunked_binary_message,parse_chunked_binary_message,ChunkReassembler,send_chunked_data(48KB chunks).send_chunked_data(replaces plain text.send).use_data_channel_framesflag inWebRTCWorkerRequestand processing classes.upstream_framesdata channel: reassemble JPEG chunks, decode with OpenCV, enqueue frames for processing.process_frames_data_only()when using data-channel frames and no video track.VideoFrameProcessor/VideoTransformTrackWithLoopacceptuse_data_channel_frames; manage internal frame queue and received frame IDs.data_outputandstream_outputadjustments via control channel.Written by Cursor Bugbot for commit d7e3295. This will update automatically on new commits. Configure here.