refactor: rm x265 for Bernard
This commit is contained in:
parent
c9fd7c319a
commit
3c4cc4b331
9
encode_video.py
Executable file → Normal file
9
encode_video.py
Executable file → Normal file
@ -22,11 +22,6 @@ def encode(input_file, codec, remove_source=False, save_log=False):
|
||||
extra_params = [
|
||||
]
|
||||
|
||||
elif codec == "x265-amd":
|
||||
ffmpeg_codec = "hevc_amf"
|
||||
folder = "h265"
|
||||
extra_params = ["-quality", "quality"]
|
||||
|
||||
elif codec == "av1":
|
||||
ffmpeg_codec = "av1_nvenc"
|
||||
cq = 32
|
||||
@ -63,6 +58,8 @@ def encode(input_file, codec, remove_source=False, save_log=False):
|
||||
"-cq", str(cq),
|
||||
] + extra_params + [
|
||||
"-c:v", ffmpeg_codec,
|
||||
"-preset", "p4",
|
||||
"-cq", str(cq),
|
||||
"-rc", "vbr",
|
||||
"-b:v", "0",
|
||||
"-c:a", "copy",
|
||||
@ -130,7 +127,7 @@ def main():
|
||||
parser = argparse.ArgumentParser(description="Encode video(s) to x265 or AV1.")
|
||||
parser.add_argument("input", nargs="?", help="Path to input file")
|
||||
parser.add_argument("-d", "--directory", help="Path to a directory for batch encoding")
|
||||
parser.add_argument("--codec", choices=["x265", "x265-amd", "av1"], default="x265", help="Codec to use")
|
||||
parser.add_argument("--codec", choices=["x265", "av1"], default="x265", help="Codec to use")
|
||||
parser.add_argument("--remove-source", action="store_true", help="Remove the source file after successful encoding")
|
||||
parser.add_argument("--save-log", action="store_true", help="Save ffmpeg logs to a .log file")
|
||||
args = parser.parse_args()
|
||||
|
Loading…
x
Reference in New Issue
Block a user