怎加初始拉流功能

This commit is contained in:
langhuihui
2020-10-01 20:12:26 +08:00
parent d6384dcbd5
commit 7e61ba71f7
4 changed files with 27 additions and 9 deletions

View File

@@ -13,12 +13,15 @@ ListenAddr = ":554"
BufferLength = 2048
AutoPull = false
RemoteAddr = "rtsp://localhost/${streamPath}"
[[RTSP.AutoPullList]]
URL = "rtsp://admin:admin@192.168.1.212:554/cam/realmonitor?channel=1&subtype=1"
StreamPath = "live/rtsp"
```
- ListenAddr 是监听端口可以将rtsp流推到Monibuca中
- BufferLength是指解析拉取的rtp包的缓冲大小
- AutoPull是指当有用户订阅一个新流的时候自动向远程拉流转发
- RemoteAddr 指远程拉流地址,其中${streamPath}是占位符,实际使用流路径替换。
- AutoPullList 是一个数组如果配置了该数组则会在程序启动时自动启动拉流StreamPath一定要是唯一的不能重复
## 使用方法(拉流转发)
```go