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

Add MediaStream support to WebRTC for real-time video streaming #2553

Open
theomonnom opened this issue Apr 5, 2021 · 3 comments
Open

Add MediaStream support to WebRTC for real-time video streaming #2553

theomonnom opened this issue Apr 5, 2021 · 3 comments

Comments

@theomonnom
Copy link

theomonnom commented Apr 5, 2021

Describe the project you are working on

A real-time webcam feed with WebRTC

Describe the problem or limitation you are having in your project

Godot's WebRTC implementation does not support MediaStream.
There is already a proposal to implement mediastream for voice communications but not for video streams

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add support for MediaStream to the WebRTC implementation.
Something that would send encoded video data from WebRTC and then be able to decode it

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Maybe use the existing CameraServer class and encode/decode the video streams in VP8 (Not VP9 since it consumes more CPU and is therefore a bad idea for real time on not very powerful devices, neither H264 because it is patented).
The implementation of video streams should be similar to what Faless mentioned in this issue about adding voice communications:
A class should be added to the core and the implementations of the JS and GDNative interfaces in the webrtc module

If this enhancement will not be used often, can it be worked around with a few lines of script?

I don't think so

Is there a reason why this should be core and not an add-on in the asset library?

I don't think it's possible without modifying the core

@theomonnom theomonnom changed the title Add Mediastream support for WebRTC for real-time video streaming Add MediaStream support to WebRTC for real-time video streaming Apr 5, 2021
@Calinou
Copy link
Member

Calinou commented Apr 5, 2021

We have a lot of issues with video playback and WebM decoding currently, so this will have to wait until video decoding is moved to GDNative for 4.0 or later.

@mattkanwisher
Copy link

Now that GD 4 is in beta does that mean the videoplayer is now native ?

@Calinou
Copy link
Member

Calinou commented Oct 26, 2022

Now that GD 4 is in beta does that mean the videoplayer is now native ?

Not yet: #3286

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants