fix: show ffmpeg window so errors are visible
This commit is contained in:
parent
d09031157d
commit
c09a999710
@ -36,17 +36,18 @@ function Write-Banner {
|
||||
}
|
||||
|
||||
function Start-Detached {
|
||||
param([string]$Name, [string]$Exe, [string[]]$Args)
|
||||
param([string]$Name, [string]$Exe, [string[]]$Args, [switch]$Visible)
|
||||
$found = (Test-Path $Exe) -or (Get-Command $Exe -ErrorAction SilentlyContinue)
|
||||
if (-not $found) {
|
||||
Write-Host " [SKIP] $Name : 未找到 $Exe" -ForegroundColor Yellow
|
||||
return $null
|
||||
}
|
||||
Write-Host " [START] $Name" -ForegroundColor Green
|
||||
$style = if ($Visible) { "Normal" } else { "Minimized" }
|
||||
if ($Args -and $Args.Count -gt 0) {
|
||||
$proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle Minimized -PassThru
|
||||
$proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle $style -PassThru
|
||||
} else {
|
||||
$proc = Start-Process -FilePath $Exe -WindowStyle Minimized -PassThru
|
||||
$proc = Start-Process -FilePath $Exe -WindowStyle $style -PassThru
|
||||
}
|
||||
Start-Sleep -Milliseconds 500
|
||||
return $proc
|
||||
@ -94,7 +95,7 @@ function Invoke-Start {
|
||||
}
|
||||
}
|
||||
if ($ffArgs) {
|
||||
Start-Detached "ffmpeg" $ffmpeg $ffArgs
|
||||
Start-Detached "ffmpeg" $ffmpeg $ffArgs -Visible
|
||||
}
|
||||
|
||||
# 3. Media server (runs on RK3588, not local)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user