mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-28 12:59:03 +02:00
New Video Manager (#1191)
* tiny adjustment for tests * address the review on the video manager Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * introduce the stream strategy for the video workflow (#1192) * introduce the stream strategy for the video workflow Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * address the review on the stream strategy Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> * annotate the changes for review Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * annotate the new tests for review Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * match the temp pixel format help to the locale style Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * question the set_input_seek naming Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * question the reader and writer keys Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * drop the review annotations from the encoder mapping tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * drop the review annotations from the thread count tests Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * drop the review annotations from the ui files Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * capture the open review questions as annotations Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a * drop the settled annotations from the types Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tbcd6VWCiU4BQP1gywPr2a --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1b151c5c3e
commit
76c1f79f29
+27
-1
@@ -6,7 +6,7 @@ import pytest
|
||||
import facefusion.ffmpeg
|
||||
from facefusion import ffmpeg, ffmpeg_builder, process_manager, state_manager
|
||||
from facefusion.download import conditional_download
|
||||
from facefusion.ffmpeg import concat_video, extract_frames, merge_video, read_audio_buffer, replace_audio, restore_audio
|
||||
from facefusion.ffmpeg import concat_video, extract_frames, fix_audio_encoder, fix_video_encoder, merge_video, read_audio_buffer, replace_audio, restore_audio
|
||||
from facefusion.ffprobe import extract_video_metadata
|
||||
from facefusion.filesystem import copy_file
|
||||
from facefusion.temp_helper import clear_temp_directory, create_temp_directory, get_temp_file_path, resolve_temp_frame_set
|
||||
@@ -236,3 +236,29 @@ def test_replace_audio() -> None:
|
||||
clear_temp_directory(target_path)
|
||||
|
||||
state_manager.init_item('output_audio_encoder', 'aac')
|
||||
|
||||
|
||||
def test_fix_audio_encoder() -> None:
|
||||
assert fix_audio_encoder('avi', 'libopus') == 'aac'
|
||||
assert fix_audio_encoder('m4v', 'libopus') == 'aac'
|
||||
assert fix_audio_encoder('mpeg', 'libopus') == 'aac'
|
||||
assert fix_audio_encoder('wmv', 'libopus') == 'aac'
|
||||
assert fix_audio_encoder('mov', 'flac') == 'aac'
|
||||
assert fix_audio_encoder('mov', 'libopus') == 'aac'
|
||||
assert fix_audio_encoder('mxf', 'libopus') == 'pcm_s16le'
|
||||
assert fix_audio_encoder('webm', 'aac') == 'libopus'
|
||||
assert fix_audio_encoder('mp4', 'aac') == 'aac'
|
||||
assert fix_audio_encoder('avi', 'aac') == 'aac'
|
||||
|
||||
|
||||
def test_fix_video_encoder() -> None:
|
||||
assert fix_video_encoder('m4v', 'libx265') == 'libx264'
|
||||
assert fix_video_encoder('mpeg', 'libx265') == 'libx264'
|
||||
assert fix_video_encoder('mxf', 'libx265') == 'libx264'
|
||||
assert fix_video_encoder('wmv', 'libx265') == 'libx264'
|
||||
assert fix_video_encoder('mkv', 'rawvideo') == 'libx264'
|
||||
assert fix_video_encoder('mp4', 'rawvideo') == 'libx264'
|
||||
assert fix_video_encoder('mov', 'libvpx-vp9') == 'libx264'
|
||||
assert fix_video_encoder('webm', 'libx264') == 'libvpx-vp9'
|
||||
assert fix_video_encoder('mp4', 'libx265') == 'libx265'
|
||||
assert fix_video_encoder('avi', 'rawvideo') == 'rawvideo'
|
||||
|
||||
Reference in New Issue
Block a user