diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.py index e585f9cd..f6cf4071 100644 --- a/facefusion/ffmpeg.py +++ b/facefusion/ffmpeg.py @@ -51,7 +51,7 @@ def compress_image(output_path : str) -> bool: def merge_video(target_path : str, video_resolution : str, video_fps : Fps) -> bool: temp_output_video_path = get_temp_output_video_path(target_path) temp_frames_pattern = get_temp_frames_pattern(target_path, '%04d') - commands = [ '-hwaccel', 'auto', '-i', temp_frames_pattern, '-s', str(video_resolution), '-r', str(video_fps), '-c:v', facefusion.globals.output_video_encoder ] + commands = [ '-hwaccel', 'auto', '-s', str(video_resolution), '-r', str(video_fps), '-i', temp_frames_pattern, '-c:v', facefusion.globals.output_video_encoder ] if facefusion.globals.output_video_encoder in [ 'libx264', 'libx265' ]: output_video_compression = round(51 - (facefusion.globals.output_video_quality * 0.51)) commands.extend([ '-crf', str(output_video_compression), '-preset', facefusion.globals.output_video_preset ])