Spaces:
Running on Zero
Running on Zero
Commit ·
7827e41
1
Parent(s): db26e7f
Fix: re-encode video in mux_video_audio instead of stream-copy to handle any input codec
Browse files
app.py
CHANGED
|
@@ -286,7 +286,10 @@ def mux_video_audio(silent_video: str, audio_path: str, output_path: str,
|
|
| 286 |
ffmpeg.input(silent_video),
|
| 287 |
ffmpeg.input(audio_path),
|
| 288 |
output_path,
|
| 289 |
-
vcodec="
|
|
|
|
|
|
|
|
|
|
| 290 |
).run(overwrite_output=True, quiet=True)
|
| 291 |
|
| 292 |
|
|
|
|
| 286 |
ffmpeg.input(silent_video),
|
| 287 |
ffmpeg.input(audio_path),
|
| 288 |
output_path,
|
| 289 |
+
vcodec="libx264", preset="fast", crf=18,
|
| 290 |
+
pix_fmt="yuv420p",
|
| 291 |
+
acodec="aac", audio_bitrate="128k",
|
| 292 |
+
movflags="+faststart",
|
| 293 |
).run(overwrite_output=True, quiet=True)
|
| 294 |
|
| 295 |
|