Open n00mkrad opened 2 years ago
I confirm I also encountered this behavior on Windows 10.
My configuration :
Also, if i kill av1an with CTRL+C the remaining svt-av1 processes become zombies processes. These zombie processes are an issue as they keep the incompletelly encoded chunks opened (in the temporary folder/encode/*.ivf) so in windows this prevent resuming av1an encoding (with -r) after CTRL+C without killing the zombie svt-av1 processes as the new svt-av1 processes runned by av1an cannot recreate the incomplete encoded chunks because they remain opened by the svt-av1 zombie processes.
Edit : I observed when everything is working there is one VSPipe process per SVT-AV1 process, but when SVT-AV1 process is stuck, there is no VSPipe process running. Could this be a crash of VSPipe or something ?
If it can help, when I kill manually the inactive svt-av1 processes I got this error :
Also, kill the inactive processes unstuck av1an so it continue normally after that, until svt-av1 processes become stuck again (hapens randomly after 5 minutes to 1 hour).
Here are encoding parameters that where passed to av1an codec options parameters (-v) :
Params: --rc 0 --crf 18 --preset 4 --film-grain 0 --input-depth 10 --lookahead 120 --keyint -2 --color-range 0 --color-primaries 5 --transfer-characteristics 5 --matrix-coefficients 6 -w 700 -h 500 --pass 0
Just created a dumb powershell script to automatically kill stuck svt-av1 processes if it can help someone :
Do {
echo "Searching for stucked SVT-AV1 processed..."
$processId = Get-Process | Sort-Object CPU | where {$_.ProcessName -Like "SvtAv1EncApp"} | where {$_.CPU -le 1} | select -First 1 | Format-Table Id -HideTableHeaders | Out-String | ForEach-Object { $_.Trim("`r","`n") }
if ($processId) {
echo "Killing one stuck process"
taskkill /F /PID $processId
} else {
echo "No stuck process detected"
}
echo "Wait 5 minutes"
Start-Sleep -Seconds 300
}
While (1)
This is a very simple and dumb script, it kills one svt-av1 process which CPU usage is bellow 1% (loop every 5 minutes).
Rarely, I have a problem with SVT-AV1 where the encoder seems to hang or even exit (no process in task manager), however, av1an does not detect it as a crash, and won't restart the chunk.
This means it just sits there and the encoding performance is permanently degraded until you restart and resume it.
It would be great if there could be a timeout argument that specifies how long to wait until another frame is produced.
E.g:
--max-frame-timeout 300
= Kill and restart worker if no new frames has been produced for 5 minutes.