Spaces:
Runtime error
Runtime error
KevinQHLin
commited on
Commit
•
9681396
1
Parent(s):
5b276ea
Update run_on_video/video_extractor.py
Browse files
run_on_video/video_extractor.py
CHANGED
@@ -67,9 +67,9 @@ def vid2clip(model, vid_path, output_file,
|
|
67 |
totatl_num_frames += vid_features.shape[0]
|
68 |
# safeguard output path before saving
|
69 |
dirname = os.path.dirname(output_file)
|
70 |
-
if not os.path.exists(dirname):
|
71 |
-
|
72 |
-
|
73 |
np.savez(os.path.join(output_file, 'vid.npz'), features=vid_features)
|
74 |
else:
|
75 |
print(f'{input_file}, failed at ffprobe.\n')
|
|
|
67 |
totatl_num_frames += vid_features.shape[0]
|
68 |
# safeguard output path before saving
|
69 |
dirname = os.path.dirname(output_file)
|
70 |
+
# if not os.path.exists(dirname):
|
71 |
+
# print(f"Output directory {dirname} does not exists, creating...")
|
72 |
+
os.makedirs(dirname)
|
73 |
np.savez(os.path.join(output_file, 'vid.npz'), features=vid_features)
|
74 |
else:
|
75 |
print(f'{input_file}, failed at ffprobe.\n')
|