Pepguy commited on
Commit
e3cf3b1
·
verified ·
1 Parent(s): 057ca82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,7 +43,8 @@ async def process_video(req: VideoJsonRequest):
43
  duration = float(probe.stdout.strip() or 0)
44
 
45
  # 3. Extract exactly 15 frames
46
- fps = 15 / max(duration, 1)
 
47
  subprocess.run([
48
  "ffmpeg", "-y", "-i", video_path,
49
  "-vf", f"fps={fps}",
 
43
  duration = float(probe.stdout.strip() or 0)
44
 
45
  # 3. Extract exactly 15 frames
46
+ # fps = 15 / max(duration, 1)
47
+ fps = 1 / max(duration, 1)
48
  subprocess.run([
49
  "ffmpeg", "-y", "-i", video_path,
50
  "-vf", f"fps={fps}",