@camstack/addon-decoder-nodeav 1.2.13 → 1.2.14
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.
- package/dist/index.js +67 -26
- package/dist/index.mjs +67 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23713,13 +23713,24 @@ method(object({
|
|
|
23713
23713
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23714
23714
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23715
23715
|
/**
|
|
23716
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23716
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23717
23717
|
*
|
|
23718
|
-
*
|
|
23719
|
-
*
|
|
23720
|
-
*
|
|
23721
|
-
*
|
|
23722
|
-
*
|
|
23718
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
23719
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
23720
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
23721
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
23722
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
23723
|
+
* the render side knows the segments, so the translation lives there
|
|
23724
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
23725
|
+
*
|
|
23726
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
23727
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
23728
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
23729
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
23730
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
23731
|
+
*
|
|
23732
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
23733
|
+
* call site responsible for the same subtraction.
|
|
23723
23734
|
*/
|
|
23724
23735
|
var ExportDenseRangeSchema = object({
|
|
23725
23736
|
fromSec: number().nonnegative(),
|
|
@@ -30849,25 +30860,32 @@ object({
|
|
|
30849
30860
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
30850
30861
|
object({
|
|
30851
30862
|
/**
|
|
30852
|
-
* How
|
|
30863
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
30864
|
+
* detection result.
|
|
30853
30865
|
*
|
|
30854
|
-
*
|
|
30855
|
-
*
|
|
30856
|
-
*
|
|
30857
|
-
*
|
|
30858
|
-
*
|
|
30866
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
30867
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
30868
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
30869
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
30870
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
30871
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
30872
|
+
*
|
|
30873
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
30874
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
30875
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
30876
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
30877
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
30859
30878
|
*/
|
|
30860
|
-
|
|
30879
|
+
holdFrames: number().int().min(1).max(64),
|
|
30861
30880
|
/**
|
|
30862
30881
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
30863
30882
|
*
|
|
30864
|
-
*
|
|
30865
|
-
*
|
|
30866
|
-
*
|
|
30867
|
-
*
|
|
30868
|
-
*
|
|
30869
|
-
*
|
|
30870
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
30883
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
30884
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
30885
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
30886
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
30887
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
30888
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
30871
30889
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
30872
30890
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
30873
30891
|
* to replace).
|
|
@@ -30893,22 +30911,45 @@ object({
|
|
|
30893
30911
|
* there is the signal that some caller names frames outside the inference set
|
|
30894
30912
|
* and that this must go back to `all`.
|
|
30895
30913
|
*/
|
|
30896
|
-
admission: NativeLeaseAdmissionSchema
|
|
30914
|
+
admission: NativeLeaseAdmissionSchema,
|
|
30915
|
+
/**
|
|
30916
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
30917
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
30918
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
30919
|
+
*
|
|
30920
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
30921
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
30922
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
30923
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
30924
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
30925
|
+
* was interrogated per SUBJECT.
|
|
30926
|
+
*
|
|
30927
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
30928
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
30929
|
+
* reproduce that.
|
|
30930
|
+
*/
|
|
30931
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
30897
30932
|
});
|
|
30898
30933
|
/**
|
|
30899
|
-
* The values in force when the operator has set nothing
|
|
30900
|
-
*
|
|
30901
|
-
*
|
|
30934
|
+
* The values in force when the operator has set nothing.
|
|
30935
|
+
*
|
|
30936
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
30937
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
30938
|
+
* in the same change that redefines it would make a regression and a retune
|
|
30939
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
30940
|
+
* live traffic.
|
|
30902
30941
|
*/
|
|
30903
30942
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
30904
|
-
|
|
30943
|
+
holdFrames: 8,
|
|
30905
30944
|
budgetMb: 1024,
|
|
30906
30945
|
activityMs: 15e3,
|
|
30946
|
+
tileBudgetMb: 64,
|
|
30907
30947
|
admission: "inferred"
|
|
30908
30948
|
};
|
|
30909
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
30949
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
30910
30950
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
30911
30951
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
30952
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
30912
30953
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
30913
30954
|
/**
|
|
30914
30955
|
* Fixed-capacity ring buffer. When full, push() overwrites the oldest entry.
|
package/dist/index.mjs
CHANGED
|
@@ -23709,13 +23709,24 @@ method(object({
|
|
|
23709
23709
|
/** Playback-speed multiplier for the render (1 = realtime). */
|
|
23710
23710
|
var ExportSpeedSchema = number().min(.25).max(32);
|
|
23711
23711
|
/**
|
|
23712
|
-
* One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23712
|
+
* One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
|
|
23713
23713
|
*
|
|
23714
|
-
*
|
|
23715
|
-
*
|
|
23716
|
-
*
|
|
23717
|
-
*
|
|
23718
|
-
*
|
|
23714
|
+
* **Wall clock, not ffmpeg's `t`** — and the recorder translates. A caller
|
|
23715
|
+
* derives these bounds from things that happened at a TIME (a track's
|
|
23716
|
+
* `firstSeen`), while `t` runs over the source playlist: the concatenation of
|
|
23717
|
+
* every segment present for the range, with each recording GAP removed. The
|
|
23718
|
+
* two agree only on a window that recorded without one interruption, and only
|
|
23719
|
+
* the render side knows the segments, so the translation lives there
|
|
23720
|
+
* (`export-dense-map.ts`, addon-pipeline).
|
|
23721
|
+
*
|
|
23722
|
+
* It was not always so. These seconds were fed to `between(t,…)` verbatim, and
|
|
23723
|
+
* on a 10 h window holding 29,393 s of footage every range landed late by the
|
|
23724
|
+
* gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
|
|
23725
|
+
* the video was a uniform timelapse, and the log line reported the five ranges
|
|
23726
|
+
* that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
|
|
23727
|
+
*
|
|
23728
|
+
* Relative and not absolute epoch, because an absolute epoch would make every
|
|
23729
|
+
* call site responsible for the same subtraction.
|
|
23719
23730
|
*/
|
|
23720
23731
|
var ExportDenseRangeSchema = object({
|
|
23721
23732
|
fromSec: number().nonnegative(),
|
|
@@ -30845,25 +30856,32 @@ object({
|
|
|
30845
30856
|
var NativeLeaseAdmissionSchema = _enum(["all", "inferred"]);
|
|
30846
30857
|
object({
|
|
30847
30858
|
/**
|
|
30848
|
-
* How
|
|
30859
|
+
* How many delivered frames the worker HOLDS at once, waiting for each one's
|
|
30860
|
+
* detection result.
|
|
30849
30861
|
*
|
|
30850
|
-
*
|
|
30851
|
-
*
|
|
30852
|
-
*
|
|
30853
|
-
*
|
|
30854
|
-
*
|
|
30862
|
+
* This replaced a TTL on 2026-08-13, and the replacement is the whole point:
|
|
30863
|
+
* a time window was never related to the event the pixels were waiting for.
|
|
30864
|
+
* A held frame now lives from delivery until the runner has its `FrameResult`
|
|
30865
|
+
* — at which moment the runner cuts the subject tiles it actually wanted and
|
|
30866
|
+
* releases the frame. The bound exists only so a runner that stops answering
|
|
30867
|
+
* cannot pin RAM: above it the OLDEST held frame is dropped and counted.
|
|
30868
|
+
*
|
|
30869
|
+
* Sizing: the steady state is `inferenceLatency × deliveredFps`, measured at
|
|
30870
|
+
* 40-160 ms × ≤25 fps = 1-4 frames. The default leaves headroom for a hiccup
|
|
30871
|
+
* without ever approaching the old resident set (43 frames × 24.9 MB at 4K).
|
|
30872
|
+
* Raising it does not buy hit rate — it buys tolerance for a slow runner, and
|
|
30873
|
+
* `holdOverflow` on the metrics line is what says you need it.
|
|
30855
30874
|
*/
|
|
30856
|
-
|
|
30875
|
+
holdFrames: number().int().min(1).max(64),
|
|
30857
30876
|
/**
|
|
30858
30877
|
* Hard per-decode-worker RAM ceiling for retained native frames, in MB.
|
|
30859
30878
|
*
|
|
30860
|
-
*
|
|
30861
|
-
*
|
|
30862
|
-
*
|
|
30863
|
-
*
|
|
30864
|
-
*
|
|
30865
|
-
*
|
|
30866
|
-
* rather than giving RAM back — lower this knob if RAM is what you wanted.
|
|
30879
|
+
* Since 2026-08-13 this is a SAFETY ceiling and nothing else: `holdFrames`
|
|
30880
|
+
* is what decides how much is held, and the ceiling is the number above which
|
|
30881
|
+
* something is wrong. Before that it was the effective cap — at 1024 MB with
|
|
30882
|
+
* a 2 800 ms TTL a 4K camera sat pinned at `leaseMb:1020, leaseFrames:43`
|
|
30883
|
+
* with the TTL expiring nothing, which is exactly the confusion the hold
|
|
30884
|
+
* removes. `leaseMb` / `leaseFrames` still say what is resident.
|
|
30867
30885
|
* `0` DISABLES the lease entirely and falls the worker back to the tiny
|
|
30868
30886
|
* leak-prone GPU surface ring (~85% crop miss; that is what the lease exists
|
|
30869
30887
|
* to replace).
|
|
@@ -30889,22 +30907,45 @@ object({
|
|
|
30889
30907
|
* there is the signal that some caller names frames outside the inference set
|
|
30890
30908
|
* and that this must go back to `all`.
|
|
30891
30909
|
*/
|
|
30892
|
-
admission: NativeLeaseAdmissionSchema
|
|
30910
|
+
admission: NativeLeaseAdmissionSchema,
|
|
30911
|
+
/**
|
|
30912
|
+
* RAM ceiling per decode worker, in MB, for the SUBJECT TILES — the
|
|
30913
|
+
* compressed native crops the worker cuts at the moment a frame's detection
|
|
30914
|
+
* result arrives, and keeps long after the frame itself is freed.
|
|
30915
|
+
*
|
|
30916
|
+
* This is the knob that replaced the old retention window, and it buys about
|
|
30917
|
+
* three orders of magnitude more of it: a tile is one subject at native
|
|
30918
|
+
* resolution, JPEG-encoded (~60-120 KB on a 4K person), against ~24.9 MB for
|
|
30919
|
+
* the frame it was cut from. A frame on which nothing was detected costs
|
|
30920
|
+
* nothing at all, which is the real change — the old lease paid per FRAME and
|
|
30921
|
+
* was interrogated per SUBJECT.
|
|
30922
|
+
*
|
|
30923
|
+
* `0` DISABLES tiles, leaving only the hold window and the ≤640 RAM
|
|
30924
|
+
* fallback — i.e. the pre-2026-08-13 miss profile. Set it there only to
|
|
30925
|
+
* reproduce that.
|
|
30926
|
+
*/
|
|
30927
|
+
tileBudgetMb: number().int().min(0).max(1024)
|
|
30893
30928
|
});
|
|
30894
30929
|
/**
|
|
30895
|
-
* The values in force when the operator has set nothing
|
|
30896
|
-
*
|
|
30897
|
-
*
|
|
30930
|
+
* The values in force when the operator has set nothing.
|
|
30931
|
+
*
|
|
30932
|
+
* `budgetMb` stays at 1024 on the day the hold landed, deliberately: it stopped
|
|
30933
|
+
* being the retention window and became the OOM ceiling, and lowering a ceiling
|
|
30934
|
+
* in the same change that redefines it would make a regression and a retune
|
|
30935
|
+
* indistinguishable. Cut it once `tileHits` / `holdOverflow` have been read on
|
|
30936
|
+
* live traffic.
|
|
30898
30937
|
*/
|
|
30899
30938
|
var DEFAULT_NATIVE_LEASE_SETTINGS = {
|
|
30900
|
-
|
|
30939
|
+
holdFrames: 8,
|
|
30901
30940
|
budgetMb: 1024,
|
|
30902
30941
|
activityMs: 15e3,
|
|
30942
|
+
tileBudgetMb: 64,
|
|
30903
30943
|
admission: "inferred"
|
|
30904
30944
|
};
|
|
30905
|
-
DEFAULT_NATIVE_LEASE_SETTINGS.
|
|
30945
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.holdFrames;
|
|
30906
30946
|
DEFAULT_NATIVE_LEASE_SETTINGS.budgetMb;
|
|
30907
30947
|
DEFAULT_NATIVE_LEASE_SETTINGS.activityMs;
|
|
30948
|
+
DEFAULT_NATIVE_LEASE_SETTINGS.tileBudgetMb;
|
|
30908
30949
|
DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
30909
30950
|
/**
|
|
30910
30951
|
* Fixed-capacity ring buffer. When full, push() overwrites the oldest entry.
|