merve HF staff commited on
Commit
5431f3e
1 Parent(s): 80811d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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