Spaces:
Runtime error
Runtime error
jhj0517
commited on
Commit
•
e0e4152
1
Parent(s):
2878798
Add doc
Browse files- modules/video_utils.py +2 -1
modules/video_utils.py
CHANGED
@@ -15,7 +15,7 @@ def extract_frames(
|
|
15 |
start_number: int = 0
|
16 |
):
|
17 |
"""
|
18 |
-
Extract frames and save them into output_temp_dir. This needs FFmpeg installed.
|
19 |
"""
|
20 |
os.makedirs(output_temp_dir, exist_ok=True)
|
21 |
output_path = os.path.join(output_temp_dir, "%05d.jpg")
|
@@ -58,6 +58,7 @@ def get_frames_from_dir(vid_dir: str,
|
|
58 |
|
59 |
|
60 |
def clean_image_files(image_dir: str):
|
|
|
61 |
image_extensions = ('.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp')
|
62 |
|
63 |
for filename in os.listdir(image_dir):
|
|
|
15 |
start_number: int = 0
|
16 |
):
|
17 |
"""
|
18 |
+
Extract frames as jpg files and save them into output_temp_dir. This needs FFmpeg installed.
|
19 |
"""
|
20 |
os.makedirs(output_temp_dir, exist_ok=True)
|
21 |
output_path = os.path.join(output_temp_dir, "%05d.jpg")
|
|
|
58 |
|
59 |
|
60 |
def clean_image_files(image_dir: str):
|
61 |
+
"""Removes all image files from the dir"""
|
62 |
image_extensions = ('.jpg', '.jpeg', '.png', '.gif', '.bmp', '.tiff', '.webp')
|
63 |
|
64 |
for filename in os.listdir(image_dir):
|