Added actualy HW encode
This commit is contained in:
@@ -6,6 +6,7 @@ param(
|
||||
[int]$Workers = 1,
|
||||
[int]$Samples = 4,
|
||||
[string]$Hwaccel = "",
|
||||
[string]$Encoder = "svt-av1",
|
||||
[switch]$UseHardwareWorker,
|
||||
[string]$PlexUrl = "",
|
||||
[string]$PlexToken = "",
|
||||
@@ -27,7 +28,7 @@ function Invoke-OptimizeLibrary {
|
||||
exit 1
|
||||
}
|
||||
|
||||
$pythonCmd = Get-Command python3, python, py | Select-Object -FirstProperty Path -ErrorAction SilentlyContinue
|
||||
$pythonCmd = Get-Command python3, python, py -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if (-not $pythonCmd) {
|
||||
Write-ColorOutput -Message "ERROR: Python 3 not found. Please install Python 3." -Color "Red"
|
||||
exit 1
|
||||
@@ -40,6 +41,7 @@ function Invoke-OptimizeLibrary {
|
||||
"--preset", $Preset.ToString(),
|
||||
"--workers", $Workers.ToString(),
|
||||
"--samples", $Samples.ToString(),
|
||||
"--encoder", $Encoder,
|
||||
"--log-dir", $LogDir
|
||||
)
|
||||
|
||||
@@ -65,11 +67,12 @@ function Invoke-OptimizeLibrary {
|
||||
Write-ColorOutput -Message " Preset: $Preset" -Color "White"
|
||||
Write-ColorOutput -Message " Workers: $Workers" -Color "White"
|
||||
Write-ColorOutput -Message " Samples: $Samples" -Color "White"
|
||||
Write-ColorOutput -Message " Encoder: $Encoder" -Color "White"
|
||||
if ($Hwaccel) {
|
||||
Write-ColorOutput -Message " HW Accel: $Hwaccel" -Color "White"
|
||||
}
|
||||
if ($UseHardwareWorker) {
|
||||
Write-ColorOutput -Message " Hardware worker: Enabled" -Color "White"
|
||||
Write-ColorOutput -Message " Hardware worker: Enabled (1 HW + $($Workers - 1) CPU)" -Color "White"
|
||||
}
|
||||
if ($PlexUrl -and $PlexToken) {
|
||||
Write-ColorOutput -Message " Plex refresh: Enabled" -Color "White"
|
||||
|
||||
Reference in New Issue
Block a user