Set export sub process to be lower priority

This commit is contained in:
Nick Mowen 2023-09-18 07:04:23 -06:00
parent 6aedc39a9a
commit c955d12baf

View File

@ -17,6 +17,10 @@ from frigate.ffmpeg_presets import (
logger = logging.getLogger(__name__)
def lower_priority():
os.nice(10)
class PlaybackFactorEnum(str, Enum):
realtime = "realtime"
timelapse_25x = "timelapse_25x"
@ -86,6 +90,7 @@ class RecordingExporter(threading.Thread):
ffmpeg_cmd,
input="\n".join(playlist_lines),
encoding="ascii",
preexec_fn=lower_priority,
capture_output=True,
)