fffiloni commited on
Commit
6fc3067
1 Parent(s): f917c79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -13,14 +13,17 @@ def find_scenes(video_path, threshold=27.0):
13
  scene_manager.detect_scenes(video, show_progress=True)
14
  scene_list = scene_manager.get_scene_list()
15
 
16
- #create video from scene list
17
 
18
- #start_sec = int(scene_list[0][0]['frame_num'])
19
- #timecode, frame, fps = scene_list[1]
20
- print(scene_list)
21
- shot_in = scene_list[0][0].get_frames()
22
- shot_out = scene_list[0][1].get_frames()
23
- print(shot_in, shot_out)
 
 
 
24
  return scene_list
25
 
26
  video_input=gr.Video(source="upload", format="mp4", mirror_webcam="False");
 
13
  scene_manager.detect_scenes(video, show_progress=True)
14
  scene_list = scene_manager.get_scene_list()
15
 
16
+ #print(scene_list)
17
 
18
+ #shot_in = scene_list[0][0].get_frames()
19
+ #shot_out = scene_list[0][1].get_frames()
20
+ #print(shot_in, shot_out)
21
+
22
+ for i, scene in enumerate(scene_list):
23
+ print('Scene %2d: Start %s / Frame %d, End %s / Frame %d' % (
24
+ i+1,
25
+ scene[0].get_timecode(), scene[0].get_frames(),
26
+ scene[1].get_timecode(), scene[1].get_frames(),))
27
  return scene_list
28
 
29
  video_input=gr.Video(source="upload", format="mp4", mirror_webcam="False");