forked from deepch/RTSPtoWeb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.curl
133 lines (130 loc) · 4.58 KB
/
test.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
133
#!/bin/bash
set -euo pipefail
echo "curl http://demo:demo@127.0.0.1:8083/streams"
curl http://demo:demo@127.0.0.1:8083/streams
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/add"
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin123@10.128.18.224/mpeg4",
"on_demand": false,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin123@10.128.18.224:999/mpeg4cif",
"on_demand": true,
"debug": false,
"status": 0
}
}
}' \
http://demo:demo@127.0.0.1:8083/stream/testing/add
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/edit"
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"name": "test video",
"channels": {
"0": {
"name": "ch1",
"url": "rtsp://admin:admin123@10.128.18.224/mpeg4",
"on_demand": true,
"debug": false,
"status": 0
},
"1": {
"name": "ch2",
"url": "rtsp://admin:admin123@10.128.18.224/mpeg4",
"on_demand": false,
"debug": false,
"status": 0
}
}
}' \
http://demo:demo@127.0.0.1:8083/stream/testing/edit
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/add"
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"name": "ch4",
"url": "rtsp://admin:admin@YOU_CAMERA_IP/uri",
"on_demand": false,
"debug": false,
"status": 0
}' \
http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/add
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/edit"
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"name": "ch4",
"url": "rtsp://admin:admin@YOU_CAMERA_IP/uri",
"on_demand": true,
"debug": false,
"status": 0
}' \
http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/edit
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/info"
curl http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/info
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/codec"
curl http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/codec
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/delete"
curl http://demo:demo@127.0.0.1:8083/stream/testing/channel/4/delete
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/reload"
curl http://demo:demo@127.0.0.1:8083/stream/testing/reload
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/info"
echo "/stream/testing/info"
curl http://demo:demo@127.0.0.1:8083/stream/testing/info
sleep 1
echo "http://demo:demo@127.0.0.1:8083/stream/testing/delete"
curl http://demo:demo@127.0.0.1:8083/stream/testing/delete
sleep 1
echo "http://demo:demo@127.0.0.1:8083/pages/multiview/full"
curl --header "Content-Type: application/json" \
--request POST \
--data '{
"grid":6,
"player":{
"1": {
"uuid": "d43e9364-e2e3-4b41-9f78-b90de1991211",
"channel": 1,
"playerType": "mse"
},
"2": {
"uuid": "d43e9364-e2e3-4b41-9f78-b90de1991211",
"channel": 0,
"playerType": "mse"
},
"3": {
"uuid": "d43e9364-e2e3-4b41-9f78-b90de1991211",
"channel": 1,
"playerType": "hls"
},
"4": {
"uuid": "d43e9364-e2e3-4b41-9f78-b90de1991211",
"channel": 0,
"playerType": "mse"
},
"6": {
"uuid": "d43e9364-e2e3-4b41-9f78-b90de1991211",
"channel": 1,
"playerType": "mse"
}
}
}' \
http://demo:demo@127.0.0.1:8083/pages/multiview/full