forked from Github/frigate
Adjust nginx proc count based on available CPUs (#11653)
* Restrict nginx to 4 processes if more are available * Fix bash * Different sed structure * Limit ffmpeg thread counts for secondary ffmpeg processes * Add up / down keyboard shortcut
This commit is contained in:
@@ -50,11 +50,13 @@ def get_ffmpeg_command(ffmpeg: FfmpegConfig) -> list[str]:
|
||||
or get_ffmpeg_arg_list(ffmpeg.input_args)
|
||||
)
|
||||
return (
|
||||
["ffmpeg", "-vn"]
|
||||
["ffmpeg", "-vn", "-threads", "1"]
|
||||
+ input_args
|
||||
+ ["-i"]
|
||||
+ [ffmpeg_input.path]
|
||||
+ [
|
||||
"-threads",
|
||||
"1",
|
||||
"-f",
|
||||
f"{AUDIO_FORMAT}",
|
||||
"-ar",
|
||||
|
||||
@@ -134,6 +134,8 @@ class FFMpegConverter(threading.Thread):
|
||||
|
||||
ffmpeg_cmd = [
|
||||
"ffmpeg",
|
||||
"-threads",
|
||||
"1",
|
||||
"-f",
|
||||
"rawvideo",
|
||||
"-pix_fmt",
|
||||
@@ -142,6 +144,8 @@ class FFMpegConverter(threading.Thread):
|
||||
f"{in_width}x{in_height}",
|
||||
"-i",
|
||||
"pipe:",
|
||||
"-threads",
|
||||
"1",
|
||||
"-f",
|
||||
"mpegts",
|
||||
"-s",
|
||||
|
||||
@@ -31,6 +31,8 @@ class FFMpegConverter(threading.Thread):
|
||||
|
||||
ffmpeg_cmd = [
|
||||
"ffmpeg",
|
||||
"-threads",
|
||||
"1",
|
||||
"-f",
|
||||
"rawvideo",
|
||||
"-pix_fmt",
|
||||
@@ -39,6 +41,8 @@ class FFMpegConverter(threading.Thread):
|
||||
f"{in_width}x{in_height}",
|
||||
"-i",
|
||||
"pipe:",
|
||||
"-threads",
|
||||
"1",
|
||||
"-f",
|
||||
"mpegts",
|
||||
"-s",
|
||||
|
||||
Reference in New Issue
Block a user