From 7c39b176ac486483e1e45188e15745fa1eaee467 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 26 Jul 2024 08:16:45 -0600 Subject: [PATCH] Limit preview threads (#12633) --- frigate/output/preview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/output/preview.py b/frigate/output/preview.py index dcf81dc565..650805750f 100644 --- a/frigate/output/preview.py +++ b/frigate/output/preview.py @@ -77,8 +77,8 @@ def __init__( # write a PREVIEW at fps and 1 key frame per clip self.ffmpeg_cmd = parse_preset_hardware_acceleration_encode( config.ffmpeg.hwaccel_args, - input="-f concat -y -protocol_whitelist pipe,file -safe 0 -i /dev/stdin", - output=f"-g {PREVIEW_KEYFRAME_INTERVAL} -bf 0 -b:v {PREVIEW_QUALITY_BIT_RATES[self.config.record.preview.quality]} {FPS_VFR_PARAM} -movflags +faststart -pix_fmt yuv420p {self.path}", + input="-f concat -y -protocol_whitelist pipe,file -safe 0 -threads 1 -i /dev/stdin", + output=f"-threads 1 -g {PREVIEW_KEYFRAME_INTERVAL} -bf 0 -b:v {PREVIEW_QUALITY_BIT_RATES[self.config.record.preview.quality]} {FPS_VFR_PARAM} -movflags +faststart -pix_fmt yuv420p {self.path}", type=EncodeTypeEnum.preview, )