forked from deepch/RTSPtoWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_multi.curl
executable file
·132 lines (130 loc) · 3.85 KB
/
test_multi.curl
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
#!/bin/bash
set -euo pipefail
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"streams": {
"demo1": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video1"
},
"demo2": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video2"
},
"demo3": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video3"
},
"demo4": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video4"
},
"demo5": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video5"
},
"demo6": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video6"
},
"demo7": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video7"
},
"demo8": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video8"
},
"demo9": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video9"
},
"demo10": {
"channels": {
"0": {
"url": "rtsp://admin:[email protected]/mpeg4"
},
"1": {
"url": "rtsp://admin:[email protected]/mpeg4cif"
}
},
"name": "test video10"
}
}
}' \
http://demo:[email protected]:8083/streams/multi/control/add
sleep 1
echo "curl http://demo:[email protected]:8083/streams"
curl http://demo:[email protected]:8083/streams
sleep 1
curl --header "Content-Type: application/json" \
--request POST \
--data '["demo1", "demo2", "demo3", "demo4", "demo5", "demo6", "demo7", "demo8", "demo9", "demo10"]' \
http://demo:[email protected]:8083/streams/multi/control/delete
sleep 1
echo "curl http://demo:[email protected]:8083/streams"
curl http://demo:[email protected]:8083/streams