go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

webrtc data channel

Open smidm opened this issue 1 year ago • 9 comments

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!

smidm avatar Jan 18 '24 16:01 smidm

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

AlexxIT avatar Jan 18 '24 17:01 AlexxIT

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

Daavidaviid avatar Jan 19 '24 12:01 Daavidaviid

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

AlexxIT avatar Jan 19 '24 12:01 AlexxIT

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

Daavidaviid avatar Jan 19 '24 12:01 Daavidaviid

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

AlexxIT avatar Jan 19 '24 12:01 AlexxIT

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.

smidm avatar Jan 20 '24 07:01 smidm

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.

AlexxIT avatar Jan 20 '24 08:01 AlexxIT

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!!

bilalmirza-sudo avatar Mar 21 '24 23:03 bilalmirza-sudo

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

Daavidaviid avatar Mar 22 '24 00:03 Daavidaviid