Added old features

This commit is contained in:
bnair123
2025-12-31 23:13:32 +04:00
parent 91418fa898
commit 05a306dc42
4 changed files with 1022 additions and 163 deletions

View File

@@ -1,8 +1,5 @@
#!/bin/bash
# VMAF Library Optimiser (Linux/Server runner)
# This script wraps optimize_library.py with the same interface as the Windows PowerShell version
set -e
COLOR_RED='\033[0;31m'
@@ -24,15 +21,17 @@ log_success() {
echo -e "${COLOR_GREEN}$*${COLOR_RESET}"
}
# Default values matching optimize_library.py defaults
DIRECTORY="."
VMAF="95.0"
PRESET="6"
WORKERS="1"
SAMPLES="4"
THOROUGH=""
ENCODER="svt-av1"
HWACCEL=""
USE_HW_WORKER=""
PLEX_URL=""
PLEX_TOKEN=""
LOG_DIR="/opt/Optmiser/logs"
# Parse command line arguments
while [[ $# -gt 0 ]]; do
@@ -57,18 +56,26 @@ while [[ $# -gt 0 ]]; do
SAMPLES="$2"
shift 2
;;
--thorough)
THOROUGH="--thorough"
shift
;;
--encoder)
ENCODER="$2"
shift 2
;;
--hwaccel)
HWACCEL="$2"
shift 2
;;
--use-hardware-worker)
USE_HARDWARE_WORKER="true"
shift
;;
--plex-url)
PLEX_URL="$2"
shift 2
;;
--plex-token)
PLEX_TOKEN="$2"
shift 2
;;
--log-dir)
LOG_DIR="$2"
shift 2
;;
*)
DIRECTORY="$1"
shift
@@ -105,7 +112,7 @@ ARGS=(
--preset "$PRESET"
--workers "$WORKERS"
--samples "$SAMPLES"
--encoder "$ENCODER"
--log-dir "$LOG_DIR"
)
if [[ -n "$THOROUGH" ]]; then