heheyas commited on
Commit
4d7a1ce
1 Parent(s): 608f7da
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -137,16 +137,16 @@ def do_sample(
137
  .astype(np.uint8)
138
  )
139
  # write_video(video_path, frames, fps=6)
140
- writer = cv2.VideoWriter(
141
- video_path,
142
- cv2.VideoWriter_fourcc(*"MP4V"),
143
- 6,
144
- (frames.shape[-1], frames.shape[-2]),
145
- )
146
- for fr in frames:
147
- writer.write(cv2.cvtColor(fr, cv2.COLOR_RGB2BGR))
148
- writer.release()
149
- # imageio.mimwrite(video_path, frames, fps=6)
150
 
151
  return video_path
152
 
 
137
  .astype(np.uint8)
138
  )
139
  # write_video(video_path, frames, fps=6)
140
+ # writer = cv2.VideoWriter(
141
+ # video_path,
142
+ # cv2.VideoWriter_fourcc(*"MP4V"),
143
+ # 6,
144
+ # (frames.shape[-1], frames.shape[-2]),
145
+ # )
146
+ # for fr in frames:
147
+ # writer.write(cv2.cvtColor(fr, cv2.COLOR_RGB2BGR))
148
+ # writer.release()
149
+ imageio.mimwrite(video_path, frames)
150
 
151
  return video_path
152