Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ TRACKER = sv.ByteTrack()
|
|
26 |
|
27 |
def calculate_end_frame_index(source_video_path):
|
28 |
video_info = sv.VideoInfo.from_video_path(source_video_path)
|
29 |
-
return video_info.total_frames
|
30 |
|
31 |
|
32 |
|
|
|
26 |
|
27 |
def calculate_end_frame_index(source_video_path):
|
28 |
video_info = sv.VideoInfo.from_video_path(source_video_path)
|
29 |
+
return min(video_info.total_frames, video_info.fps * 2)
|
30 |
|
31 |
|
32 |
|