Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,6 +28,7 @@ def convert_to_tuple(list):
|
|
| 28 |
def find_scenes(video_path, threshold=27.0):
|
| 29 |
# file name without extension
|
| 30 |
print(os.path.splitext(video_path)[0])
|
|
|
|
| 31 |
# Open our video, create a scene manager, and add a detector.
|
| 32 |
video = open_video(video_path)
|
| 33 |
scene_manager = SceneManager()
|
|
@@ -60,7 +61,7 @@ def find_scenes(video_path, threshold=27.0):
|
|
| 60 |
|
| 61 |
|
| 62 |
# Set name template for each shot
|
| 63 |
-
target_name = "shot_" + str(i+1) + str(
|
| 64 |
|
| 65 |
# Split chunk
|
| 66 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|
|
|
|
| 28 |
def find_scenes(video_path, threshold=27.0):
|
| 29 |
# file name without extension
|
| 30 |
print(os.path.splitext(video_path)[0])
|
| 31 |
+
filename = os.path.splitext(video_path)[0]
|
| 32 |
# Open our video, create a scene manager, and add a detector.
|
| 33 |
video = open_video(video_path)
|
| 34 |
scene_manager = SceneManager()
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
# Set name template for each shot
|
| 64 |
+
target_name = "shot_" + str(i+1) + "_" + str(filename) + ".mp4"
|
| 65 |
|
| 66 |
# Split chunk
|
| 67 |
ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
|