Industry leading face manipulation platform
More edge case testing
henryruhs834c17340d72
diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.pyindex 07f950a2..ff9ecce2 100644--- a/facefusion/ffmpeg.py+++ b/facefusion/ffmpeg.py@@ -214,6 +214,12 @@ def merge_video(target_path : str, temp_video_fps : Fps, output_video_resolutionif output_file_format in [ 'm4v', 'mkv', 'mp4' ] and output_video_encoder == 'rawvideo':output_video_encoder = 'libx264'+ if output_file_format == 'm4v':+ output_video_encoder = 'libx264'++ if output_file_format == 'mov' and output_video_encoder == 'libvpx-vp9':+ output_video_encoder = 'libx264'+if output_file_format == 'webm':output_video_encoder = 'libvpx-vp9'diff --git a/tests/test_ffmpeg.py b/tests/test_ffmpeg.pyindex 12565364..a751f0a2 100644--- a/tests/test_ffmpeg.py+++ b/tests/test_ffmpeg.py@@ -97,7 +97,7 @@ def test_merge_video() -> None:create_temp_directory(target_path)extract_frames(target_path, '452x240', 25.0, 0, 1)- assert merge_video(target_path, 25.0, '452x240', 25.0, 0, 1) is True+ assert merge_video(target_path, 25.0, '452x240', 25.0, 0, 1) is Trueclear_temp_directory(target_path)