param([string]$EncoderPath = 'D:\env\ffmpeg-tools\ffmpeg.exe') $ErrorActionPreference = 'Stop' . (Join-Path $PSScriptRoot 'env.ps1') if (-not (Test-Path -LiteralPath $EncoderPath -PathType Leaf)) { throw 'FFmpeg is required in D:\env for this development-only fixture.' } $fixtureDirectory = Join-Path (Split-Path -Parent $PSScriptRoot) '.tmp\m0-regression' New-Item -ItemType Directory -Path $fixtureDirectory -Force | Out-Null $fixturePath = Join-Path $fixtureDirectory 'haorui-draft-regression.mp4' & $EncoderPath -nostdin -y -hide_banner -loglevel error -f lavfi -i 'testsrc2=size=640x360:rate=25' ` -f lavfi -i 'anullsrc=r=44100:cl=stereo' -t 22 -c:v libx264 -preset veryfast -crf 30 ` -pix_fmt yuv420p -c:a aac -b:a 64k -shortest -movflags +faststart $fixturePath if ($LASTEXITCODE -ne 0) { throw "Draft fixture generation failed: $LASTEXITCODE" } Get-Item -LiteralPath $fixturePath | Select-Object FullName, Length