Mauricio Guerta commited on
Commit
b858e8f
·
1 Parent(s): cf01853

Adiciona teste local

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -7,12 +7,12 @@ import streamlit as st
7
  # rtsp://177.94.213.14:554/user=atualli&password=Ope1w3r&channel=2&stream=0.sdp
8
 
9
  capture = [1,2,3,4,5,6,7,8]
10
- #ip = '177.94.213.14'
11
- ip = '192.168.0.131'
12
  for x in range(1):
13
  #capture[x] = cv2.VideoCapture('rtsp://atualli:Atualli22@'+ip+':1024/Streaming/channels/'+str(x+1)+'02/?transportmode=unicast')
14
- # strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp'
15
- strrtsp = "teste.mp4"
16
  capture[x] = cv2.VideoCapture(strrtsp)
17
  print (strrtsp)
18
 
@@ -25,8 +25,8 @@ while True:
25
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
26
  pic[i].image(frame)
27
  else:
28
- # strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(i+1)+'&stream=0.sdp'
29
- strrtsp = "teste.mp4"
30
  capture[i] = cv2.VideoCapture(strrtsp)
31
  print ("reconectando... frame invalido "+strrtsp)
32
  #time.sleep(0.025)
 
7
  # rtsp://177.94.213.14:554/user=atualli&password=Ope1w3r&channel=2&stream=0.sdp
8
 
9
  capture = [1,2,3,4,5,6,7,8]
10
+ ip = '177.94.213.14'
11
+ #ip = '192.168.0.131'
12
  for x in range(1):
13
  #capture[x] = cv2.VideoCapture('rtsp://atualli:Atualli22@'+ip+':1024/Streaming/channels/'+str(x+1)+'02/?transportmode=unicast')
14
+ strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp'
15
+ #strrtsp = "teste.mp4"
16
  capture[x] = cv2.VideoCapture(strrtsp)
17
  print (strrtsp)
18
 
 
25
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
26
  pic[i].image(frame)
27
  else:
28
+ strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(i+1)+'&stream=0.sdp'
29
+ #strrtsp = "teste.mp4"
30
  capture[i] = cv2.VideoCapture(strrtsp)
31
  print ("reconectando... frame invalido "+strrtsp)
32
  #time.sleep(0.025)