fffiloni commited on
Commit
9d7c1dd
1 Parent(s): 34d9821

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -27,7 +27,6 @@ def convert_to_tuple(list):
27
 
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(os.path.basename(video_path))[0]
32
  # Open our video, create a scene manager, and add a detector.
33
  video = open_video(video_path)
@@ -58,10 +57,11 @@ def find_scenes(video_path, threshold=27.0):
58
  shot_in = shot[0].get_frames() / framerate
59
  shot_out = shot[1].get_frames() / framerate
60
 
61
-
 
62
 
63
  # Set name template for each shot
64
- target_name = "shot_" + str(i+1) + filename + ".mp4"
65
 
66
  # Split chunk
67
  ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)
 
27
 
28
  def find_scenes(video_path, threshold=27.0):
29
  # file name without extension
 
30
  filename = os.path.splitext(os.path.basename(video_path))[0]
31
  # Open our video, create a scene manager, and add a detector.
32
  video = open_video(video_path)
 
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
+ print('timecode: ' + str(tc_in)))
62
 
63
  # Set name template for each shot
64
+ target_name = "shot_" + str(i+1) + "_" + filename + ".mp4"
65
 
66
  # Split chunk
67
  ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=target_name)