updates
This commit is contained in:
parent
adb4894626
commit
9b9d4b96a5
|
@ -197,15 +197,16 @@ class LoadStreams: # multiple IP or RTSP cameras
|
||||||
self.sources = sources
|
self.sources = sources
|
||||||
for i, s in enumerate(sources):
|
for i, s in enumerate(sources):
|
||||||
# Start the thread to read frames from the video stream
|
# Start the thread to read frames from the video stream
|
||||||
|
print('%g/%g: %s... ' % (i + 1, n, s), end='')
|
||||||
cap = cv2.VideoCapture(0 if s == '0' else s)
|
cap = cv2.VideoCapture(0 if s == '0' else s)
|
||||||
|
assert cap.isOpened(), 'Failed to open %s' % s
|
||||||
|
w = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
|
||||||
|
h = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
||||||
fps = cap.get(cv2.CAP_PROP_FPS) % 100
|
fps = cap.get(cv2.CAP_PROP_FPS) % 100
|
||||||
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
|
print(' success (%gx%g at %.2f FPS).' % (w, h, fps))
|
||||||
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
|
thread = Thread(target=self.update, args=([i, cap]), daemon=True)
|
||||||
|
|
||||||
print('%g/%g: %gx%g at %.2f FPS %s...' % (i + 1, n, width, height, fps, s))
|
|
||||||
thread = Thread(target=self.update, args=([i, cap]))
|
|
||||||
thread.daemon = True
|
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
print('') # newline
|
print('') # newline
|
||||||
time.sleep(0.5)
|
time.sleep(0.5)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue