Run background ffmpeg tasks as ProcessPriorityClass.BelowNormal (#14651)

Follow TrickPlay example of running other background ffmpeg tasks as ProcessPriorityClass.BelowNormal:

- Keyframe extraction
- Media info probing during library scans
- Audio normalization
- Image extraction

Co-authored-by: Evan <evan@MacBook-Pro.local>
This commit is contained in:
Bond-009 2025-08-22 10:08:29 +02:00 committed by GitHub
commit ce28374d40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -199,6 +199,7 @@ public partial class AudioNormalizationTask : IScheduledTask
{
_logger.LogDebug("Starting ffmpeg with arguments: {Arguments}", args);
process.Start();
process.PriorityClass = ProcessPriorityClass.BelowNormal;
}
catch (Exception ex)
{

View File

@ -1122,6 +1122,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
private void StartProcess(ProcessWrapper process)
{
process.Process.Start();
process.Process.PriorityClass = ProcessPriorityClass.BelowNormal;
lock (_runningProcessesLock)
{

View File

@ -42,6 +42,7 @@ public static class FfProbeKeyframeExtractor
try
{
process.Start();
process.PriorityClass = ProcessPriorityClass.BelowNormal;
return ParseStream(process.StandardOutput);
}