Organize scripts a bit better.

main
Jonatan Nilsson 2023-11-29 16:47:01 +00:00
parent 0c7b4c6660
commit bdd222461c
5 changed files with 14 additions and 6 deletions

View File

@ -8,7 +8,6 @@ IF '%1' == '' GOTO Done
SET args=%args%,'%1'
GOTO More
:Done
cd Programs
Powershell.exe -noprofile -command "& {.\Script.ps1 %args%}"
pause
exit

View File

@ -8,7 +8,6 @@ IF '%1' == '' GOTO Done
SET args=%args%,'%1'
GOTO More
:Done
cd Programs
Powershell.exe -noprofile -command "& {.\Script_Web.ps1 %args%}"
pause
exit

View File

@ -2,6 +2,8 @@ param ( [string[]] $Paths )
Write-Host ""
cd Programs
$Paths | foreach {
$Path = $_
@ -18,14 +20,20 @@ $Paths | foreach {
Write-Host ""
Write-Host ""
(Get-Content template.vpy).replace('[INPUTFILE]', $Path.replace('\', '/')) | Set-Content -LiteralPath "$ScriptFile"
(Get-Content ..\template.vpy).replace('[INPUTFILE]', $Path.replace('\', '/')) | Set-Content -LiteralPath "$ScriptFile"
.\ffmpeg.exe -hide_banner -y -f vapoursynth -i "$ScriptFile" -i "$Path" -map 0:v:0 -map 1:a:0 -c:v libx265 -profile:v main10 -crf 17.4 -x265-params "me=star:subme=5:limit-modes=1:rect=1:amp=1:max-merge=5:no-early-skip=1:bframes=16:ref=6:rc-lookahead=60:limit-refs=0:rd=6:rdoq-level=2:psy-rdoq=1.00:sao=0" -c:a copy "$ArchiveFile"
Remove-Item $ScriptFile
Remove-Item "$($Path).lwi"
cd ..
.\Script_Web.ps1 "$ArchiveFile"
cd Programs
Write-Host "==============================================================================="
}
cd ..

View File

@ -1,5 +1,7 @@
param ( [string[]] $Paths )
cd Programs
$Paths | foreach {
$Path = $_
@ -15,10 +17,10 @@ $Paths | foreach {
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"
.\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";
Write-Host ""
Write-Host "Done"
}
cd ..