JoPmt commited on
Commit
66eaa77
1 Parent(s): 7ab2e25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -128,13 +128,13 @@ def plex(fpath, text, neg_prompt, modil, one, two, three, four, five):
128
  if aspect > 1 and height < 512:
129
  return None
130
  closer = crop(clip, x1=left, y1=top, x2=right, y2=bottom)
131
- if fps > 33:
132
- closer.write_videofile('./video.mp4', fps=33)
133
- fps = 33
134
  else:
135
  closer.write_videofile('./video.mp4', fps=fps)
136
  fps = fps
137
- max_frames = int(fps * 4)
138
  for frame in tqdm(sv.get_video_frames_generator(source_path=video,)):
139
  frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
140
  cap.release()
 
128
  if aspect > 1 and height < 512:
129
  return None
130
  closer = crop(clip, x1=left, y1=top, x2=right, y2=bottom)
131
+ if fps > 10:
132
+ closer.write_videofile('./video.mp4', fps=10)
133
+ fps = 10
134
  else:
135
  closer.write_videofile('./video.mp4', fps=fps)
136
  fps = fps
137
+ max_frames = int(fps * 2)
138
  for frame in tqdm(sv.get_video_frames_generator(source_path=video,)):
139
  frames.append(cv2.cvtColor(frame, cv2.COLOR_BGR2RGB))
140
  cap.release()