Spaces:
Runtime error
Runtime error
Mauricio Guerta
commited on
Commit
·
f5637b7
1
Parent(s):
9658c13
Uma camera apenas 3
Browse files
app.py
CHANGED
@@ -14,11 +14,13 @@ for x in range(1):
|
|
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)
|
|
|
14 |
|
15 |
pic = [st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty()]
|
16 |
|
|
|
17 |
while True:
|
18 |
for i in range(1):
|
19 |
x, frame = capture[i].read()
|
20 |
if x:
|
21 |
frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
|
22 |
pic[i].image(frame)
|
23 |
+
else:
|
24 |
+
capture[i] = cv2.VideoCapture('rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(i+1)+'&stream=0.sdp')
|
25 |
+
print ("reconectando... frame invalido")
|
26 |
time.sleep(0.025)
|