Mauricio Guerta commited on
Commit
5aa5ac4
·
1 Parent(s): f5637b7

Adiciona ffmpeg

Browse files
Files changed (2) hide show
  1. app.py +6 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -10,7 +10,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
 
@@ -21,6 +23,7 @@ while True:
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)
 
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
+ strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(x+1)+'&stream=0.sdp'
14
+ capture[x] = cv2.VideoCapture(strrtsp)
15
+ print (strrtsp)
16
 
17
  pic = [st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty(),st.empty()]
18
 
 
23
  frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
24
  pic[i].image(frame)
25
  else:
26
+ strrtsp = 'rtsp://'+ip+':554/user=atualli&password=Ope1w3r&channel='+str(i+1)+'&stream=0.sdp'
27
+ capture[i] = cv2.VideoCapture(strrtsp)
28
+ print ("reconectando... frame invalido "+strrtsp)
29
  time.sleep(0.025)
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- opencv-python
 
 
1
+ opencv-python
2
+ ffmpy