Use flac over aac if present
This commit is contained in:
@@ -68,7 +68,7 @@ temp_frame_formats : List[ImageFormat] = [ 'bmp', 'jpeg', 'png', 'tiff' ]
|
||||
|
||||
output_encoder_set : EncoderSet =\
|
||||
{
|
||||
'audio': [ 'aac', 'libmp3lame', 'libopus', 'libvorbis', 'flac', 'pcm_s16le', 'pcm_s32le' ],
|
||||
'audio': [ 'flac', 'aac', 'libmp3lame', 'libopus', 'libvorbis', 'pcm_s16le', 'pcm_s32le' ],
|
||||
'video': [ 'libx264', 'libx265', 'libvpx-vp9', 'h264_nvenc', 'hevc_nvenc', 'h264_amf', 'hevc_amf', 'h264_qsv', 'hevc_qsv', 'h264_videotoolbox', 'hevc_videotoolbox' ]
|
||||
}
|
||||
output_audio_encoders : List[AudioEncoder] = output_encoder_set.get('audio')
|
||||
|
||||
@@ -89,12 +89,14 @@ def get_available_encoder_set() -> EncoderSet:
|
||||
audio_encoder = line.split()[1]
|
||||
|
||||
if audio_encoder in facefusion.choices.output_audio_encoders:
|
||||
available_encoder_set['audio'].append(audio_encoder) #type:ignore[arg-type]
|
||||
index = facefusion.choices.output_audio_encoders.index(audio_encoder)
|
||||
available_encoder_set['audio'].insert(index, audio_encoder) #type:ignore[arg-type]
|
||||
if line.startswith(' v'):
|
||||
video_encoder = line.split()[1]
|
||||
|
||||
if video_encoder in facefusion.choices.output_video_encoders:
|
||||
available_encoder_set['video'].append(video_encoder) #type:ignore[arg-type]
|
||||
index = facefusion.choices.output_video_encoders.index(video_encoder)
|
||||
available_encoder_set['video'].insert(index, video_encoder) #type:ignore[arg-type]
|
||||
|
||||
return available_encoder_set
|
||||
|
||||
|
||||
Reference in New Issue
Block a user