Giter Site home page Giter Site logo

ion-sfu's Introduction


Ion SFU

Go implementation of a WebRTC Selective Forwarding Unit

Slack Widget GoDoc Coverage Status Go Report Card License: MIT


A selective forwarding unit is a video routing service which allows webrtc sessions to scale more efficiently. This package provides a simple, flexible, high performance Go implementation of a WebRTC SFU. It can be called directly or through a gRPC or json-rpc interface.

Features

  • Audio/Video/Datachannel forwarding
  • Congestion Control (TWCC, REMB, RR/SR)
  • Unified plan semantics
  • Pub/Sub Peer Connection (O(n) port usage)
  • Audio level indication (RFC6464). "X is speaking"

Quickstart

Run the Echo Test example

docker-compose -f examples/echotest/docker-compose.yaml up

Open the client

http://localhost:8000/

SFU with json-rpc signaling

The json-rpc signaling service can be used to easily get up and running with the sfu. It can be used with the corresponding javascript signaling module.

Using golang environment
go build ./cmd/signal/json-rpc/main.go && ./main -c config.toml
Using docker
docker run -p 7000:7000 -p 5000-5200:5000-5200/udp pionwebrtc/ion-sfu:latest-jsonrpc

SFU with gRPC signaling

For service-to-service communication, you can use the grpc interface. A common pattern is to call the grpc endpoints from a custom signaling service.

Using golang environment
go build ./cmd/signal/grpc/main.go && ./main -c config.toml
Using docker
docker run -p 50051:50051 -p 5000-5200:5000-5200/udp pionwebrtc/ion-sfu:latest-grpc

Documentation

Answers to some Frequenty Asked Questions.

Examples

To see some other ways of interacting with the ion-sfu instance, check out our examples.

Media Processing

ion-sfu supports real-time processing on media streamed through the sfu using ion-avp.

For an example of recording a MediaStream to webm, checkout the save-to-webm example.

License

MIT License - see LICENSE for full text

Development

Generate the protocol buffers and grpc code:

  1. Best choice (uses docker): make protos.
  2. Manually:
    • Install protocol buffers and the protcol buffers compiler. On Fedora dnf install protobuf protobuf-compiler.
    • go get google.golang.org/grpc/cmd/protoc-gen-go-grpc
    • go get google.golang.org/protobuf/cmd/protoc-gen-go
    • protoc --go_out=. --go-grpc_out=. --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative cmd/signal/grpc/proto/sfu.proto

ion-sfu's People

Contributors

adwpc avatar at-wat avatar billylindeman avatar cameronej avatar cgojin avatar cloudwebrtc avatar codeslinger avatar decanus avatar feixiao avatar gqadonis avatar grahamking avatar jbrady42 avatar jinleileiking avatar jonahzheng avatar jonghunbok avatar kangshaojun avatar kevmo314 avatar leewardbound avatar nkonev avatar obasajujoshua31 avatar orlandoco avatar renovate-bot avatar renovate[bot] avatar sashaaro avatar sean-der avatar t-yuki avatar tannergabriel avatar tarrencev avatar tmiv avatar vicramon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.