Industry leading face manipulation platform
Move restricted temp_video_fps to core
henryruhs977d8d91b5ba
diff --git a/facefusion/core.py b/facefusion/core.pyindex 81336196..7a73a12b 100755--- a/facefusion/core.py+++ b/facefusion/core.py@@ -451,7 +451,7 @@ def process_video(start_time : float) -> ErrorCode:return 1logger.info(wording.get('merging_video').format(resolution = state_manager.get_item('output_video_resolution'), fps = state_manager.get_item('output_video_fps')), __name__)- if merge_video(state_manager.get_item('target_path'), state_manager.get_item('output_video_resolution'), state_manager.get_item('output_video_fps')):+ if merge_video(state_manager.get_item('target_path'), temp_video_fps, state_manager.get_item('output_video_resolution'), state_manager.get_item('output_video_fps')):logger.debug(wording.get('merging_video_succeed'), __name__)else:if is_process_stopping():diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.pyindex 9595f5ee..0946d4a4 100644--- a/facefusion/ffmpeg.py+++ b/facefusion/ffmpeg.py@@ -10,7 +10,7 @@ from facefusion import ffmpeg_builder, logger, process_manager, state_manager, wfrom facefusion.filesystem import get_file_format, remove_filefrom facefusion.temp_helper import get_temp_file_path, get_temp_frames_pattern, resolve_temp_frame_pathsfrom facefusion.types import AudioBuffer, Commands, EncoderSet, Fps, UpdateProgress-from facefusion.vision import count_trim_frame_total, detect_video_duration, detect_video_fps, restrict_video_fps+from facefusion.vision import count_trim_frame_total, detect_video_duration, detect_video_fpsdef run_ffmpeg_with_progress(commands : Commands, update_progress : UpdateProgress) -> subprocess.Popen[bytes]:@@ -200,12 +200,11 @@ def replace_audio(target_path : str, audio_path : str, output_path : str) -> booreturn run_ffmpeg(commands).returncode == 0-def merge_video(target_path : str, output_video_resolution : str, output_video_fps : Fps) -> bool:+def merge_video(target_path : str, temp_video_fps : Fps, output_video_resolution : str, output_video_fps : Fps) -> bool:output_video_encoder = state_manager.get_item('output_video_encoder')output_video_quality = state_manager.get_item('output_video_quality')output_video_preset = state_manager.get_item('output_video_preset')merge_frame_total = len(resolve_temp_frame_paths(target_path))- temp_video_fps = restrict_video_fps(target_path, output_video_fps)temp_file_path = get_temp_file_path(target_path)temp_frames_pattern = get_temp_frames_pattern(target_path, '%08d')