fffiloni commited on
Commit
2938c1f
1 Parent(s): c0ff040

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- shot = ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname=str(i)+"_cut.mp4")
26
- shots.append(shot)
 
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)