Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
e6f1f6cf9b | |||
c6fec3b038 | |||
656cc637bd |
@ -22,6 +22,14 @@ stereo:
|
|||||||
mf: "1"
|
mf: "1"
|
||||||
dnl: "5"
|
dnl: "5"
|
||||||
arnr_strength: "1"
|
arnr_strength: "1"
|
||||||
|
mono:
|
||||||
|
alayout: "mono"
|
||||||
|
ba: "64k"
|
||||||
|
cpu: "3"
|
||||||
|
crf: "24"
|
||||||
|
mf: "1"
|
||||||
|
dnl: "5"
|
||||||
|
arnr_strength: "1"
|
||||||
anime:
|
anime:
|
||||||
alayout: "stereo"
|
alayout: "stereo"
|
||||||
ba: "128k"
|
ba: "128k"
|
||||||
|
7
hav1w.py
7
hav1w.py
@ -1,12 +1,13 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import shlex
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
# Hannes' AV1 wrapper script
|
# Hannes' AV1 wrapper script
|
||||||
# Version 2.0.0
|
# Version 2.0.2
|
||||||
|
|
||||||
# This is a good guide for optimizing AV1 parameters with the AOM reference encoder:
|
# This is a good guide for optimizing AV1 parameters with the AOM reference encoder:
|
||||||
# https://www.reddit.com/r/AV1/comments/t59j32/encoder_tuning_part_4_a_2nd_generation_guide_to/
|
# https://www.reddit.com/r/AV1/comments/t59j32/encoder_tuning_part_4_a_2nd_generation_guide_to/
|
||||||
@ -56,6 +57,8 @@ cmd += ["-crf", preset["crf"], "-b:v", "0"]
|
|||||||
|
|
||||||
# Set minimum keyframe interval to 12 to prevent placing too many keyframes... just in case
|
# Set minimum keyframe interval to 12 to prevent placing too many keyframes... just in case
|
||||||
cmd += ["-keyint_min", "12"]
|
cmd += ["-keyint_min", "12"]
|
||||||
|
# Set maximum keyframe interval to 300 for an improved decoding/seeking performance
|
||||||
|
cmd += ["-g", "300"]
|
||||||
|
|
||||||
# Set lookahead to 48 frames
|
# Set lookahead to 48 frames
|
||||||
# Reddit post says it's worth it...
|
# Reddit post says it's worth it...
|
||||||
@ -101,7 +104,7 @@ cmd += ["-b:a", preset["ba"], "-af", f"aformat=channel_layouts={preset['alayout'
|
|||||||
cmd += [args.output]
|
cmd += [args.output]
|
||||||
|
|
||||||
if args.dry:
|
if args.dry:
|
||||||
print(" ".join(cmd))
|
print(" ".join(list(map(lambda x:shlex.quote(x), cmd))))
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
p = subprocess.run(cmd)
|
p = subprocess.run(cmd)
|
||||||
|
Loading…
Reference in New Issue
Block a user