Update app.py
Browse files
app.py
CHANGED
@@ -86,10 +86,11 @@ def get_frames(video_in, step, name, resize_w):
|
|
86 |
|
87 |
def create_video(frames, fps, type):
|
88 |
print("building video result")
|
|
|
89 |
for j, img in enumerate(frames):
|
90 |
-
|
91 |
|
92 |
-
mediapy.write_video(type + "_result.mp4",
|
93 |
return type + "_result.mp4"
|
94 |
|
95 |
|
|
|
86 |
|
87 |
def create_video(frames, fps, type):
|
88 |
print("building video result")
|
89 |
+
imgs = []
|
90 |
for j, img in enumerate(frames):
|
91 |
+
imgs.append(cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_BGR2RGBA))
|
92 |
|
93 |
+
mediapy.write_video(type + "_result.mp4", imgs, fps=fps, codec='hevc', encoded_format='yuv420p')
|
94 |
return type + "_result.mp4"
|
95 |
|
96 |
|