Use libopus and speed up VP9 encoding

This commit is contained in:
tcely authored and GitHub committed 2025-02-07 18:56:09 -05:00
1 parent 53e7cc2c87
commit d1eecf19c2
1 file changed
+4 -2
+4 -2
View File
@@ -279,9 +279,11 @@ def download_media(
codec_options = list() codec_options = list()
ofn = ytopts['outtmpl'] ofn = ytopts['outtmpl']
if 'av1-' in ofn: if 'av1-' in ofn:
codec_options = ['-c:v', 'libsvtav1', '-preset', '8', '-crf', '35'] codec_options.extend(['-c:v', 'libsvtav1', '-preset', '8', '-crf', '35'])
elif 'vp9-' in ofn: elif 'vp9-' in ofn:
codec_options = ['-c:v', 'libvpx-vp9', '-b:v', '0', '-crf', '31'] codec_options.extend(['-c:v', 'libvpx-vp9', '-b:v', '0', '-crf', '31', '-row-mt', '1'])
if '-opus' in ofn:
codec_options.extend(['-c:a', 'libopus'])
set_ffmpeg_codec = not ( set_ffmpeg_codec = not (
ytopts['postprocessor_args'] and ytopts['postprocessor_args'] and
ytopts['postprocessor_args']['modifychapters+ffmpeg'] ytopts['postprocessor_args']['modifychapters+ffmpeg']