fffiloni commited on
Commit
c0ff040
1 Parent(s): 06ac94c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
 
3
- from scenedetect import open_video, SceneManager, split_video_ffmpeg
4
  from scenedetect.detectors import ContentDetector
5
  #from scenedetect.video_splitter import split_video_ffmpeg
6
 
@@ -28,11 +28,12 @@ def find_scenes(video_path, threshold=27.0):
28
  #shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
29
  #print(shot_in, shot_out)
30
 
 
31
 
32
  #ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
33
 
34
- return scene_list, shots
35
 
36
  video_input=gr.Video(source="upload", format="mp4");
37
 
38
- gr.Interface(fn=find_scenes, inputs=video_input, outputs=["json", "file"]).launch()
 
1
  import gradio as gr
2
 
3
+ from scenedetect import open_video, SceneManager
4
  from scenedetect.detectors import ContentDetector
5
  #from scenedetect.video_splitter import split_video_ffmpeg
6
 
 
28
  #shot_out = (scene_list[1][1].get_frames() - 1) / scene_list[1][0].get_framerate()
29
  #print(shot_in, shot_out)
30
 
31
+ print(shots)
32
 
33
  #ffmpeg_extract_subclip(video_path, shot_in, shot_out, targetname="cut.mp4")
34
 
35
+ return scene_list
36
 
37
  video_input=gr.Video(source="upload", format="mp4");
38
 
39
+ gr.Interface(fn=find_scenes, inputs=video_input, outputs="json").launch()