#webrtc #ortc #sfu

mediasoup

Cutting Edge WebRTC Video Conferencing in Rust

26 releases (7 breaking)

0.7.1 Apr 1, 2021
0.7.0 Mar 31, 2021
0.6.0 Mar 13, 2021
0.3.0 Dec 27, 2020
0.0.8 Nov 29, 2020

#80 in Multimedia

Download history 65/week @ 2020-12-22 43/week @ 2020-12-29 87/week @ 2021-01-05 41/week @ 2021-01-12 47/week @ 2021-01-19 25/week @ 2021-01-26 33/week @ 2021-02-09 335/week @ 2021-02-16 15/week @ 2021-02-23 6/week @ 2021-03-02 22/week @ 2021-03-09 5/week @ 2021-03-16 51/week @ 2021-03-23 103/week @ 2021-03-30 39/week @ 2021-04-06

249 downloads per month

ISC license

105MB
3M SLoC

GNU Style Assembly 1.5M SLoC // 0.0% comments Perl 1M SLoC // 0.0% comments C 333K SLoC // 0.1% comments Assembly 253K SLoC // 0.0% comments C++ 65K SLoC // 0.1% comments Python 20K SLoC // 0.3% comments Rust 13K SLoC // 0.0% comments Prolog 642 SLoC Automake 633 SLoC // 0.1% comments Shell 390 SLoC // 0.1% comments Emacs Lisp 292 SLoC // 0.2% comments TypeScript 218 SLoC Batch 55 SLoC // 0.1% comments JavaScript 25 SLoC

Rust port of mediasoup TypeScript library

Crates.io Docs License

Support forum

Design Goals

mediasoup and its client side libraries are designed to accomplish with the following goals:

  • Be a SFU (Selective Forwarding Unit).
  • Support both WebRTC and plain RTP input and output.
  • Be a Rust/Node.js module in server side.
  • Be a tiny JavaScript and C++ libraries in client side.
  • Be minimalist: just handle the media layer.
  • Be signaling agnostic: do not mandate any signaling protocol.
  • Be super low level API.
  • Support all existing WebRTC endpoints.
  • Enable integration with well known multimedia libraries/tools.

Use Cases

mediasoup and its client side libraries provide a super low level API. They are intended to enable different use cases and scenarios, without any constraint or assumption. Some of these use cases are:

  • Group video chat applications.
  • One-to-many (or few-to-many) broadcasting applications in real-time.
  • RTP streaming.

Features

  • Idiomatic Rust/ECMAScript 6 low level API.
  • Multi-stream: multiple audio/video streams over a single ICE + DTLS transport.
  • IPv6 ready.
  • ICE / DTLS / RTP / RTCP over UDP and TCP.
  • Simulcast and SVC support.
  • Congestion control.
  • Sender and receiver bandwidth estimation with spatial/temporal layers distribution algorithm.
  • Data message exchange (via WebRTC DataChannels, SCTP over plain UDP, and direct termination in Rust/Node.js).
  • Extremely powerful (media worker subprocess/thead coded in C++ on top of libuv).

Authors

License

ISC

Dependencies

~4–5.5MB
~124K SLoC