fffiloni commited on
Commit
3f24535
1 Parent(s): 4a23dca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -18,15 +18,15 @@ def find_scenes(video_path, threshold=27.0):
18
 
19
  #print(scene_list)
20
 
21
- shot_in = scene_list[0][0].get_timecode()
22
- shot_out = scene_list[0][1].get_timecode()
23
  #print(shot_in, shot_out)
24
 
25
  #input_video_path = video_path
26
  #output_video_path = 'video_out.mp4'
27
  # ffmpeg_extract_subclip("full.mp4", start_seconds, end_seconds, targetname="cut.mp4")
28
  ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
29
- print(output_video_path)
30
  return scene_list, "cut.mp4"
31
 
32
  video_input=gr.Video(source="upload", format="mp4", mirror_webcam="False");
 
18
 
19
  #print(scene_list)
20
 
21
+ shot_in = scene_list[0][0].get_frames() / scene_list[0][0].get_framerate()
22
+ shot_out = scene_list[0][1].get_frames() / scene_list[0][0].get_framerate()
23
  #print(shot_in, shot_out)
24
 
25
  #input_video_path = video_path
26
  #output_video_path = 'video_out.mp4'
27
  # ffmpeg_extract_subclip("full.mp4", start_seconds, end_seconds, targetname="cut.mp4")
28
  ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
29
+ #print(output_video_path)
30
  return scene_list, "cut.mp4"
31
 
32
  video_input=gr.Video(source="upload", format="mp4", mirror_webcam="False");