param ( [string[]] $Paths ) $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 "" # .\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"; ffmpeg -hide_banner -y -ss 00:10:00 -i "$WebFile" -vframes 1 "$PictureFile" Write-Host "" Write-Host "Done" }