15 lines
959 B
PowerShell
15 lines
959 B
PowerShell
param(
|
|
[string]$CaptureDirectory = (Get-Content "$PSScriptRoot/../build/active-weapons-capture.txt"),
|
|
[string]$Ffmpeg = 'C:/Users/ScarPC/Documents/Plugins/PixelBanners/.codex-work/packs-smoke/plugins/ItemsAdder/storage/cache/ffmpeg/windows/ffmpeg.exe'
|
|
)
|
|
$ErrorActionPreference='Stop'
|
|
$repo=Split-Path $PSScriptRoot -Parent
|
|
$output=Join-Path $repo 'build/animation-review-0.1.1.mp4'
|
|
$ffargs=@('-hide_banner','-loglevel','error','-y')
|
|
foreach($stage in 0..3){$ffargs+=@('-framerate','20','-i',"$CaptureDirectory/client/screenshots/weapons-$stage-%03d.png")}
|
|
$filter='[0:v]scale=640:360[a];[1:v]scale=640:360[b];[2:v]scale=640:360[c];[3:v]scale=640:360[d];[a][b]hstack[top];[c][d]hstack[bottom];[top][bottom]vstack[v]'
|
|
$ffargs+=@('-filter_complex',$filter,'-map','[v]','-c:v','libx264','-crf','18','-pix_fmt','yuv420p','-movflags','+faststart',$output)
|
|
& $Ffmpeg @ffargs
|
|
if($LASTEXITCODE -ne 0){throw 'Review video encoding failed'}
|
|
Write-Output $output
|