Skip to content

NVR with realtime local object detection for IP cameras

Set export sub process to be lower priority (#7862)

Nicolas Mowen3797340efa6a
diff --git a/frigate/record/export.py b/frigate/record/export.py
index 2a97d83f20..3b2bfe5c97 100644
--- a/frigate/record/export.py
+++ b/frigate/record/export.py
@@ -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,
)