sheikhed commited on
Commit
71960ab
·
verified ·
1 Parent(s): 7a8899e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -142,6 +142,7 @@ def create_video_from_image(image_url, session_id):
142
  video_path = f"tempvideo{session_id}.mp4"
143
  cmd = [
144
  'ffmpeg', '-loop', '1', '-i', image_path,
 
145
  '-c:v', 'libx264', '-t', '10', '-pix_fmt', 'yuv420p',
146
  video_path
147
  ]
 
142
  video_path = f"tempvideo{session_id}.mp4"
143
  cmd = [
144
  'ffmpeg', '-loop', '1', '-i', image_path,
145
+ '-vf', 'scale=trunc(iw/2)*2:trunc(ih/2)*2', # Ensure width and height are divisible by 2
146
  '-c:v', 'libx264', '-t', '10', '-pix_fmt', 'yuv420p',
147
  video_path
148
  ]