JoPmt commited on
Commit
736c07e
1 Parent(s): e2153ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -73,13 +73,13 @@ def plex(fpath, text, neg_prompt, one, two, three, four, five):
73
  if aspect > 1 and height < 512:
74
  return None
75
  closer = crop(clip, x1=left, y1=top, x2=right, y2=bottom)
76
- if fps > 33:
77
- closer.write_videofile('./video.mp4', fps=33)
78
- fps = 33
79
  else:
80
  closer.write_videofile('./video.mp4', fps=fps)
81
  fps = fps
82
- max_frames = int(fps * 4)
83
  for frame in tqdm(sv.get_video_frames_generator(source_path=video,)):
84
  frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
85
  cap.release()
 
73
  if aspect > 1 and height < 512:
74
  return None
75
  closer = crop(clip, x1=left, y1=top, x2=right, y2=bottom)
76
+ if fps > 10:
77
+ closer.write_videofile('./video.mp4', fps=10)
78
+ fps = 10
79
  else:
80
  closer.write_videofile('./video.mp4', fps=fps)
81
  fps = fps
82
+ max_frames = int(fps * 2)
83
  for frame in tqdm(sv.get_video_frames_generator(source_path=video,)):
84
  frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
85
  cap.release()