Spaces:
Sleeping
Sleeping
Update video_processing.py
Browse files- video_processing.py +3 -3
video_processing.py
CHANGED
@@ -87,8 +87,8 @@ def extract_frames(video_path, start_time, end_time):
|
|
87 |
start_seconds = convert_timestamp_to_seconds(start_time)
|
88 |
end_seconds = convert_timestamp_to_seconds(end_time)
|
89 |
video_clip = VideoFileClip(video_path).subclip(start_seconds, end_seconds)
|
90 |
-
|
91 |
-
for frame_time in range(0, int(video_clip.duration * video_clip.fps), int(video_clip.fps /
|
92 |
frame = video_clip.get_frame(frame_time / video_clip.fps)
|
93 |
frames.append(frame)
|
94 |
return frames
|
@@ -100,7 +100,7 @@ def analyze_scenes(video_path, scenes, description):
|
|
100 |
"Intro text for a video",
|
101 |
"dark scene without much contrast",
|
102 |
"No people are in this scene",
|
103 |
-
"A still shot of natural scenery",
|
104 |
#"Still-camera shot of a person's face"
|
105 |
]
|
106 |
|
|
|
87 |
start_seconds = convert_timestamp_to_seconds(start_time)
|
88 |
end_seconds = convert_timestamp_to_seconds(end_time)
|
89 |
video_clip = VideoFileClip(video_path).subclip(start_seconds, end_seconds)
|
90 |
+
|
91 |
+
for frame_time in range(0, int(video_clip.duration * video_clip.fps), int(video_clip.fps / 3)):
|
92 |
frame = video_clip.get_frame(frame_time / video_clip.fps)
|
93 |
frames.append(frame)
|
94 |
return frames
|
|
|
100 |
"Intro text for a video",
|
101 |
"dark scene without much contrast",
|
102 |
"No people are in this scene",
|
103 |
+
#"A still shot of natural scenery",
|
104 |
#"Still-camera shot of a person's face"
|
105 |
]
|
106 |
|