Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,8 +22,9 @@ def find_scenes(video_path, threshold=27.0):
|
|
22 |
for i, scene in enumerate(scene_list):
|
23 |
shot_in = scene[0].get_frames() / scene[0].get_framerate()
|
24 |
shot_out = (scene[1].get_frames() - 1) / scene[0].get_framerate()
|
25 |
-
|
26 |
-
|
|
|
27 |
#shot_in = scene_list[1][0].get_frames() / scene_list[1][0].get_framerate()
|
28 |
#shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
|
29 |
#print(shot_in, shot_out)
|
|
|
22 |
for i, scene in enumerate(scene_list):
|
23 |
shot_in = scene[0].get_frames() / scene[0].get_framerate()
|
24 |
shot_out = (scene[1].get_frames() - 1) / scene[0].get_framerate()
|
25 |
+
target_name = str(i)+"_cut.mp4"
|
26 |
+
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|
27 |
+
shots.append(target_name)
|
28 |
#shot_in = scene_list[1][0].get_frames() / scene_list[1][0].get_framerate()
|
29 |
#shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
|
30 |
#print(shot_in, shot_out)
|