Spaces:
Sleeping
Sleeping
Update video_processing.py
Browse files- video_processing.py +2 -2
video_processing.py
CHANGED
@@ -68,11 +68,11 @@ def download_video(url):
|
|
68 |
def sanitize_filename(filename):
|
69 |
return "".join([c if c.isalnum() or c in " .-_()" else "_" for c in filename])
|
70 |
|
71 |
-
def find_scenes(video_path
|
72 |
video_manager = VideoManager([video_path])
|
73 |
scene_manager = SceneManager()
|
74 |
scene_manager.add_detector(ContentDetector(threshold=33)) # Adjusted threshold for finer segmentation
|
75 |
-
video_manager.set_downscale_factor(
|
76 |
video_manager.start()
|
77 |
scene_manager.detect_scenes(frame_source=video_manager)
|
78 |
scene_list = scene_manager.get_scene_list()
|
|
|
68 |
def sanitize_filename(filename):
|
69 |
return "".join([c if c.isalnum() or c in " .-_()" else "_" for c in filename])
|
70 |
|
71 |
+
def find_scenes(video_path):
|
72 |
video_manager = VideoManager([video_path])
|
73 |
scene_manager = SceneManager()
|
74 |
scene_manager.add_detector(ContentDetector(threshold=33)) # Adjusted threshold for finer segmentation
|
75 |
+
video_manager.set_downscale_factor()
|
76 |
video_manager.start()
|
77 |
scene_manager.detect_scenes(frame_source=video_manager)
|
78 |
scene_list = scene_manager.get_scene_list()
|