# livekit
**Repository Path**: anmslooo/livekit
## Basic Information
- **Project Name**: livekit
- **Description**: https://github.com/livekit/livekit.git
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 2
- **Created**: 2023-11-02
- **Last Updated**: 2023-11-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# LiveKit: 为开发人员提供实时视频、音频和数据
[LiveKit](https://livekit.io) is an open source project that provides scalable, multi-user conferencing based on WebRTC.
It's designed to provide everything you need to build real-time video audio data capabilities in your applications.
LiveKit's server is written in Go, using the awesome [Pion WebRTC](https://github.com/pion/webrtc) implementation.
[](https://github.com/livekit/livekit/stargazers/)
[](https://livekit.io/join-slack)
[](https://twitter.com/livekitted)
[](https://github.com/livekit/livekit/releases/latest)
[](https://github.com/livekit/livekit/actions/workflows/buildtest.yaml)
[](https://github.com/livekit/livekit/blob/master/LICENSE)
## 功能
- Scalable, distributed WebRTC SFU (Selective Forwarding Unit)
- Modern, full-featured client SDKs
- Built for production, supports JWT authentication
- Robust networking and connectivity, UDP/TCP/TURN
- Easy to deploy: single binary, Docker or Kubernetes
- Advanced features including:
- [speaker detection](https://docs.livekit.io/guides/room/receive/#speaker-detection)
- [simulcast](https://docs.livekit.io/guides/room/publish/#video-simulcast)
- [end-to-end optimizations](https://blog.livekit.io/livekit-one-dot-zero/)
- [selective subscription](https://docs.livekit.io/guides/room/receive/#selective-subscription)
- [moderation APIs](https://docs.livekit.io/guides/server-api/)
- [webhooks](https://docs.livekit.io/guides/webhooks/)
- [distributed and multi-region](https://docs.livekit.io/deploy/distributed/)
## 文档和指南
https://docs.livekit.io
## 现场演示
- [LiveKit Meet](https://meet.livekit.io) ([source](https://github.com/livekit-examples/meet))
- [Spatial Audio](https://spatial-audio-demo.livekit.io/) ([source](https://github.com/livekit-examples/spatial-audio))
- OBS Studio的直播 ([source](https://github.com/livekit-examples/livestream))
- [AI voice assistant using ChatGPT](https://livekit.io/kitt) ([source](https://github.com/livekit-examples/kitt))
## SDK和工具
### SDK客户端
客户端SDK使您的前端能够提供交互式、多用户体验。
### 服务器SDK
服务器SDK使您的后端能够生成[访问令牌](https://docs.livekit.io/guides/access-tokens/),
call [server APIs](https://docs.livekit.io/guides/server-api/), and receive [webhooks](https://docs.livekit.io/guides/webhooks/). 此外,Go SDK还包括客户端功能,使您能够构建行为类似于最终用户的自动化。
| Language | Repo | Docs |
|:------------------------|:----------------------------------------------------------------------------------------------------|:------------------------------------------------------------|
| Go | [server-sdk-go](https://github.com/livekit/server-sdk-go) | [docs](https://pkg.go.dev/github.com/livekit/server-sdk-go) |
| JavaScript (TypeScript) | [server-sdk-js](https://github.com/livekit/server-sdk-js) | [docs](https://docs.livekit.io/server-sdk-js/) |
| Ruby | [server-sdk-ruby](https://github.com/livekit/server-sdk-ruby) | |
| Java (Kotlin) | [server-sdk-kotlin](https://github.com/livekit/server-sdk-kotlin) | |
| Python (community) | [tradablebits/livekit-server-sdk-python](https://github.com/tradablebits/livekit-server-sdk-python) | |
| PHP (community) | [agence104/livekit-server-sdk-php](https://github.com/agence104/livekit-server-sdk-php) | |
### 生态系统和工具
- [CLI](https://github.com/livekit/livekit-cli) - 命令行接口和负载测试仪
- [Egress](https://github.com/livekit/egress) - 导出并记录您的房间
- [Ingress](https://github.com/livekit/ingress) - 从RTMP/OBS Studio接收流
- [Docker image](https://hub.docker.com/r/livekit/livekit-server)
- [Helm charts](https://github.com/livekit/livekit-helm)
## 安装
我们建议将[livekit cli](https://github.com/livekit/livekit-cli)与服务器一起安装。它允许您访问
服务器API、创建令牌和生成测试流量。
### MacOS
```shell
brew install livekit
```
### Linux
```shell
curl -sSL https://get.livekit.io | bash
```
### Windows
在此处下载[最新版本](https://github.com/livekit/livekit/releases/latest)
## 入门
### 启动LiveKit
在开发模式下运行 `LiveKit-server --dev` 启动LiveKit。它将使用一个占位符API密钥/密钥对。
```
API Key: devkey
API Secret: secret
```
要自定义生产设置,请参阅我们的[部署文档](https://docs.livekit.io/deploy/)
### 正在创建访问令牌
(https://docs.livekit.io/guides/access-tokens/)
连接到LiveKit文件室的用户需要[访问令牌]。访问令牌(JWT)对用户的身份和授予他们的房间权限进行编码。您可以使用我们的CLI生成令牌:
```shell
livekit-cli create-token \
--api-key devkey --api-secret secret \
--join --room my-first-room --identity user1 \
--valid-for 24h
```
### 使用示例应用程序进行测试
前往我们的[示例应用程序](https://example.livekit.io),输入生成的令牌以连接到您的LiveKit服务器。此应用程序是使用我们的[React SDK](https://github.com/livekit/livekit-react)构建的。
连接后,您的视频和音频现在将发布到您的新LiveKit实例中!
### Simulating a test publisher
```shell
livekit-cli join-room \
--url ws://localhost:7880 \
--api-key devkey --api-secret secret \
--room my-first-room --identity bot-user1 \
--publish-demo
```
此命令将循环演示视频发布到房间中。由于视频剪辑是如何编码的(每3秒关键帧),
在浏览器有足够的数据开始渲染帧之前会有一点延迟。这是模拟的假象。
## 部署
### Use LiveKit Cloud使用LiveKit Cloud
LiveKit Cloud is the fastest and most reliable way to run LiveKit. Every project gets free monthly bandwidth and
transcoding credits.
Sign up for [LiveKit Cloud](https://cloud.livekit.io/).
### Self-host
Read our [deployment docs](https://docs.livekit.io/deploy/) for more information.
## 从源构建
Pre-requisites:
- Go 1.18+ is installed
- GOPATH/bin is in your PATH
Then run
```shell
git clone https://github.com/livekit/livekit
cd livekit
./bootstrap.sh
mage
```
## 贡献
We welcome your contributions toward improving LiveKit! Please join us
[on Slack](http://livekit.io/join-slack) to discuss your ideas and/or PRs.
## License
LiveKit server is licensed under Apache License v2.0.