Update app.py
Browse files
app.py
CHANGED
@@ -140,7 +140,7 @@ def combine_audio_video(video_path, audio_path, output_path):
|
|
140 |
def is_image_url(url):
|
141 |
parsed = urlparse(url)
|
142 |
path = parsed.path.lower()
|
143 |
-
return path.endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp'))
|
144 |
|
145 |
def create_video_from_image(image_url, output_path, duration=10):
|
146 |
# Download the image
|
@@ -156,7 +156,7 @@ def create_video_from_image(image_url, output_path, duration=10):
|
|
156 |
cmd = [
|
157 |
'ffmpeg', '-loop', '1', '-i', temp_image_path,
|
158 |
'-c:v', 'libx264', '-t', str(duration), '-pix_fmt', 'yuv420p',
|
159 |
-
'-vf', '
|
160 |
'-y', output_path
|
161 |
]
|
162 |
subprocess.run(cmd, check=True)
|
|
|
140 |
def is_image_url(url):
|
141 |
parsed = urlparse(url)
|
142 |
path = parsed.path.lower()
|
143 |
+
return path.endswith(('.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.webp', '.heic', '.svg', '.ico'))
|
144 |
|
145 |
def create_video_from_image(image_url, output_path, duration=10):
|
146 |
# Download the image
|
|
|
156 |
cmd = [
|
157 |
'ffmpeg', '-loop', '1', '-i', temp_image_path,
|
158 |
'-c:v', 'libx264', '-t', str(duration), '-pix_fmt', 'yuv420p',
|
159 |
+
'-vf', 'copy',
|
160 |
'-y', output_path
|
161 |
]
|
162 |
subprocess.run(cmd, check=True)
|