Spaces:
Runtime error
Runtime error
yiyixuxu
commited on
Commit
·
c6b3ab7
1
Parent(s):
2251212
testing
Browse files
app.py
CHANGED
@@ -88,8 +88,12 @@ def vid2frames(url, sampling_interval=1, ext='mp4'):
|
|
88 |
# extract video frames at given sampling interval with multiprocessing -
|
89 |
print('extracting frames...')
|
90 |
n_workers = os.cpu_count()
|
91 |
-
|
92 |
-
|
|
|
|
|
|
|
|
|
93 |
return dest_path
|
94 |
|
95 |
|
|
|
88 |
# extract video frames at given sampling interval with multiprocessing -
|
89 |
print('extracting frames...')
|
90 |
n_workers = os.cpu_count()
|
91 |
+
# testing..
|
92 |
+
cap = cv2.VideoCapture(video)
|
93 |
+
print(f'video: {video}; isOpen? : {cap.isOpen()}')
|
94 |
+
|
95 |
+
#with Pool(n_workers) as pool:
|
96 |
+
# pool.map(partial(process_video_parallel, video, skip_frames, dest_path, n_workers), range(n_workers))
|
97 |
return dest_path
|
98 |
|
99 |
|