AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
3.75k stars 304 forks source link

webrtc data channel #889

Open smidm opened 5 months ago

smidm commented 5 months ago

Is there a way to pass arbitrary data through WebRTC? WebRTC supports "data channels", but I haven't find any mention here. If it is not possible, how hard it would be to implement this and where to start hacking. Thanks!

AlexxIT commented 5 months ago

It's out of scope of this project. It's possible to send data via data channel, but go2rtc supports only media data.

Daavidaviid commented 5 months ago

Maybe you can replace this lib by pion webrtc? I'm interested by the topic too.

AlexxIT commented 5 months ago

I don't understand what you talking about. This is not lib. This is application. It using pion library.

Daavidaviid commented 5 months ago

I don't understand what you talking about. This is not lib. This is application. It using pion library.

Oops, what I meant to say was that @smidm could could work directly with pion webrtc lib instead of using go2rtc

AlexxIT commented 5 months ago

Yes. If he has some special business logic - he can build application from the scratch using pion lib.

smidm commented 5 months ago

We have a bunch of RPis with Realsense cameras and we need to stream both RGB and depth to browser. Initial testing with go2rtc was flawless, everything worked out of the box! We would like to pass calibration data with the streams.

AlexxIT commented 5 months ago

You can stream depth, for example, via WebSocket from your API endpoint. Or open another WebRTC connection with your soft. Or try to change go2rtc source code for your task.

bilalmirza-sudo commented 3 months ago

Hi! I have a very important request. Do you have a project/code where you stream RGBD data over weebRTC? Would be really grateful if you could help. Thanks!!

Daavidaviid commented 3 months ago

Personally I was able to use pion/webrtc, RTP and ffmpeg to stream audio/video over webrtc while using data channel at the same time.

It was mostly straightforward