Spaces:
Runtime error
Runtime error
Mauricio Guerta
commited on
Commit
·
9658c13
1
Parent(s):
4fc187b
Uma camera apenas 2
Browse files
app.py
CHANGED
@@ -6,19 +6,19 @@ import streamlit as st
|
|
6 |
### CONNECT TO CAMERA
|
7 |
|
8 |
capture = [1,2,3,4,5,6,7,8]
|
9 |
-
|
10 |
-
ip = '192.168.0.131'
|
11 |
for x in range(1):
|
12 |
#capture[x] = cv2.VideoCapture('rtsp://atualli:Atualli22@'+ip+':1024/Streaming/channels/'+str(x+1)+'02/?transportmode=unicast')
|
13 |
capture[x] = cv2.VideoCapture('rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp')
|
14 |
|
15 |
pic = [st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty()]
|
16 |
|
17 |
-
col1 = st.columns(4)
|
18 |
|
19 |
while True:
|
20 |
for i in range(1):
|
21 |
x, frame = capture[i].read()
|
22 |
-
|
23 |
-
|
|
|
24 |
time.sleep(0.025)
|
|
|
6 |
### CONNECT TO CAMERA
|
7 |
|
8 |
capture = [1,2,3,4,5,6,7,8]
|
9 |
+
ip = '177.94.213.14'
|
10 |
+
#ip = '192.168.0.131'
|
11 |
for x in range(1):
|
12 |
#capture[x] = cv2.VideoCapture('rtsp://atualli:Atualli22@'+ip+':1024/Streaming/channels/'+str(x+1)+'02/?transportmode=unicast')
|
13 |
capture[x] = cv2.VideoCapture('rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp')
|
14 |
|
15 |
pic = [st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty()]
|
16 |
|
|
|
17 |
|
18 |
while True:
|
19 |
for i in range(1):
|
20 |
x, frame = capture[i].read()
|
21 |
+
if x:
|
22 |
+
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
23 |
+
pic[i].image(frame)
|
24 |
time.sleep(0.025)
|