From 2aa9b04874cba364ac719009bfd7a9bbd6f25176 Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sun, 13 Oct 2024 23:29:03 +0200 Subject: [PATCH] Fix replace_audio() --- facefusion/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.py index 5453d1b3..2be95d1a 100644 --- a/facefusion/ffmpeg.py +++ b/facefusion/ffmpeg.py @@ -152,7 +152,7 @@ def restore_audio(target_path : str, output_path : str, output_video_fps : Fps) def replace_audio(target_path : str, audio_path : str, output_path : str) -> bool: temp_file_path = get_temp_file_path(target_path) - commands = [ '-i', temp_file_path, '-i', audio_path, '-c:a', state_manager.get_item('output_audio_encoder'), '-af', 'apad', '-shortest', '-y', output_path ] + commands = [ '-i', temp_file_path, '-i', audio_path, '-c:v', 'copy', '-c:a', state_manager.get_item('output_audio_encoder'), '-shortest', '-y', output_path ] return run_ffmpeg(commands).returncode == 0