Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -57,8 +57,13 @@ def find_scenes(video_path, threshold=27.0):
|
|
57 |
shot_in = shot[0].get_frames() / framerate
|
58 |
shot_out = shot[1].get_frames() / framerate
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
# Set name template for each shot
|
61 |
-
target_name = str(os.path.splitext(video_path)[0]) + "
|
62 |
|
63 |
# Split chunk
|
64 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|
|
|
57 |
shot_in = shot[0].get_frames() / framerate
|
58 |
shot_out = shot[1].get_frames() / framerate
|
59 |
|
60 |
+
tc_in = shot[0].get_timecode()
|
61 |
+
tc_out = shot[0].get_timecode()
|
62 |
+
|
63 |
+
print(str(tc_in) + "_" + str(tc_out))
|
64 |
+
|
65 |
# Set name template for each shot
|
66 |
+
target_name = "shot_" + str(i+1) + str(os.path.splitext(video_path)[0]) + ".mp4"
|
67 |
|
68 |
# Split chunk
|
69 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|