Fix the output framerate vs. time

This commit is contained in:
henryruhs
2024-01-31 09:28:40 +01:00
parent d19e5918dd
commit b50f021743
+1 -1
View File
@@ -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 ])