Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def convert_to_tuple(list):
|
|
25 |
|
26 |
|
27 |
def find_scenes(video_path, threshold=27.0):
|
28 |
-
|
29 |
# Open our video, create a scene manager, and add a detector.
|
30 |
video = open_video(video_path)
|
31 |
scene_manager = SceneManager()
|
@@ -53,10 +53,10 @@ def find_scenes(video_path, threshold=27.0):
|
|
53 |
# Get timecode in seconds
|
54 |
framerate = shot[0].get_framerate()
|
55 |
shot_in = shot[0].get_frames() / framerate
|
56 |
-
shot_out =
|
57 |
|
58 |
# Set name template for each shot
|
59 |
-
target_name = str(i)+"_cut.mp4"
|
60 |
|
61 |
# Split chunk
|
62 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|
|
|
25 |
|
26 |
|
27 |
def find_scenes(video_path, threshold=27.0):
|
28 |
+
print(video_path)
|
29 |
# Open our video, create a scene manager, and add a detector.
|
30 |
video = open_video(video_path)
|
31 |
scene_manager = SceneManager()
|
|
|
53 |
# Get timecode in seconds
|
54 |
framerate = shot[0].get_framerate()
|
55 |
shot_in = shot[0].get_frames() / framerate
|
56 |
+
shot_out = shot[1].get_frames() / framerate
|
57 |
|
58 |
# Set name template for each shot
|
59 |
+
target_name = str(i+1)+"_cut.mp4"
|
60 |
|
61 |
# Split chunk
|
62 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|