mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-12 06:05:22 +03:00
Limit ffmpeg thread counts for secondary ffmpeg processes
This commit is contained in:
parent
181b0ad6a4
commit
3886064f33
@ -50,11 +50,13 @@ def get_ffmpeg_command(ffmpeg: FfmpegConfig) -> list[str]:
|
|||||||
or get_ffmpeg_arg_list(ffmpeg.input_args)
|
or get_ffmpeg_arg_list(ffmpeg.input_args)
|
||||||
)
|
)
|
||||||
return (
|
return (
|
||||||
["ffmpeg", "-vn"]
|
["ffmpeg", "-vn", "-threads", "1"]
|
||||||
+ input_args
|
+ input_args
|
||||||
+ ["-i"]
|
+ ["-i"]
|
||||||
+ [ffmpeg_input.path]
|
+ [ffmpeg_input.path]
|
||||||
+ [
|
+ [
|
||||||
|
"-threads",
|
||||||
|
"1",
|
||||||
"-f",
|
"-f",
|
||||||
f"{AUDIO_FORMAT}",
|
f"{AUDIO_FORMAT}",
|
||||||
"-ar",
|
"-ar",
|
||||||
|
|||||||
@ -134,6 +134,8 @@ class FFMpegConverter(threading.Thread):
|
|||||||
|
|
||||||
ffmpeg_cmd = [
|
ffmpeg_cmd = [
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
|
"-threads",
|
||||||
|
"1",
|
||||||
"-f",
|
"-f",
|
||||||
"rawvideo",
|
"rawvideo",
|
||||||
"-pix_fmt",
|
"-pix_fmt",
|
||||||
@ -142,6 +144,8 @@ class FFMpegConverter(threading.Thread):
|
|||||||
f"{in_width}x{in_height}",
|
f"{in_width}x{in_height}",
|
||||||
"-i",
|
"-i",
|
||||||
"pipe:",
|
"pipe:",
|
||||||
|
"-threads",
|
||||||
|
"1",
|
||||||
"-f",
|
"-f",
|
||||||
"mpegts",
|
"mpegts",
|
||||||
"-s",
|
"-s",
|
||||||
|
|||||||
@ -31,6 +31,8 @@ class FFMpegConverter(threading.Thread):
|
|||||||
|
|
||||||
ffmpeg_cmd = [
|
ffmpeg_cmd = [
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
|
"-threads",
|
||||||
|
"1",
|
||||||
"-f",
|
"-f",
|
||||||
"rawvideo",
|
"rawvideo",
|
||||||
"-pix_fmt",
|
"-pix_fmt",
|
||||||
@ -39,6 +41,8 @@ class FFMpegConverter(threading.Thread):
|
|||||||
f"{in_width}x{in_height}",
|
f"{in_width}x{in_height}",
|
||||||
"-i",
|
"-i",
|
||||||
"pipe:",
|
"pipe:",
|
||||||
|
"-threads",
|
||||||
|
"1",
|
||||||
"-f",
|
"-f",
|
||||||
"mpegts",
|
"mpegts",
|
||||||
"-s",
|
"-s",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user