Update app.py
Browse files
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 >
|
77 |
-
closer.write_videofile('./video.mp4', fps=
|
78 |
-
fps =
|
79 |
else:
|
80 |
closer.write_videofile('./video.mp4', fps=fps)
|
81 |
fps = fps
|
82 |
-
max_frames = int(fps *
|
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()
|