Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def create_video_from_image(image_url, output_path, duration=10):
|
|
101 |
cmd = [
|
102 |
'ffmpeg', '-loop', '1', '-i', temp_image_path,
|
103 |
'-c:v', 'libx264', '-t', str(duration), '-pix_fmt', 'yuv420p',
|
104 |
-
'-vf',
|
105 |
'-y', output_path
|
106 |
]
|
107 |
subprocess.run(cmd, check=True)
|
|
|
101 |
cmd = [
|
102 |
'ffmpeg', '-loop', '1', '-i', temp_image_path,
|
103 |
'-c:v', 'libx264', '-t', str(duration), '-pix_fmt', 'yuv420p',
|
104 |
+
'-vf', 'scale=trunc(iw/2)*2:trunc(ih/2)*2',
|
105 |
'-y', output_path
|
106 |
]
|
107 |
subprocess.run(cmd, check=True)
|