jhj0517 commited on
Commit
01c002d
·
1 Parent(s): 75ca5c9

Fix can't divide by 2 bug

Browse files
Files changed (1) hide show
  1. modules/utils/video_helper.py +1 -1
modules/utils/video_helper.py CHANGED
@@ -204,7 +204,7 @@ def create_video_from_frames(
204
  '-framerate', str(frame_rate),
205
  '-i', os.path.join(frames_dir, f"%05d{frame_img_mime_type}"),
206
  '-c:v', vid_codec,
207
- '-vf', 'scale=iw:-2' if pix_format else None,
208
  ]
209
 
210
  if output_mime_type == ".gif":
 
204
  '-framerate', str(frame_rate),
205
  '-i', os.path.join(frames_dir, f"%05d{frame_img_mime_type}"),
206
  '-c:v', vid_codec,
207
+ '-vf', 'crop=trunc(iw/2)*2:trunc(ih/2)*2' if pix_format else None,
208
  ]
209
 
210
  if output_mime_type == ".gif":