Files
taoyao/taoyao-media-server/README.md
acgist 50f80bee2d [*]
2023-02-08 21:31:09 +08:00

68 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 媒体
只要负责媒体处理,不要添加任何业务逻辑,所有业务逻辑都由[taoyao-signal-server](../taoyao-signal-server)处理。
## 使用
```
sudo npm install
```
## Mediasoup
```
# 编译:默认不用手动编译
make
make -C worker
```
## 安全
默认媒体服务只要暴露媒体`UDP`端口,信令接口不用暴露,所以使用简单鉴权。
## 动态调节码率
```
参考配置`mediaCodecs`
```
## WebRTC协议栈
```
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HTTPS / WSS | | SCTP | SRTP / SRTCP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ICE / SDP / SIP +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TLS | | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ DTLS +-+-+-+-+-+-+-+-+-+
| HTTP / WS | NAT / STUN / TURN | | RTP / RTCP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TCP | UDP |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IPv4 / IPv6 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```
### 协议简介
* 会话通道ICE/SIP/SDP
* 媒体通道RTP/RTCP/SRTP/SRTCP
* RTP实时传输协议音频视频
* RTCPRTP传输控制协议监控数据传输质量并给予数据发送方反馈
* SCTP流控制传输协议自定义的应用数据传输
* RTMP实时消息传送协议
* RTSP可以控制媒体点播
### ICE/SDP/SIP
ICE信息的描述格式通常采用标准的SDP其全称为Session Description Protocol即会话描述协议。<br />
SDP只是一种信息格式的描述标准不属于传输协议但是可以被其他传输协议用来交换必要的信息例如SIP、RTSP等等。
## 其他常见WebRTC媒体服务
* [Jitsi](https://github.com/jitsi)
* [Janus](https://github.com/meetecho/janus-gateway/)
* [Licode](https://github.com/lynckia/licode)
* [Kurento](https://github.com/Kurento/kurento-media-server)
* [Medooze](https://github.com/medooze/media-server)
* [Mediasoup](https://github.com/versatica/mediasoup)