Update app.py
Browse files
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 >
|
132 |
-
closer.write_videofile('./video.mp4', fps=
|
133 |
-
fps =
|
134 |
else:
|
135 |
closer.write_videofile('./video.mp4', fps=fps)
|
136 |
fps = fps
|
137 |
-
max_frames = int(fps *
|
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()
|