From 787fa913fb53a25c2b61c1a8f900bbf958c0e6b4 Mon Sep 17 00:00:00 2001 From: DDXDB <38449595+DDXDB@users.noreply.github.com> Date: Sun, 8 Dec 2024 00:49:01 +0800 Subject: [PATCH] Update ffmpeg.py add hwaccel --- facefusion/ffmpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.py index b7977568..227c2cac 100644 --- a/facefusion/ffmpeg.py +++ b/facefusion/ffmpeg.py @@ -51,7 +51,7 @@ def extract_frames(target_path : str, temp_video_resolution : str, temp_video_fp trim_frame_start = state_manager.get_item('trim_frame_start') trim_frame_end = state_manager.get_item('trim_frame_end') temp_frames_pattern = get_temp_frames_pattern(target_path, '%08d') - commands = [ '-i', target_path, '-s', str(temp_video_resolution), '-q:v', '0' ] + commands = ['-hwaccel auto', '-i', target_path, '-s', str(temp_video_resolution), '-q:v', '0' ] if isinstance(trim_frame_start, int) and isinstance(trim_frame_end, int): commands.extend([ '-vf', 'trim=start_frame=' + str(trim_frame_start) + ':end_frame=' + str(trim_frame_end) + ',fps=' + str(temp_video_fps) ])