Mauricio Guerta commited on
Commit
a18f289
·
1 Parent(s): 784d811

Adiciona cameras atualli

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -5,13 +5,19 @@ import streamlit as st
5
 
6
  ### CONNECT TO CAMERA
7
 
8
- capture = cv2.VideoCapture('rtsp://atualli:[email protected]:1024/Streaming/channels/102/?transportmode=unicast')
 
 
 
 
9
 
 
10
 
11
- pic = st.empty()
12
 
13
  while True:
14
- x, frame = capture.read()
15
- frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
16
- pic.image(frame)
 
17
  time.sleep(0.025)
 
5
 
6
  ### CONNECT TO CAMERA
7
 
8
+ capture = [1,2,3,4,5,6,7,8]
9
+ ip = '177.94.213.14' #'67.159.226.218'
10
+ for x in range(4):
11
+ #capture[x] = cv2.VideoCapture('rtsp://atualli:Atualli22@'+ip+':1024/Streaming/channels/'+str(x+1)+'02/?transportmode=unicast')
12
+ capture[x] = cv2.VideoCapture('rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp')
13
 
14
+ pic = [st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty()]
15
 
16
+ col1 = st.columns(4)
17
 
18
  while True:
19
+ for i in range(4):
20
+ x, frame = capture[i].read()
21
+ frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
22
+ pic[i].image(frame)
23
  time.sleep(0.025)