-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add webrtc support #7
Comments
Notes here: |
Initial webrtc support should use the simplest/easiest approach first:
|
Use adapter.js to hide browser quirks: |
Possible alternative to gstreamer: |
SSL issues: |
Create simple p2p model initially as an output module of visiond, with a simple signalling server based on concepts here: |
latency hints: centricular/gstwebrtc-demos#102 (comment) |
Having a data channel in parallel with video would be useful for HUD overlays client side / other metadata https://github.com/aiortc/aiortc/tree/master/examples/server Note all the aiortc stuff uses opencv. It would be interesting to know if we could plug the gstreamer pipeline into aiortc as a data source. |
So I've been thinking about this for a while (HUD overlays). The problem with doing the overlays server (CC) side is:
So the HUD mode of maverick-web was always intended to overlay on top of FPV. It uses hardware accelerated vector drawing libraries within the client/user browser to draw the overlays, which is generally much faster, prettier, and much more flexible. The downside is going to be coordinating the correct data in time with the video - either we do this through timestamps, or more likely to start with we just add a configurable delay into the -web config. Web browsers are the single most mature, advanced, developed piece of software on the desktop these days and are such a rich development environment, we should take advantage of what they have to offer, imo, and do as much as we can in them. |
Yeah that's where my thinking was going. We could embed a minimal amount of data in the webrtc stream and pull it out to help draw the HUD. Really we could do away with most of the metadata, but leave in some sort of timestamp metadata. The timestamp can be used to sync the video to a seperate mavlink stream. |
Hmm where should we put/look for the certs, and should we autogenerate them if they don't exist? |
We can set the path in the configuration, but if not found they should be automatically generated imo. Not fussed re path, perhaps near the config file? |
what is the plan for authentication in general? anything else requiring certs up the stack? and can certs be used more globally as required? |
There's already a basic SSL setup in Maverick - it creates a CA in ~/data/security/ssl, then various services (ldap, web) create extra certs as required. There's a disabled webpage in -web-legacy that checks if the user browser has the self-signed cert installed and if not prompts on how to install it. It needs consolidating and tidying up, documenting and presenting to the user properly. For maverick, I'll add an exec in the visiond manifest that generates the certs and bungs them in ~/data/security/ssl/visiond, and alter the visiond.conf (specific to maverick) to point to there. For standalone visiond we can provide instructions in the readme. |
Need to limit the number of times this retries - at the moment if there is a fault starting up the signalling server this just retries forever. |
Major bug in gstreamer/python means visiond won't support send-only webrtc streaming on raspberry/tegra which provide somewhat proprietary versions of gstreamer 1.14: In the short term, we'll have to look at aiortc or janus or something similar as an alternative to get us going. All other platforms we custom compile the latest gstreamer so we can continue long-term work to get this working with visiond. |
No description provided.
The text was updated successfully, but these errors were encountered: