default to AV1 encoding using rav1e

This commit is contained in:
Martin Sekera 2021-04-03 11:58:22 +02:00
parent 5056618949
commit a1e1f3ce79
2 changed files with 7 additions and 7 deletions

View file

@ -26,13 +26,13 @@ command.normalize_prepass = Command("ffmpeg", "-i", "INFILE", "MAP", "-filter:a"
command.encode_generic = Command("ffmpeg", "FPS", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "VIDEO", "AUDIO", "-sn", "OUTFILE") command.encode_generic = Command("ffmpeg", "FPS", "CUT_FROM", "-i", "INFILE", "-threads", str(multiprocessing.cpu_count()), "CUT_TO", "MAP", "VIDEO", "AUDIO", "-sn", "OUTFILE")
command.sub_mp3 = Command("-codec:a", "libmp3lame", "NORMALIZE") command.sub_mp3 = Command("-codec:a", "libmp3lame", "NORMALIZE")
command.sub_aac = Command("-codec:a", "aac", "NORMALIZE") command.sub_aac = Command("-codec:a", "aac", "NORMALIZE")
command.sub_opus = Command("-codec:a", "libopus", "NORMALIZE") command.sub_opus = Command("-codec:a", "libopus", "-b:a", "96000", "NORMALIZE")
command.sub_vorbis = Command("-codec:a", "libvorbis", "-qscale:a", "QUALITY", "NORMALIZE") command.sub_vorbis = Command("-codec:a", "libvorbis", "-qscale:a", "QUALITY", "NORMALIZE")
command.sub_pcm = Command("-codec:a", "pcm_s16le", "NORMALIZE") command.sub_pcm = Command("-codec:a", "pcm_s16le", "NORMALIZE")
command.sub_x264 = Command("PIXFMT", "-codec:v", "libx264", "-preset", "PRESET", "-crf", "QUALITY", "-profile:v", "high", "-level", "4.2", "VFILTER") command.sub_x264 = Command("PIXFMT", "-codec:v", "libx264", "-preset", "PRESET", "-crf", "QUALITY", "-profile:v", "high", "-level", "4.2", "VFILTER")
command.sub_x265 = Command("-codec:v", "libx265", "-preset", "PRESET", "-crf", "QUALITY", "VFILTER") command.sub_x265 = Command("-codec:v", "libx265", "-preset", "PRESET", "-crf", "QUALITY", "VFILTER")
command.sub_vp9 = Command("-codec:v", "libvpx-vp9", "-crf", "QUALITY", "-b:v", "0", "VFILTER") command.sub_vp9 = Command("-codec:v", "libvpx-vp9", "-crf", "QUALITY", "-b:v", "0", "VFILTER")
command.sub_av1 = Command("-strict", "experimental", "-codec:v", "libaom-av1", "-crf", "QUALITY", "-b:v", "0", "VFILTER") command.sub_av1 = Command("-codec:v", "librav1e", "-qp", "QUALITY", "-speed", "4", "-tile-columns", "2", "-tile-rows", "2", "VFILTER")
command.sub_normalize = Command("-filter:a", "LOUDNORM_INCANTATION", "-ar", "48k") command.sub_normalize = Command("-filter:a", "LOUDNORM_INCANTATION", "-ar", "48k")
command.sub_vfilter = Command("-filter:v", "ARGS") command.sub_vfilter = Command("-filter:v", "ARGS")
command.merge_chapters = Command("mkvmerge", "--chapters", "CHAPTERS_FILE", "-o", "OUTFILE", "INFILE") command.merge_chapters = Command("mkvmerge", "--chapters", "CHAPTERS_FILE", "-o", "OUTFILE", "INFILE")
@ -46,9 +46,9 @@ if __name__ == "__main__":
main = over.app.Main("over-video", version.str, "AO-JSL", features={"config_file": True}) main = over.app.Main("over-video", version.str, "AO-JSL", features={"config_file": True})
main.add_option("audio", "Audio codec to use, either <M>opus<.>, <M>vorbis<.>, <M>aac<.>, <M>pcm<.>, <M>copy<.> or <M>drop<.>.", str, ["opus"], abbr="a", count=1) main.add_option("audio", "Audio codec to use, either <M>opus<.>, <M>vorbis<.>, <M>aac<.>, <M>pcm<.>, <M>copy<.> or <M>drop<.>.", str, ["opus"], abbr="a", count=1)
main.add_option("audio-quality", "Audio encoding quality with <M>-1<.> being the worst and <M>10<.> being the best. Ignored by <W>--<g>audio<.> <m>opus<.>.", float, [4], abbr="q", count=1) main.add_option("audio-quality", "Audio encoding quality with <M>-1<.> being the worst and <M>10<.> being the best. Ignored by <W>--<g>audio<.> <m>opus<.>.", float, [4], abbr="q", count=1)
main.add_option("video", "Video codec to use, either <M>av1<.>, <M>vp9<.>, <M>x265<.>, <M>x264<.>, <M>copy<.> or <M>drop<.>.", str, ["vp9"], abbr="v", count=1) main.add_option("video", "Video codec to use, either <M>av1<.>, <M>vp9<.>, <M>x265<.>, <M>x264<.>, <M>copy<.> or <M>drop<.>.", str, ["av1"], abbr="v", count=1)
main.add_option("video-preset", "Video encoding preset to use by <W>--<g>video<.> <m>x264<.> and <m>x265<.>.", str, ["slow"], abbr="P", count=1) main.add_option("video-preset", "Video encoding preset to use by <W>--<g>video<.> <m>x264<.> and <m>x265<.>.", str, ["slow"], abbr="P", count=1)
main.add_option("video-quality", "Video encoding quality (CRF). Use <M>0<.>-<M>51<.> for <W>--<g>video<.> <m>x264<.> and <m>x265<.> (<M>0<.> being lossless, <M>18<.>-<M>28<.> is reasonable) and <M>0<.>-<M>63<.> for <W>--<g>video<.> <m>av1<.> or <m>vp9<.> (<M>0<.> being highest, <M>15<.>-<M>35<.> typical, and <M>31<.> recommended for HD video).", float, [31], abbr="Q", count=1) main.add_option("video-quality", "Video encoding quality. Interpreted as CRF: use <M>0<.>-<M>51<.> for <W>--<g>video<.> <m>x264<.> and <m>x265<.> (<M>0<.> being lossless, <M>18<.>-<M>28<.> is reasonable) and <M>0<.>-<M>63<.> for <W>--<g>video<.> <m>vp9<.> (<M>0<.> being highest, <M>15<.>-<M>35<.> typical, and <M>31<.> recommended for HD video). Interpreted as quantizer: use <M>0<.>-<M>255<.> for <W>--<g>video<.> <m>av1<.> (<M>80<.> being high quality, <M>100<.> reasonable, <M>255<.> lowest bitrate).", float, [80], abbr="Q", count=1)
main.add_option("container", "The initial container type. Either <M>mkv<.> or <M>webm<.> (or anything else supported by ffmpeg).", str, ["mkv"], count=1) main.add_option("container", "The initial container type. Either <M>mkv<.> or <M>webm<.> (or anything else supported by ffmpeg).", str, ["mkv"], count=1)
main.add_option("normalize", "Normalize the audio track without clipping. May use dynamic range compression.", bool, [True], abbr="n") main.add_option("normalize", "Normalize the audio track without clipping. May use dynamic range compression.", bool, [True], abbr="n")
main.add_option("ffmpeg-vfilter", 'Raw ffmpeg -filter:v options, e.g. "<M>scale=1280:trunc(ow/a/2)*2,transpose=dir=1<.>"', str, abbr="F", count=1) main.add_option("ffmpeg-vfilter", 'Raw ffmpeg -filter:v options, e.g. "<M>scale=1280:trunc(ow/a/2)*2,transpose=dir=1<.>"', str, abbr="F", count=1)

View file

@ -2,7 +2,7 @@
# encoding: utf-8 # encoding: utf-8
major = 1 # VERSION_MAJOR_IDENTIFIER major = 1 # VERSION_MAJOR_IDENTIFIER
minor = 115 # VERSION_MINOR_IDENTIFIER minor = 116 # VERSION_MINOR_IDENTIFIER
# VERSION_LAST_MM 1.115 # VERSION_LAST_MM 1.116
patch = 1 # VERSION_PATCH_IDENTIFIER patch = 0 # VERSION_PATCH_IDENTIFIER
str = ".".join(str(v) for v in (major, minor, patch)) str = ".".join(str(v) for v in (major, minor, patch))