This commit is contained in:
2024-12-24 20:49:41 +03:00
parent f8febafacb
commit 2b3521544b
35 changed files with 2043 additions and 767 deletions
+4 -4
View File
@@ -175,7 +175,7 @@ def upload_file(
size = file_path.stat().st_size
while True:
proc = subprocess.Popen(
["rsync", "--bwlimit", "1100", "-rvPa", str(file_path), destination],
["rsync", "--bwlimit", "4500", "-rvPa", str(file_path), destination],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
@@ -333,14 +333,14 @@ def parse_args():
arger = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
arger.add_argument("video_path", type=Path, help="path to video file")
arger.add_argument("-e", "--encoder", choices=["handbrake", "ffmpeg"], default="handbrake", help="encoder engine")
arger.add_argument("-q", "--quality", type=float, default=25, help="x265 quality factor")
arger.add_argument("-q", "--quality", type=float, default=35, help="x265 quality factor")
arger.add_argument("--output-dir", "-o", dest="output_dir", type=Path, help="Dir to save encoded files")
arger.add_argument("--rsync", dest="upload_target", help="rsync encoded file to a host")
arger.add_argument("--validate", action="store_true", default=False, help="perform validations before starting")
arger.add_argument("--denoise", action="store_true", default=False, help="Enable denoise filter (Handbrake only)")
arger.add_argument("--10bit", action="store_true", dest="is_10bit", help="Encode using 10-bit profile")
arger.add_argument("--8bit", action="store_false", dest="is_10bit", help="Encode using 8-bit profile")
arger.set_defaults(is_10bit=True)
arger.add_argument("--8bit", action="store_true", dest="is_10bit", help="Encode using 8-bit profile")
arger.set_defaults(is_8bit=True)
def parse_time(val: str) -> int:
parts = val.split(":")