@camstack/addon-pipeline 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  <meta charset="utf-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
6
  <title>CamStack Embed</title>
7
- <script type="module" crossorigin src="./assets/index-7-Kh7maK.js"></script>
7
+ <script type="module" crossorigin src="./assets/index-z3LC2BKs.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="./assets/index-C7SSikPl.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-pipeline",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "CamStack Pipeline bundle — runner, detection, motion, decoders, audio + stream broker. Multi-entry npm package shipping 7 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",
@@ -78,7 +78,8 @@
78
78
  "description": "Per-node detection scheduler — manages frame queues, semaphore, motion drain, and inference dispatch for cameras assigned by the orchestrator",
79
79
  "entry": "./dist/pipeline-runner/index.js",
80
80
  "execution": {
81
- "placement": "any-node"
81
+ "placement": "any-node",
82
+ "heapProfile": "heavy"
82
83
  },
83
84
  "capabilities": [
84
85
  {
@@ -109,7 +110,8 @@
109
110
  }
110
111
  ],
111
112
  "execution": {
112
- "placement": "any-node"
113
+ "placement": "any-node",
114
+ "heapProfile": "heavy"
113
115
  },
114
116
  "protected": true,
115
117
  "icon": "assets/icon.svg",
@@ -123,7 +125,8 @@
123
125
  "description": "WASM-accelerated motion detection with blur, dilation, and connected component labeling",
124
126
  "entry": "./dist/motion-wasm/index.js",
125
127
  "execution": {
126
- "placement": "any-node"
128
+ "placement": "any-node",
129
+ "heapProfile": "heavy"
127
130
  },
128
131
  "capabilities": [
129
132
  {
@@ -149,7 +152,8 @@
149
152
  "description": "Hardware-accelerated video decoder using FFmpeg native bindings",
150
153
  "entry": "./dist/decoder-nodeav/index.js",
151
154
  "execution": {
152
- "placement": "any-node"
155
+ "placement": "any-node",
156
+ "heapProfile": "heavy"
153
157
  },
154
158
  "capabilities": [
155
159
  {
@@ -169,7 +173,8 @@
169
173
  "description": "Bidirectional audio codec I/O — decodes camera audio (AAC, Opus, PCMU/PCMA) into per-consumer PCM sessions and encodes intercom PCM back into camera-supported codecs",
170
174
  "entry": "./dist/audio-codec-nodeav/index.js",
171
175
  "execution": {
172
- "placement": "any-node"
176
+ "placement": "any-node",
177
+ "heapProfile": "heavy"
173
178
  },
174
179
  "capabilities": [
175
180
  {
@@ -189,7 +194,8 @@
189
194
  "description": "Audio level metering (dB/RMS) with optional classification",
190
195
  "entry": "./dist/audio-analyzer/index.js",
191
196
  "execution": {
192
- "placement": "any-node"
197
+ "placement": "any-node",
198
+ "heapProfile": "heavy"
193
199
  },
194
200
  "capabilities": [
195
201
  {
@@ -210,7 +216,8 @@
210
216
  "version": "0.1.0",
211
217
  "entry": "./dist/stream-broker/index.js",
212
218
  "execution": {
213
- "placement": "hub-only"
219
+ "placement": "hub-only",
220
+ "heapProfile": "heavy"
214
221
  },
215
222
  "capabilities": [
216
223
  {
@@ -238,7 +245,8 @@
238
245
  "description": "Continuous, local, filesystem-native camera recording — passthrough ffmpeg segmenter per profile with a RAM index and HLS variant/master playlists",
239
246
  "entry": "./dist/recorder/index.js",
240
247
  "execution": {
241
- "placement": "any-node"
248
+ "placement": "any-node",
249
+ "heapProfile": "heavy"
242
250
  },
243
251
  "capabilities": [
244
252
  {
@@ -51,6 +51,11 @@ def main() -> None:
51
51
  ap = argparse.ArgumentParser()
52
52
  ap.add_argument("--model", required=True)
53
53
  ap.add_argument("--labels", default="")
54
+ # YAMNet is a tiny model — ONNX Runtime otherwise defaults intra_op threads to the CPU core
55
+ # count, so every short inference spins up N threads whose coordination overhead dwarfs the
56
+ # actual compute (observed: ~1000% CPU across a handful of always-on audio streams). Cap to a
57
+ # single op thread (Frigate runs it the same way); overridable via --threads for large hosts.
58
+ ap.add_argument("--threads", type=int, default=1)
54
59
  args = ap.parse_args()
55
60
 
56
61
  labels: list[str] = []
@@ -62,7 +67,12 @@ def main() -> None:
62
67
  print(f"yamnet_audio: failed to read labels: {exc}", file=sys.stderr)
63
68
  labels = []
64
69
 
65
- session = ort.InferenceSession(args.model, providers=["CPUExecutionProvider"])
70
+ sess_options = ort.SessionOptions()
71
+ sess_options.intra_op_num_threads = max(1, args.threads)
72
+ sess_options.inter_op_num_threads = 1
73
+ session = ort.InferenceSession(
74
+ args.model, sess_options=sess_options, providers=["CPUExecutionProvider"]
75
+ )
66
76
  input_name = session.get_inputs()[0].name
67
77
  output_name = session.get_outputs()[0].name
68
78