bstraehle commited on
Commit
f21ded6
·
verified ·
1 Parent(s): affcc27

Update util.py

Browse files
Files changed (1) hide show
  1. util.py +8 -1
util.py CHANGED
@@ -18,11 +18,18 @@ def get_img_b64(file_path):
18
 
19
  def get_imgs_b64(file_path):
20
  video = cv2.VideoCapture(file_path)
21
-
 
 
 
22
  result = []
23
 
24
  while video.isOpened():
25
  success, frame = video.read()
 
 
 
 
26
  _, buffer = cv2.imencode(".png", frame)
27
  result.append(base64.b64encode(buffer).decode("utf-8"))
28
 
 
18
 
19
  def get_imgs_b64(file_path):
20
  video = cv2.VideoCapture(file_path)
21
+
22
+ print("#################################################3")
23
+ print(file_path)
24
+ print(video)
25
  result = []
26
 
27
  while video.isOpened():
28
  success, frame = video.read()
29
+ print(success)
30
+ print(frame)
31
+ if not success:
32
+ break
33
  _, buffer = cv2.imencode(".png", frame)
34
  result.append(base64.b64encode(buffer).decode("utf-8"))
35