church_archive_script/Script_Web.ps1

27 lines
736 B
PowerShell
Raw Normal View History

2023-11-29 16:12:35 +00:00
param ( [string[]] $Paths )
2023-11-29 16:47:01 +00:00
cd Programs
2023-11-29 16:12:35 +00:00
$Paths | foreach {
$Path = $_
$WithoutExtension = [IO.Path]::ChangeExtension($Path, '')
$WebFile = $WithoutExtension.replace('archive', 'web') + "webm"
$PictureFile = $WithoutExtension.replace('archive', 'web') + "png"
Write-Host "==============================================================================="
Write-Host ""
Write-Host " Input video: $Path"
Write-Host " Web video: $WebFile"
Write-Host ""
Write-Host ""
2023-11-29 16:47:01 +00:00
.\ffmpeg.exe -hide_banner -y -i "$Path" -vf zscale=1280:720:filter=spline36 -c:v libsvtav1 -preset 5 -crf 28 -svtav1-params "enable-qm=1:fast-decode=1" -c:a libopus -b:a 192k -f matroska "$WebFile";
2023-11-29 16:12:35 +00:00
Write-Host ""
Write-Host "Done"
}
2023-11-29 16:47:01 +00:00
cd ..