forked from rwightman/posenet-python
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaudio.py
More file actions
34 lines (26 loc) · 689 Bytes
/
Copy pathaudio.py
File metadata and controls
34 lines (26 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from ffpyplayer.player import MediaPlayer
import time
import cv2
player = MediaPlayer('tt.mov')
val = ''
cap = cv2.VideoCapture(0)
# while val != 'eof':
# ret, cframe = cap.read()
# #_, val = player.get_frame()
# cv2.imshow('frame',cframe)
# #if val != 'eof' and frame is not None:
# #img, t = frame
# cap.release()
# cv2.destroyAllWindows()
# print('hogya bas')
while(val != 'eof'):
# Capture frame-by-frame
ret, frame = cap.read()
_, val = player.get_frame()
# Display the resulting frame
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()