Encode to 10-bit
This commit is contained in:
parent
6ec951e015
commit
a2c1efc412
5
main.py
5
main.py
@ -4,7 +4,7 @@ import subprocess
|
||||
import yaml
|
||||
|
||||
# Hannes' AV1 wrapper script
|
||||
# Version 1.0.0
|
||||
# Version 2.0.0
|
||||
|
||||
parser = argparse.ArgumentParser(prog="hav1w")
|
||||
parser.add_argument("input")
|
||||
@ -16,6 +16,7 @@ parser.add_argument("--alayout")
|
||||
parser.add_argument("--cpu")
|
||||
parser.add_argument("--mf")
|
||||
parser.add_argument("--crop")
|
||||
parser.add_argument("--no10bit")
|
||||
parser.add_argument("--dry", action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
@ -38,6 +39,8 @@ cmd = ["ffmpeg", "-i", args.input, "-c:v", "libaom-av1", "-c:a", "libopus", "-c:
|
||||
"-crf", preset["crf"], "-b:v", "0"]
|
||||
if args.crop is not None:
|
||||
cmd += ["-vf", "crop=" + args.crop]
|
||||
if args.no10bit is None: # Encode to 10 bit per default
|
||||
cmd += ["-pix_fmt", "yuv420p10le"]
|
||||
cmd += ["-b:a", preset["ba"], "-af", f"aformat=channel_layouts={preset['alayout']}", "-mapping_family", preset["mf"],
|
||||
"-cpu-used", preset["cpu"], "-row-mt", "1", "-tiles", "2x2", args.output]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user