Industry leading face manipulation platform
Fix audio range in restore audio
henryruhs6732a82af4be
diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.pyindex 5ab50ec6..16387456 100644--- a/facefusion/ffmpeg.py+++ b/facefusion/ffmpeg.py@@ -160,7 +160,7 @@ def restore_audio(target_path : str, output_path : str, trim_frame_start : int,output_audio_encoder = state_manager.get_item('output_audio_encoder')output_audio_quality = state_manager.get_item('output_audio_quality')output_audio_volume = state_manager.get_item('output_audio_volume')- target_video_fps = detect_video_fps(state_manager.get_item('target_path'))+ target_video_fps = detect_video_fps(target_path)temp_file_path = get_temp_file_path(target_path)temp_video_duration = detect_video_duration(temp_file_path)diff --git a/tests/test_ffmpeg.py b/tests/test_ffmpeg.pyindex acb03270..814b08e8 100644--- a/tests/test_ffmpeg.py+++ b/tests/test_ffmpeg.py@@ -101,7 +101,7 @@ def test_restore_audio() -> None:create_temp_directory(target_path)copy_file(target_path, get_temp_file_path(target_path))- assert restore_audio(target_path, output_path, 30, 0, 270) is True+ assert restore_audio(target_path, output_path, 0, 270) is Trueclear_temp_directory(target_path)