shishirng cb9f0d37c2 Use rtcscore-go to calculate audio/video score (#689)
* Use rtcscore-go to calculate audio/video score

Signed-off-by: shishir gowda <shishir@livekit.io>

* Get max expected layer and find max actual layer from stream

Signed-off-by: shishir gowda <shishir@livekit.io>

* Cleanup unused methods

Signed-off-by: shishir gowda <shishir@livekit.io>

* Cleanup code - address review comments

Signed-off-by: shishir gowda <shishir@livekit.io>

* get expected layer info instead of just quality

Signed-off-by: shishir gowda <shishir@livekit.io>

* Move SpatialLayerForQuality to utils/helpers

method is required in rtc,sfu and connectionstats pkg
Moved to utils/helpers.go to remove cyclic deps

Signed-off-by: shishir gowda <shishir@livekit.io>

* update tests

Signed-off-by: shishir gowda <shishir@livekit.io>

* Pick stream stats with max layer

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update rtcscore-go pkg to make rtt/jitter optional

when passing 0, rtcscore-go was setting default values

Signed-off-by: shishir gowda <shishir@livekit.io>

* update score to rating

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update rtcscore-go pkg to use simulcast layer info for score

Signed-off-by: shishir gowda <shishir@livekit.io>

* Update score ratings to reflect rtcscore range

Signed-off-by: shishir gowda <shishir@livekit.io>

* update test params for new rtcscore

Signed-off-by: shishir gowda <shishir@livekit.io>

* Delay sending scores to connections only till full data is available

first interval can have partial data leading to lower scores

Signed-off-by: shishir gowda <shishir@livekit.io>

* Check for inf values in quality params

Signed-off-by: shishir gowda <shishir@livekit.io>

* Clean up initial score calculation. Default to 5

Signed-off-by: shishir gowda <shishir@livekit.io>

Co-authored-by: David Zhao <dz@livekit.io>
2022-05-27 14:58:26 -04:00
2022-05-25 16:14:07 +05:30
2022-02-24 14:57:14 -08:00
2022-05-19 10:44:11 -07:00
2021-08-30 11:35:03 -07:00
2022-05-19 10:44:11 -07:00
2022-01-17 23:54:04 -08:00
2021-06-03 23:22:19 -07:00
2022-03-23 09:23:59 -07:00

LiveKit - Open source, high performance WebRTC infrastructure

LiveKit is an open source project that provides scalable, multi-user conferencing over WebRTC. It's designed to give you everything you need to build real time video/audio/data capabilities in your applications.

LiveKit is written in Go, using the awesome Pion WebRTC implementation.

Features

  • Scalable, distributed WebRTC SFU (Selective Forwarding Unit)
  • Modern, full-featured client SDKs
  • Built for production - JWT authentication and server APIs
  • Robust networking & connectivity. UDP/TCP/TURN
  • Easy to deploy - single binary, docker & kubernetes
  • Advanced features - speaker detection, simulcast, selective subscription, moderation APIs, and webhooks.

Documentation & Guides

Docs & Guides at: https://docs.livekit.io

Try it live

Head to our playground and give it a spin. Build a Zoom-like conferencing app in under 100 lines of code!

SDKs & Tools

Client SDKs:

Server SDKs:

Tools:

Quickstart

Generate config file and keys

docker run --rm -v$PWD:/output livekit/generate --local

The above command generates a livekit.yaml you can use to start LiveKit. It'll contain an API key/secret pair you can use with your LiveKit install.

Starting with docker

docker run --rm -p 7880:7880 \
    -p 7881:7881 \
    -p 7882:7882/udp \
    -v $PWD/livekit.yaml:/livekit.yaml \
    livekit/livekit-server \
    --config /livekit.yaml \
    --node-ip <machine-ip>

When running with docker, --node-ip needs to be set to your machine's IP address. If the service will be exposed to the public Internet, this should the machine's public IP.

Test with example app

Head over to the example app and enter the generated token to connect to your LiveKit server. This app is built with our React SDK.

Once connected, your video and audio are now published to your new LiveKit instance!

Generating access tokens (JWT)

To add more users to a room, you'll have to create a token for each participant. Learn more about access tokens.

livekit-server provides a convenient sub-command to create a development token. This token has an expiration of a month, which is useful for development and testing, but not appropriate for production use.

docker run --rm -e LIVEKIT_KEYS="<api-key>: <api-secret>" \
    livekit/livekit-server create-join-token \
    --room "<room-name>" \
    --identity "<participant-identity>"

Deploying to server

Deployment Docs: https://docs.livekit.io/deploy/

Single node server

Use our deploy config generator to set up a single node deployment with automatic TLS termination and built-in TURN.

It includes a cloud-init/setup script that's supported by most cloud environments.

docker run --rm -it -v$PWD:/output livekit/generate

Kubernetes

We publish a helm chart that helps you to set up a cluster with high availability. For detailed instructions, see Kubernetes guide

Testing your deployment

Use the connection tester to ensure your installation is set up properly for user traffic.

Building from source

Pre-requisites:

  • Go 1.15+ is installed
  • GOPATH/bin is in your PATH

Then run

git clone https://github.com/livekit/livekit
cd livekit
./bootstrap.sh
mage

Contributing

We welcome your contributions to make LiveKit better! Please join us on Slack to discuss your ideas and/or submit PRs.

License

LiveKit server is licensed under Apache License v2.0.

Description
Languages
Go 99.8%
Shell 0.1%