-
Notifications
You must be signed in to change notification settings - Fork 11
/
api.txt
55 lines (41 loc) · 900 Bytes
/
api.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
srs_ingest_helper服务器监听8086端口
三、对外API接口
srs_ingest_helper服务器监听8086端口,访问http://127.0.0.1:8086/进行控制
src是源地址
dest是目标路径,一般是/live/xxxxxx
1.添加url,进行代理
GET /addstream?src=rtmp://abc.com/live/my&dest=/live/my
Http 200 OK
返回json
{
"result" : 0,
"msg" :"sucess",
"hls_path": "http://127.0.0.1:8081/live/my/hls.m3u8",
"src": "rtmp://abc.com/live/my",
"dest": "/live/my"
}
如果dest存在,返回0
2.删除某个服务
src和dest都可以
GET /delstream?dest=/live/my
Http 200 OK
返回json
{
"result":0,
"msg":"sucess"
"hls_path": "http://127.0.0.1:8081/live/my/hls.m3u8"
}
3. GET /listmedia
Http 200 OK
返回json
{
"result":0,
"msg":"sucess",
"cnt":1,
"media": [
{ "src":"rtmp://abc.com/live/my",
"dest":"/live/my"
"hls_path":"http://127.0.0.1:8081/live/my/hls.m3u8"
}
]
}