Fix replace_audio()

This commit is contained in:
henryruhs 2024-10-13 23:29:03 +02:00
parent 9f2c3cb180
commit 2aa9b04874

View File

@ -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