Add dry option
This commit is contained in:
parent
ac53ff88ce
commit
4c0dca84c0
5
main.py
5
main.py
|
@ -15,6 +15,7 @@ parser.add_argument("--ba")
|
|||
parser.add_argument("--alayout")
|
||||
parser.add_argument("--cpu")
|
||||
parser.add_argument("--mf")
|
||||
parser.add_argument("--dry", action="store_true")
|
||||
args = parser.parse_args()
|
||||
|
||||
with open("av1_presets.yml", "r") as stream:
|
||||
|
@ -37,5 +38,9 @@ cmd = ["ffmpeg", "-i", args.input, "-c:v", "libaom-av1", "-c:a", "libopus", "-c:
|
|||
"-af", f"aformat=channel_layouts={preset['alayout']}", "-mapping_family", preset["mf"],
|
||||
"-cpu-used", preset["cpu"], "-row-mt", "1", "-tiles", "2x2", args.output]
|
||||
|
||||
if args.dry:
|
||||
print(" ".join(cmd))
|
||||
exit(0)
|
||||
|
||||
p = subprocess.run(cmd)
|
||||
exit(p.returncode)
|
||||
|
|
Loading…
Reference in New Issue