freealise commited on
Commit
978f4b1
·
verified ·
1 Parent(s): 5d1311a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- frames[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_BGR2RGB)
91
 
92
- mediapy.write_video(type + "_result.mp4", frames, fps=fps)
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