-
Notifications
You must be signed in to change notification settings - Fork 121
Process Priority
Matt McManis edited this page May 30, 2020
·
2 revisions
- Default
- Low
- Below Normal
- Normal
- Above Normal
- High
start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"
start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 1 NUL &&
start "" /b /wait /belownormal ffmpeg -i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 2 "C:\path\to\video.webm"
1 Pass / CRF
cd /d "C:\path\to\" &&
for %f in (*.mpg) do (echo) &&
start "" /b /wait /belownormal ffmpeg
-i "C:\path\to\%f" -c:v libvpx -b:v 1300K "C:\path\to\%~nf.webm"
($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id
($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 1 NUL' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id;
($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K -pass 2 "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id;
1 Pass / CRF
$files = Get-ChildItem "C:\path\to\" -Filter *.mpg;
foreach ($f in $files) {
$fullName = $f.FullName;
$inputName = $f.Name;
$outputName = (Get-Item $inputName).Basename;
($Process = Start-Process ffmpeg -NoNewWindow -ArgumentList '-i "C:\path\to\video.mpg" -c:v libvpx -b:v 1300K "C:\path\to\video.webm"' -PassThru).PriorityClass = [System.Diagnostics.ProcessPriorityClass]::BelowNormal; Wait-Process -Id $Process.id
}
If Process Priority is Default
If using FFmpeg / FFprobe Full Path, uses Call Operator &
& "C:\path\to\ffmpeg\bin\ffmpeg.exe"
& "C:\path\to\ffmpeg\bin\ffprobe.exe"
If Process Priority is Low
, Normal
, High
, etc. uses Start-Process
Start-Process "C:\path\to\ffmpeg\bin\ffmpeg.exe"
If using Environment Variable
ffmpeg
ffprobe