From 4089105b08d29d82f7513ffc5c3ab6dbb7a5b393 Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Tue, 9 Dec 2025 00:53:56 -0500 Subject: [PATCH] Add one-click AV1/HEVC helper scripts (sh/bat) --- scripts/bat/convert-av1-1080p-vt.bat | 30 ++++++++++++++++++++++++ scripts/bat/convert-hevc-1080p-vt.bat | 29 +++++++++++++++++++++++ scripts/bat/convert-hevc-lossless-vt.bat | 29 +++++++++++++++++++++++ scripts/clear-go-cache.sh | 0 scripts/convert-av1-1080p-vt.sh | 21 +++++++++++++++++ scripts/convert-hevc-1080p-vt.sh | 21 +++++++++++++++++ scripts/convert-hevc-lossless-vt.sh | 21 +++++++++++++++++ 7 files changed, 151 insertions(+) create mode 100644 scripts/bat/convert-av1-1080p-vt.bat create mode 100644 scripts/bat/convert-hevc-1080p-vt.bat create mode 100644 scripts/bat/convert-hevc-lossless-vt.bat mode change 100644 => 100755 scripts/clear-go-cache.sh create mode 100755 scripts/convert-av1-1080p-vt.sh create mode 100755 scripts/convert-hevc-1080p-vt.sh create mode 100755 scripts/convert-hevc-lossless-vt.sh diff --git a/scripts/bat/convert-av1-1080p-vt.bat b/scripts/bat/convert-av1-1080p-vt.bat new file mode 100644 index 0000000..4a92dd3 --- /dev/null +++ b/scripts/bat/convert-av1-1080p-vt.bat @@ -0,0 +1,30 @@ +@echo off +setlocal +REM VideoTools helper: AV1 1080p balanced encode (keeps audio/subs/metadata) +REM Usage: convert-av1-1080p-vt.bat "input.ext" "output.mkv" + +if "%~1"=="" ( + echo Usage: %~nx0 "input.ext" "output.mkv" + exit /b 1 +) + +set INPUT=%~1 +set OUTPUT=%~2 +if "%OUTPUT%"=="" ( + REM auto-name + set OUTPUT=%~dpn1-av1-1080p.mkv +) + +ffmpeg -y -hide_banner -loglevel error ^ + -i "%INPUT%" ^ + -map 0 ^ + -c:v libaom-av1 -b:v 1400k -cpu-used 4 -row-mt 1 -pix_fmt yuv420p ^ + -c:a copy -c:s copy -c:d copy ^ + "%OUTPUT%" + +if %ERRORLEVEL% equ 0 ( + echo Done: "%OUTPUT%" +) else ( + echo Encode failed. Check above ffmpeg output. +) +endlocal diff --git a/scripts/bat/convert-hevc-1080p-vt.bat b/scripts/bat/convert-hevc-1080p-vt.bat new file mode 100644 index 0000000..2f687cb --- /dev/null +++ b/scripts/bat/convert-hevc-1080p-vt.bat @@ -0,0 +1,29 @@ +@echo off +setlocal +REM VideoTools helper: H.265/HEVC 1080p balanced encode (keeps audio/subs/metadata) +REM Usage: convert-hevc-1080p-vt.bat "input.ext" "output.mkv" + +if "%~1"=="" ( + echo Usage: %~nx0 "input.ext" "output.mkv" + exit /b 1 +) + +set INPUT=%~1 +set OUTPUT=%~2 +if "%OUTPUT%"=="" ( + set OUTPUT=%~dpn1-hevc-1080p.mkv +) + +ffmpeg -y -hide_banner -loglevel error ^ + -i "%INPUT%" ^ + -map 0 ^ + -c:v libx265 -preset slow -b:v 2000k -pix_fmt yuv420p ^ + -c:a copy -c:s copy -c:d copy ^ + "%OUTPUT%" + +if %ERRORLEVEL% equ 0 ( + echo Done: "%OUTPUT%" +) else ( + echo Encode failed. Check above ffmpeg output. +) +endlocal diff --git a/scripts/bat/convert-hevc-lossless-vt.bat b/scripts/bat/convert-hevc-lossless-vt.bat new file mode 100644 index 0000000..8028c56 --- /dev/null +++ b/scripts/bat/convert-hevc-lossless-vt.bat @@ -0,0 +1,29 @@ +@echo off +setlocal +REM VideoTools helper: H.265/HEVC lossless (CRF 0) re-encode; keeps audio/subs/metadata +REM Usage: convert-hevc-lossless-vt.bat "input.ext" "output.mkv" + +if "%~1"=="" ( + echo Usage: %~nx0 "input.ext" "output.mkv" + exit /b 1 +) + +set INPUT=%~1 +set OUTPUT=%~2 +if "%OUTPUT%"=="" ( + set OUTPUT=%~dpn1-hevc-lossless.mkv +) + +ffmpeg -y -hide_banner -loglevel error ^ + -i "%INPUT%" ^ + -map 0 ^ + -c:v libx265 -preset slow -crf 0 -x265-params lossless=1 -pix_fmt yuv420p ^ + -c:a copy -c:s copy -c:d copy ^ + "%OUTPUT%" + +if %ERRORLEVEL% equ 0 ( + echo Done: "%OUTPUT%" +) else ( + echo Encode failed. Check above ffmpeg output. +) +endlocal diff --git a/scripts/clear-go-cache.sh b/scripts/clear-go-cache.sh old mode 100644 new mode 100755 diff --git a/scripts/convert-av1-1080p-vt.sh b/scripts/convert-av1-1080p-vt.sh new file mode 100755 index 0000000..75eee51 --- /dev/null +++ b/scripts/convert-av1-1080p-vt.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# VideoTools helper: AV1 1080p balanced encode (keeps audio/subs/metadata) +# Usage: ./convert-av1-1080p-vt.sh "input.ext" ["output.mkv"] +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 input.ext [output.mkv]" + exit 1 +fi + +in="$1" +out="${2:-${1%.*}-av1-1080p.mkv}" + +ffmpeg -y -hide_banner -loglevel error \ + -i "$in" \ + -map 0 \ + -c:v libaom-av1 -b:v 1400k -cpu-used 4 -row-mt 1 -pix_fmt yuv420p \ + -c:a copy -c:s copy -c:d copy \ + "$out" + +echo "Done: $out" diff --git a/scripts/convert-hevc-1080p-vt.sh b/scripts/convert-hevc-1080p-vt.sh new file mode 100755 index 0000000..c0bb442 --- /dev/null +++ b/scripts/convert-hevc-1080p-vt.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# VideoTools helper: H.265/HEVC 1080p balanced encode (keeps audio/subs/metadata) +# Usage: ./convert-hevc-1080p-vt.sh "input.ext" ["output.mkv"] +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 input.ext [output.mkv]" + exit 1 +fi + +in="$1" +out="${2:-${1%.*}-hevc-1080p.mkv}" + +ffmpeg -y -hide_banner -loglevel error \ + -i "$in" \ + -map 0 \ + -c:v libx265 -preset slow -b:v 2000k -pix_fmt yuv420p \ + -c:a copy -c:s copy -c:d copy \ + "$out" + +echo "Done: $out" diff --git a/scripts/convert-hevc-lossless-vt.sh b/scripts/convert-hevc-lossless-vt.sh new file mode 100755 index 0000000..8dc1587 --- /dev/null +++ b/scripts/convert-hevc-lossless-vt.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# VideoTools helper: H.265/HEVC lossless (CRF 0) re-encode; keeps audio/subs/metadata +# Usage: ./convert-hevc-lossless-vt.sh "input.ext" ["output.mkv"] +set -e + +if [ -z "$1" ]; then + echo "Usage: $0 input.ext [output.mkv]" + exit 1 +fi + +in="$1" +out="${2:-${1%.*}-hevc-lossless.mkv}" + +ffmpeg -y -hide_banner -loglevel error \ + -i "$in" \ + -map 0 \ + -c:v libx265 -preset slow -crf 0 -x265-params lossless=1 -pix_fmt yuv420p \ + -c:a copy -c:s copy -c:d copy \ + "$out" + +echo "Done: $out"