jschwab21 commited on
Commit
65a9702
·
verified ·
1 Parent(s): fba28c8

Update video_processing.py

Browse files
Files changed (1) hide show
  1. 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, downscale_factor=50):
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(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()