Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
#
|
17 |
|
18 |
-
#
|
19 |
-
#
|
20 |
-
print(
|
21 |
-
|
22 |
-
|
23 |
-
print(
|
|
|
|
|
|
|
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");
|