freealise commited on
Commit
d6b3a55
·
verified ·
1 Parent(s): 31e2f1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -90,7 +90,7 @@ def create_video(frames, fps, type):
90
  for j, img in enumerate(frames):
91
  frames[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_RGB2RGBA)
92
 
93
- mediapy.write_video(type + "_result.mp4", frames, fps=fps, codec='hevc', encoded_format='rgba')
94
 
95
  #https://zulko.github.io/moviepy/getting_started/videoclips.html#mask-clips
96
  #clip = ImageSequenceClip(frames, fps=fps)
@@ -99,7 +99,7 @@ def create_video(frames, fps, type):
99
  #clip.set_mask(maskclip)
100
  #clip.write_videofile(type + "_result.mp4", fps=fps, codec='libx265', ffmpeg_params=['-c:v', 'libx265', '-x265-params', 'crf=25', '-pix_fmt', 'yuv420p10le', '-an'], audio=False)
101
 
102
- return type + "_result.mp4"
103
 
104
 
105
  def infer(url_in,interpolation,fps_output,resize_n,winsize,o_flow):
 
90
  for j, img in enumerate(frames):
91
  frames[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_RGB2RGBA)
92
 
93
+ mediapy.write_video(type + "_result.webm", frames, fps=fps, codec='vp9', encoded_format='rgba')
94
 
95
  #https://zulko.github.io/moviepy/getting_started/videoclips.html#mask-clips
96
  #clip = ImageSequenceClip(frames, fps=fps)
 
99
  #clip.set_mask(maskclip)
100
  #clip.write_videofile(type + "_result.mp4", fps=fps, codec='libx265', ffmpeg_params=['-c:v', 'libx265', '-x265-params', 'crf=25', '-pix_fmt', 'yuv420p10le', '-an'], audio=False)
101
 
102
+ return type + "_result.webm"
103
 
104
 
105
  def infer(url_in,interpolation,fps_output,resize_n,winsize,o_flow):