Spaces:
Runtime error
Runtime error
Charbel Malo
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -237,7 +237,7 @@ def process_video(source_path: str, target_path: str, enhance = False, progress=
|
|
237 |
'-i', temp_frames_pattern,
|
238 |
'-c:v', 'libx264',
|
239 |
'-pix_fmt', 'yuv420p',
|
240 |
-
'-preset', '
|
241 |
output_video_path
|
242 |
]
|
243 |
|
@@ -251,7 +251,7 @@ def process_video(source_path: str, target_path: str, enhance = False, progress=
|
|
251 |
'-i', video_path,
|
252 |
'-q:a', '0',
|
253 |
'-map', 'a',
|
254 |
-
'-preset', '
|
255 |
audio_path
|
256 |
]
|
257 |
|
@@ -266,7 +266,7 @@ def process_video(source_path: str, target_path: str, enhance = False, progress=
|
|
266 |
'-c:v', 'copy',
|
267 |
'-c:a', 'aac',
|
268 |
'-strict', 'experimental',
|
269 |
-
'-preset', '
|
270 |
output_video_path
|
271 |
]
|
272 |
|
@@ -285,7 +285,7 @@ def process_video(source_path: str, target_path: str, enhance = False, progress=
|
|
285 |
'-y',
|
286 |
'-i', video_path,
|
287 |
'-vf', "scale='if(gte(iw,ih),720,-1)':'if(gte(iw,ih),-1,720)',pad=ceil(iw/2)*2:ceil(ih/2)*2",
|
288 |
-
'-preset', '
|
289 |
output_video_path
|
290 |
]
|
291 |
subprocess.run(ffmpeg_command, check=True)
|
|
|
237 |
'-i', temp_frames_pattern,
|
238 |
'-c:v', 'libx264',
|
239 |
'-pix_fmt', 'yuv420p',
|
240 |
+
'-preset', 'ultrafast',
|
241 |
output_video_path
|
242 |
]
|
243 |
|
|
|
251 |
'-i', video_path,
|
252 |
'-q:a', '0',
|
253 |
'-map', 'a',
|
254 |
+
'-preset', 'ultrafast',
|
255 |
audio_path
|
256 |
]
|
257 |
|
|
|
266 |
'-c:v', 'copy',
|
267 |
'-c:a', 'aac',
|
268 |
'-strict', 'experimental',
|
269 |
+
'-preset', 'ultrafast',
|
270 |
output_video_path
|
271 |
]
|
272 |
|
|
|
285 |
'-y',
|
286 |
'-i', video_path,
|
287 |
'-vf', "scale='if(gte(iw,ih),720,-1)':'if(gte(iw,ih),-1,720)',pad=ceil(iw/2)*2:ceil(ih/2)*2",
|
288 |
+
'-preset', 'ultrafast',
|
289 |
output_video_path
|
290 |
]
|
291 |
subprocess.run(ffmpeg_command, check=True)
|