Spaces:
Build error
Build error
fix division by zero
Browse files
app.py
CHANGED
@@ -271,7 +271,7 @@ def process_video(
|
|
271 |
raise ValueError(f"Unsupported video format: {ext}, supported formats: {ALLOWED_VIDEO_EXTENSIONS}")
|
272 |
|
273 |
video_info = sv.VideoInfo.from_video_path(video_path)
|
274 |
-
read_each_i_frame = video_info.fps // 25
|
275 |
target_fps = video_info.fps / read_each_i_frame
|
276 |
target_width, target_height = get_target_size(video_info.height, video_info.width, 1080)
|
277 |
|
|
|
271 |
raise ValueError(f"Unsupported video format: {ext}, supported formats: {ALLOWED_VIDEO_EXTENSIONS}")
|
272 |
|
273 |
video_info = sv.VideoInfo.from_video_path(video_path)
|
274 |
+
read_each_i_frame = max(1, video_info.fps // 25)
|
275 |
target_fps = video_info.fps / read_each_i_frame
|
276 |
target_width, target_height = get_target_size(video_info.height, video_info.width, 1080)
|
277 |
|