top | item 38904574

Pure C WebRTC

107 points| seansh | 2 years ago |github.com | reply

16 comments

order
[+] seansh|2 years ago|reply
I was going through some of my old projects and saw one that used this webrtc library. I remember at least at the time (3-4 years ago) if you wanted a webrtc communication channel outside of the browser there were really only two options. One was from Google [1], which is used in both chrome and firefox, and the other one was this c library.

I recall it took me a week to figure out how to properly compile Google's implementation (which uses the bazel build system) as a static or dynamic library to link to. Even then, I think I couldn't get it below something like 50MB. I don't remember the exact binary size but it was so large that I either had to give up using it or give up calling my app "lightweight".

Later I learned that there was also another great implementation written in Go [2] but obviously not feasible if the rest of your project is not in Go.

[1] https://webrtc.googlesource.com/src

[2] https://github.com/pion/webrtc

[+] sesm|2 years ago|reply
AFAIK 50mb is the entire WebRTC that has a lot of browser-related stuff. If you only needed P2P connection establishment, you could take old version of libjingle from the point in time when it was a separate library.
[+] jupp0r|2 years ago|reply
A lot of those 50mb will probably disappear if you statically link your binary against the library.
[+] rustwebrtc|2 years ago|reply
There is also a Rust implementation based on Pion that is active: webrtc-rs/webrtc
[+] singpolyma3|2 years ago|reply
It's not clear what platforms this can run on or how it is related to kinesis
[+] Sean-Der|2 years ago|reply
I am really excited about https://github.com/sepfy/libpeer. It has examples ready for ESP32 etc....

When working on KVS I wasn't familiar with the embedded space at all. I saw 'heavyweight' embedded where you were running on Linux. Then you had RTOS/No OS at all. I wasn't prepared for these devices at all. If we can make WebRTC work in the embedded space I think it will really accelerate what developers are able to build!

Remotely driven cars, security cameras, robots in hospitals that bring iPads to infectious patients etc... Creative people are building amazing things. The WebRTC/video space needs to work harder and support them :)

-----

I love how diverse the WebRTC space is now. Outside of this implementation you have plenty of other options!

* https://github.com/shinyoshiaki/werift-webrtc (Typescript)

* https://github.com/pion/webrtc (Golang)

* https://github.com/webrtc-rs/webrtc (Rust)

* https://github.com/algesten/str0m (Rust)

* hhttps://github.com/sepfy/libpeer (C/Embedded)

* https://webrtc.googlesource.com/src/ (C++)

* https://github.com/sipsorcery-org/sipsorcery (C#)

* https://github.com/paullouisageneau/libdatachannel (C++)

* https://github.com/elixir-webrtc (Elixir)

* https://github.com/aiortc/aiortc (Python)

* GStreamer’s webrtcbin (C)

See https://github.com/sipsorcery/webrtc-echoes for examples of some running against each other.

[+] simlevesque|2 years ago|reply
Kinesis Video Streams are somewhat broke . I had to use another tool.

I would connect as viewer (ConnectAsViewer) and when I disconnected often the connection would stay open. And since there's a 10 client limit, after multiple disconnections in the same couple of minutes the system thought there was 10 client and blocked new client but there was zero clients.

[+] amiga1200|2 years ago|reply
I've used WebRTC in JavaScript, but I can't quite get why I would use this library. Can anyone respond with use cases?
[+] Sean-Der|2 years ago|reply
Customers I have seen

* Taxi uploaded footage to analyze (guns, hostile body language)

* Rescue Delivery Robot (Get a delivery robot unstuck when AI gives up. Need video + send commands)

* Remote Mining Equipment ( Video + Control)

* Remote Surgery (Specialist hands super imposed for local generalist)

* Security Cameras/Doorbells

* Kids smart watch to give parents audio+video

* Battery Operated Wearable Cameras

[+] ComputerGuru|2 years ago|reply
Anyone find a way to get raspivid (or a lower abstraction) to play nice with WebRTC and negotiate the bit rate depending on the connection quality?