homebridge-unifi-protect 7.14.0 → 7.16.0
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/devices/protect-camera-package.d.ts +2 -2
- package/dist/devices/protect-camera-package.js +1 -1
- package/dist/devices/protect-camera-package.js.map +1 -1
- package/dist/devices/protect-camera.d.ts +5 -5
- package/dist/devices/protect-camera.js +40 -17
- package/dist/devices/protect-camera.js.map +1 -1
- package/dist/devices/protect-chime.d.ts +3 -3
- package/dist/devices/protect-device.d.ts +8 -7
- package/dist/devices/protect-device.js.map +1 -1
- package/dist/devices/protect-doorbell.d.ts +3 -3
- package/dist/devices/protect-doorbell.js +2 -2
- package/dist/devices/protect-doorbell.js.map +1 -1
- package/dist/devices/protect-light.d.ts +3 -3
- package/dist/devices/protect-light.js +2 -2
- package/dist/devices/protect-light.js.map +1 -1
- package/dist/devices/protect-liveviews.d.ts +1 -1
- package/dist/devices/protect-liveviews.js.map +1 -1
- package/dist/devices/protect-nvr-systeminfo.d.ts +1 -1
- package/dist/devices/protect-nvr-systeminfo.js.map +1 -1
- package/dist/devices/protect-securitysystem.d.ts +2 -2
- package/dist/devices/protect-sensor.d.ts +3 -3
- package/dist/devices/protect-viewer.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/protect-events.d.ts +4 -4
- package/dist/protect-events.js.map +1 -1
- package/dist/protect-livestream.d.ts +5 -4
- package/dist/protect-livestream.js +29 -15
- package/dist/protect-livestream.js.map +1 -1
- package/dist/protect-nvr.d.ts +7 -6
- package/dist/protect-nvr.js +7 -5
- package/dist/protect-nvr.js.map +1 -1
- package/dist/protect-options.d.ts +1 -1
- package/dist/protect-options.js +2 -1
- package/dist/protect-options.js.map +1 -1
- package/dist/protect-platform.d.ts +3 -7
- package/dist/protect-platform.js +2 -44
- package/dist/protect-platform.js.map +1 -1
- package/dist/protect-record.d.ts +5 -3
- package/dist/protect-record.js +11 -8
- package/dist/protect-record.js.map +1 -1
- package/dist/protect-snapshot.d.ts +4 -4
- package/dist/protect-snapshot.js +8 -9
- package/dist/protect-snapshot.js.map +1 -1
- package/dist/protect-stream.d.ts +6 -6
- package/dist/protect-stream.js +101 -58
- package/dist/protect-stream.js.map +1 -1
- package/dist/protect-timeshift.d.ts +3 -3
- package/dist/protect-timeshift.js +1 -1
- package/dist/protect-timeshift.js.map +1 -1
- package/dist/protect-types.d.ts +2 -2
- package/dist/settings.d.ts +0 -2
- package/dist/settings.js +0 -4
- package/dist/settings.js.map +1 -1
- package/homebridge-ui/public/lib/featureoptions.js +65 -6
- package/homebridge-ui/public/lib/featureoptions.js.map +1 -1
- package/homebridge-ui/public/lib/webUi-featureoptions.mjs +4 -4
- package/package.json +6 -6
- package/dist/ffmpeg/index.d.ts +0 -6
- package/dist/ffmpeg/index.js +0 -11
- package/dist/ffmpeg/index.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg-codecs.d.ts +0 -22
- package/dist/ffmpeg/protect-ffmpeg-codecs.js +0 -189
- package/dist/ffmpeg/protect-ffmpeg-codecs.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg-exec.d.ts +0 -15
- package/dist/ffmpeg/protect-ffmpeg-exec.js +0 -58
- package/dist/ffmpeg/protect-ffmpeg-exec.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg-options.d.ts +0 -33
- package/dist/ffmpeg/protect-ffmpeg-options.js +0 -555
- package/dist/ffmpeg/protect-ffmpeg-options.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg-record.d.ts +0 -15
- package/dist/ffmpeg/protect-ffmpeg-record.js +0 -246
- package/dist/ffmpeg/protect-ffmpeg-record.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg-stream.d.ts +0 -17
- package/dist/ffmpeg/protect-ffmpeg-stream.js +0 -102
- package/dist/ffmpeg/protect-ffmpeg-stream.js.map +0 -1
- package/dist/ffmpeg/protect-ffmpeg.d.ts +0 -35
- package/dist/ffmpeg/protect-ffmpeg.js +0 -238
- package/dist/ffmpeg/protect-ffmpeg.js.map +0 -1
|
@@ -1,12 +1,71 @@
|
|
|
1
|
+
/* Copyright(C) 2017-2025, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* featureoptions.ts: Hierarchical feature option capabilities for use in plugins and applications.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* FeatureOptions provides a hierarchical feature option system for plugins and applications.
|
|
7
|
+
*
|
|
8
|
+
* Supports global, controller, and device-level configuration, value-centric feature options, grouping, and category management.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```ts
|
|
13
|
+
* // Define categories and options.
|
|
14
|
+
* const categories = [
|
|
15
|
+
*
|
|
16
|
+
* { name: "motion", description: "Motion Options" },
|
|
17
|
+
* { name: "audio", description: "Audio Options" }
|
|
18
|
+
* ];
|
|
19
|
+
*
|
|
20
|
+
* const options = {
|
|
21
|
+
*
|
|
22
|
+
* motion: [
|
|
23
|
+
* { name: "detect", default: true, description: "Enable motion detection." }
|
|
24
|
+
* ],
|
|
25
|
+
*
|
|
26
|
+
* audio: [
|
|
27
|
+
* { name: "volume", default: false, defaultValue: 50, description: "Audio volume." }
|
|
28
|
+
* ]
|
|
29
|
+
* };
|
|
30
|
+
*
|
|
31
|
+
* // Instantiate FeatureOptions.
|
|
32
|
+
* const featureOpts = new FeatureOptions(categories, options, ["Enable.motion.detect"]);
|
|
33
|
+
*
|
|
34
|
+
* // Check if a feature is enabled.
|
|
35
|
+
* const motionEnabled = featureOpts.test("motion.detect");
|
|
36
|
+
*
|
|
37
|
+
* // Get a value-centric feature option.
|
|
38
|
+
* const volume = featureOpts.value("audio.volume");
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* @see FeatureOptionEntry
|
|
42
|
+
* @see FeatureCategoryEntry
|
|
43
|
+
* @see OptionScope
|
|
44
|
+
*/
|
|
1
45
|
export class FeatureOptions {
|
|
46
|
+
/**
|
|
47
|
+
* Default return value for unknown options (defaults to false).
|
|
48
|
+
*/
|
|
49
|
+
defaultReturnValue;
|
|
2
50
|
_categories;
|
|
3
51
|
_configuredOptions;
|
|
4
52
|
_groups;
|
|
5
53
|
_options;
|
|
6
|
-
defaultReturnValue;
|
|
7
54
|
defaults;
|
|
8
55
|
valueOptions;
|
|
9
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Create a new FeatureOptions instance.
|
|
58
|
+
*
|
|
59
|
+
* @param categories - Array of feature option categories.
|
|
60
|
+
* @param options - Dictionary mapping category names to arrays of feature options.
|
|
61
|
+
* @param configuredOptions - Optional. Array of currently configured option strings.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
*
|
|
65
|
+
* ```ts
|
|
66
|
+
* const featureOpts = new FeatureOptions(categories, options, ["Enable.motion.detect"]);
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
10
69
|
constructor(categories, options, configuredOptions = []) {
|
|
11
70
|
// Initialize our defaults.
|
|
12
71
|
this._categories = [];
|
|
@@ -200,9 +259,9 @@ export class FeatureOptions {
|
|
|
200
259
|
// Check to see if we have a device-level value first.
|
|
201
260
|
if (device) {
|
|
202
261
|
const value = getValue(option, device);
|
|
203
|
-
// The option
|
|
262
|
+
// The option's been explicitly disabled.
|
|
204
263
|
if (value === null) {
|
|
205
|
-
return
|
|
264
|
+
return null;
|
|
206
265
|
}
|
|
207
266
|
if (value) {
|
|
208
267
|
return value;
|
|
@@ -213,7 +272,7 @@ export class FeatureOptions {
|
|
|
213
272
|
const value = getValue(option, controller);
|
|
214
273
|
// The option's been explicitly disabled.
|
|
215
274
|
if (value === null) {
|
|
216
|
-
return
|
|
275
|
+
return null;
|
|
217
276
|
}
|
|
218
277
|
if (value) {
|
|
219
278
|
return value;
|
|
@@ -242,7 +301,7 @@ export class FeatureOptions {
|
|
|
242
301
|
/**
|
|
243
302
|
* Set the list of available feature option categories.
|
|
244
303
|
*
|
|
245
|
-
* @param
|
|
304
|
+
* @param category - Array of available categories.
|
|
246
305
|
*/
|
|
247
306
|
set categories(category) {
|
|
248
307
|
this._categories = category;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureoptions.js","sourceRoot":"","sources":["../src/featureoptions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"featureoptions.js","sourceRoot":"","sources":["../src/featureoptions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwDH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAO,cAAc;IAEzB;;OAEG;IACI,kBAAkB,CAAU;IAE3B,WAAW,CAAyB;IACpC,kBAAkB,CAAW;IAC7B,OAAO,CAAgC;IACvC,QAAQ,CAA4C;IACpD,QAAQ,CAA+B;IACvC,YAAY,CAAmD;IAEvE;;;;;;;;;;;;OAYG;IACH,YAAY,UAAkC,EAAE,OAAkD,EAAE,iBAAiB,GAAG,EAAE;QAExH,2BAA2B;QAC3B,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,IAAI,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;IAC/B,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,MAAc,EAAE,MAAe,EAAE,UAAmB;QAE/D,QAAO,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CA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We emulate the styles that Bootstrap uses when hovering over a table, accounting for both light and dark modes.
|
|
160
|
-
overrideStyles.innerHTML += "@media (prefers-color-scheme: dark) { .
|
|
161
|
-
"@media (prefers-color-scheme: light) { .
|
|
160
|
+
overrideStyles.innerHTML += "@media (prefers-color-scheme: dark) { .hbpu-hover td:hover { background-color: #212121; color: #FFA000 !important } }" +
|
|
161
|
+
"@media (prefers-color-scheme: light) { .hbpu-hover td:hover { background-color: #ECECEC; } }";
|
|
162
162
|
|
|
163
163
|
document.head.appendChild(overrideStyles);
|
|
164
164
|
|
|
165
165
|
// Add our hover styles to the controllers and devices tables.
|
|
166
|
-
controllersTable.classList.add("
|
|
167
|
-
this.devicesTable.classList.add("
|
|
166
|
+
controllersTable.classList.add("hbpu-hover");
|
|
167
|
+
this.devicesTable.classList.add("hbpu-hover");
|
|
168
168
|
|
|
169
169
|
// Hide the UI until we're ready.
|
|
170
170
|
document.getElementById("sidebar").style.display = "none";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-unifi-protect",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.16.0",
|
|
4
4
|
"displayName": "Homebridge UniFi Protect",
|
|
5
5
|
"description": "Homebridge UniFi Protect plugin providing complete HomeKit integration for the UniFi Protect ecosystem with full support for most features including autoconfiguration, motion detection, multiple controllers, and realtime updates.",
|
|
6
6
|
"author": {
|
|
@@ -77,19 +77,19 @@
|
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@homebridge/plugin-ui-utils": "2.0.2",
|
|
79
79
|
"ffmpeg-for-homebridge": "^2.1.7",
|
|
80
|
-
"homebridge-plugin-utils": "^1.
|
|
80
|
+
"homebridge-plugin-utils": "^1.16.0",
|
|
81
81
|
"unifi-protect": "^4.21.0",
|
|
82
|
-
"ws": "8.18.
|
|
82
|
+
"ws": "8.18.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@stylistic/eslint-plugin": "4.2.0",
|
|
86
|
-
"@types/node": "22.
|
|
86
|
+
"@types/node": "22.15.18",
|
|
87
87
|
"@types/ws": "8.18.1",
|
|
88
|
-
"eslint": "9.
|
|
88
|
+
"eslint": "9.27.0",
|
|
89
89
|
"homebridge": "1.9.0",
|
|
90
90
|
"shx": "0.4.0",
|
|
91
91
|
"typescript": "5.8.3",
|
|
92
|
-
"typescript-eslint": "8.
|
|
92
|
+
"typescript-eslint": "8.32.1"
|
|
93
93
|
},
|
|
94
94
|
"optionalDependencies": {
|
|
95
95
|
"bufferutil": "4.0.9"
|
package/dist/ffmpeg/index.d.ts
DELETED
package/dist/ffmpeg/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/* Copyright(C) 2017-2025, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
|
-
*
|
|
3
|
-
* index.ts: Protect FFmpeg classes.
|
|
4
|
-
*/
|
|
5
|
-
export * from "./protect-ffmpeg.js";
|
|
6
|
-
export * from "./protect-ffmpeg-codecs.js";
|
|
7
|
-
export * from "./protect-ffmpeg-exec.js";
|
|
8
|
-
export * from "./protect-ffmpeg-options.js";
|
|
9
|
-
export * from "./protect-ffmpeg-record.js";
|
|
10
|
-
export * from "./protect-ffmpeg-stream.js";
|
|
11
|
-
//# sourceMappingURL=index.js.map
|
package/dist/ffmpeg/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ffmpeg/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,qBAAqB,CAAC;AACpC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ProtectPlatform } from "../protect-platform.js";
|
|
2
|
-
export declare class FfmpegCodecs {
|
|
3
|
-
private _gpuMem;
|
|
4
|
-
private _ffmpegVersion;
|
|
5
|
-
private readonly log;
|
|
6
|
-
private readonly platform;
|
|
7
|
-
private readonly ffmpegExec;
|
|
8
|
-
private readonly ffmpegCodecs;
|
|
9
|
-
private readonly ffmpegHwAccels;
|
|
10
|
-
constructor(platform: ProtectPlatform);
|
|
11
|
-
probe(): Promise<boolean>;
|
|
12
|
-
hasDecoder(codec: string, decoder: string): boolean;
|
|
13
|
-
hasEncoder(codec: string, encoder: string): boolean;
|
|
14
|
-
hasHwAccel(accel: string): boolean;
|
|
15
|
-
get gpuMem(): number;
|
|
16
|
-
get ffmpegVersion(): string;
|
|
17
|
-
private probeFfmpegVersion;
|
|
18
|
-
private probeFfmpegHwAccel;
|
|
19
|
-
private probeFfmpegCodecs;
|
|
20
|
-
private probeRpiGpuMem;
|
|
21
|
-
private probeCmd;
|
|
22
|
-
}
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import process from "node:process";
|
|
4
|
-
import util from "node:util";
|
|
5
|
-
export class FfmpegCodecs {
|
|
6
|
-
_gpuMem;
|
|
7
|
-
_ffmpegVersion;
|
|
8
|
-
log;
|
|
9
|
-
platform;
|
|
10
|
-
ffmpegExec;
|
|
11
|
-
ffmpegCodecs;
|
|
12
|
-
ffmpegHwAccels;
|
|
13
|
-
constructor(platform) {
|
|
14
|
-
this._gpuMem = 0;
|
|
15
|
-
this._ffmpegVersion = "";
|
|
16
|
-
this.log = platform.log;
|
|
17
|
-
this.platform = platform;
|
|
18
|
-
this.ffmpegExec = platform.config.videoProcessor;
|
|
19
|
-
this.ffmpegCodecs = {};
|
|
20
|
-
this.ffmpegHwAccels = {};
|
|
21
|
-
}
|
|
22
|
-
// Launch our configured controllers once all accessories have been loaded. Once we do, they will sustain themselves.
|
|
23
|
-
async probe() {
|
|
24
|
-
// Let's conduct our system-specific capability probes.
|
|
25
|
-
switch (this.platform.hostSystem) {
|
|
26
|
-
case "raspbian":
|
|
27
|
-
// If we're on a Raspberry Pi, let's verify that we have enough GPU memory for hardware-based decoding and encoding.
|
|
28
|
-
await this.probeRpiGpuMem();
|
|
29
|
-
break;
|
|
30
|
-
default:
|
|
31
|
-
break;
|
|
32
|
-
}
|
|
33
|
-
// Capture the version information of FFmpeg.
|
|
34
|
-
if (!(await this.probeFfmpegVersion())) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
// Ensure we've got a working video processor before we do anything else.
|
|
38
|
-
if (!(await this.probeFfmpegCodecs()) || !(await this.probeFfmpegHwAccel())) {
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
// Utility to determine whether or not a specific decoder is available to the video processor for a given format.
|
|
44
|
-
hasDecoder(codec, decoder) {
|
|
45
|
-
// Normalize our lookups.
|
|
46
|
-
codec = codec.toLowerCase();
|
|
47
|
-
decoder = decoder.toLowerCase();
|
|
48
|
-
return this.ffmpegCodecs[codec]?.decoders.some(x => x === decoder);
|
|
49
|
-
}
|
|
50
|
-
// Utility to determine whether or not a specific encoder is available to the video processor for a given format.
|
|
51
|
-
hasEncoder(codec, encoder) {
|
|
52
|
-
// Normalize our lookups.
|
|
53
|
-
codec = codec.toLowerCase();
|
|
54
|
-
encoder = encoder.toLowerCase();
|
|
55
|
-
return this.ffmpegCodecs[codec]?.encoders.some(x => x === encoder);
|
|
56
|
-
}
|
|
57
|
-
// Utility to determine whether or not a specific decoder is available to the video processor for a given format.
|
|
58
|
-
hasHwAccel(accel) {
|
|
59
|
-
return this.ffmpegHwAccels[accel.toLowerCase()] ? true : false;
|
|
60
|
-
}
|
|
61
|
-
// Utility that returns the amount of GPU memory available to us.
|
|
62
|
-
get gpuMem() {
|
|
63
|
-
return this._gpuMem;
|
|
64
|
-
}
|
|
65
|
-
get ffmpegVersion() {
|
|
66
|
-
return this._ffmpegVersion;
|
|
67
|
-
}
|
|
68
|
-
async probeFfmpegVersion() {
|
|
69
|
-
return this.probeCmd(this.ffmpegExec, ["-hide_banner", "-version"], (stdout) => {
|
|
70
|
-
// A regular expression to parse out the version.
|
|
71
|
-
const versionRegex = /^ffmpeg version (.*) Copyright.*$/m;
|
|
72
|
-
// Parse out the version string.
|
|
73
|
-
const versionMatch = versionRegex.exec(stdout);
|
|
74
|
-
// If we have a version string, let's save it. Otherwise, we're blind.
|
|
75
|
-
this._ffmpegVersion = versionMatch ? versionMatch[1] : "unknown";
|
|
76
|
-
this.log.info("Using FFmpeg version: %s.", this.ffmpegVersion);
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
// Probe our video processor's hardware acceleration capabilities.
|
|
80
|
-
async probeFfmpegHwAccel() {
|
|
81
|
-
if (!(await this.probeCmd(this.ffmpegExec, ["-hide_banner", "-hwaccels"], (stdout) => {
|
|
82
|
-
// Iterate through each line, and a build a list of encoders.
|
|
83
|
-
for (const accel of stdout.split(os.EOL)) {
|
|
84
|
-
// Skip blank lines.
|
|
85
|
-
if (!accel.length) {
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
// Skip the first line.
|
|
89
|
-
if (accel === "Hardware acceleration methods:") {
|
|
90
|
-
continue;
|
|
91
|
-
}
|
|
92
|
-
// We've found a hardware acceleration method, let's add it.
|
|
93
|
-
this.ffmpegHwAccels[accel.toLowerCase()] = true;
|
|
94
|
-
}
|
|
95
|
-
}))) {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
// Let's test to ensure that just because we have a codec or capability available to us, it doesn't necessarily mean that the user has the hardware capabilities
|
|
99
|
-
// needed to use it, resulting in an FFmpeg error. We catch that here and prevent those capabilities from being exposed to HBUP unless both software and hardware
|
|
100
|
-
// capabilities enable it. This simple test, generates a one-second video that is processed by the requested codec. If it fails, we discard the codec.
|
|
101
|
-
for (const accel of Object.keys(this.ffmpegHwAccels)) {
|
|
102
|
-
// eslint-disable-next-line no-await-in-loop
|
|
103
|
-
if (!(await this.probeCmd(this.ffmpegExec, [
|
|
104
|
-
"-hide_banner", "-hwaccel", accel, "-v", "quiet", "-t", "1", "-f", "lavfi", "-i", "color=black:1920x1080", "-c:v", "libx264", "-f", "null", "-"
|
|
105
|
-
], () => { }, true))) {
|
|
106
|
-
delete this.ffmpegHwAccels[accel];
|
|
107
|
-
if (this.platform.verboseFfmpeg) {
|
|
108
|
-
this.log.error("Hardware-accelerated decoding and encoding using %s will be unavailable: unable to successfully validate capabilities.", accel);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return true;
|
|
113
|
-
}
|
|
114
|
-
// Probe our video processor's encoding and decoding capabilities.
|
|
115
|
-
async probeFfmpegCodecs() {
|
|
116
|
-
return this.probeCmd(this.ffmpegExec, ["-hide_banner", "-codecs"], (stdout) => {
|
|
117
|
-
// A regular expression to parse out the codec and it's supported decoders.
|
|
118
|
-
const decodersRegex = /\S+\s+(\S+).+\(decoders: (.*?)\s*\)/;
|
|
119
|
-
// A regular expression to parse out the codec and it's supported encoders.
|
|
120
|
-
const encodersRegex = /\S+\s+(\S+).+\(encoders: (.*?)\s*\)/;
|
|
121
|
-
// Iterate through each line, and a build a list of encoders.
|
|
122
|
-
for (const codecLine of stdout.split(os.EOL)) {
|
|
123
|
-
// Let's see if we have decoders.
|
|
124
|
-
const decodersMatch = decodersRegex.exec(codecLine);
|
|
125
|
-
// Let's see if we have encoders.
|
|
126
|
-
const encodersMatch = encodersRegex.exec(codecLine);
|
|
127
|
-
// If we found decoders, add them to our list of supported decoders for this format.
|
|
128
|
-
if (decodersMatch) {
|
|
129
|
-
this.ffmpegCodecs[decodersMatch[1]] = { decoders: [], encoders: [] };
|
|
130
|
-
this.ffmpegCodecs[decodersMatch[1]].decoders = decodersMatch[2].split(" ").map(x => x.toLowerCase());
|
|
131
|
-
}
|
|
132
|
-
// If we found decoders, add them to our list of supported decoders for this format.
|
|
133
|
-
if (encodersMatch) {
|
|
134
|
-
if (!this.ffmpegCodecs[encodersMatch[1]]) {
|
|
135
|
-
this.ffmpegCodecs[encodersMatch[1]] = { decoders: [], encoders: [] };
|
|
136
|
-
}
|
|
137
|
-
this.ffmpegCodecs[encodersMatch[1]].encoders = encodersMatch[2].split(" ").map(x => x.toLowerCase());
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
// Probe Raspberry Pi GPU.
|
|
143
|
-
async probeRpiGpuMem() {
|
|
144
|
-
return this.probeCmd("vcgencmd", ["get_mem", "gpu"], (stdout) => {
|
|
145
|
-
// A regular expression to parse out the configured GPU memory on the Raspberry Pi.
|
|
146
|
-
const gpuRegex = /^gpu=(.*)M\n$/;
|
|
147
|
-
// Let's see what we've got.
|
|
148
|
-
const gpuMatch = gpuRegex.exec(stdout);
|
|
149
|
-
// We matched what we're looking for.
|
|
150
|
-
if (gpuMatch) {
|
|
151
|
-
// Parse the result and retrieve our allocated GPU memory.
|
|
152
|
-
this._gpuMem = parseInt(gpuMatch[1]);
|
|
153
|
-
// Something went wrong.
|
|
154
|
-
if (isNaN(this._gpuMem)) {
|
|
155
|
-
this._gpuMem = 0;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
// Utility to probe the capabilities of FFmpeg and the host platform.
|
|
161
|
-
async probeCmd(command, commandLineArgs, processOutput, quietRunErrors = false) {
|
|
162
|
-
try {
|
|
163
|
-
// Promisify exec to allow us to wait for it asynchronously.
|
|
164
|
-
const execAsync = util.promisify(execFile);
|
|
165
|
-
// Check for the codecs in our video processor.
|
|
166
|
-
const { stdout } = await execAsync(command, commandLineArgs);
|
|
167
|
-
processOutput(stdout);
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
// It's really a SystemError, but Node hides that type from us for esoteric reasons.
|
|
172
|
-
if (error instanceof Error) {
|
|
173
|
-
const execError = error;
|
|
174
|
-
if (execError.code === "ENOENT") {
|
|
175
|
-
this.log.error("Unable to find '%s' in path: '%s'.", command, process.env.PATH);
|
|
176
|
-
}
|
|
177
|
-
else if (quietRunErrors) {
|
|
178
|
-
return false;
|
|
179
|
-
}
|
|
180
|
-
else {
|
|
181
|
-
this.log.error("Error running %s: %s", command, error.message);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
this.log.error("Unable to probe the capabilities of your Homebridge host without access to '%s'. Ensure that it is available in your path and correctly working.", command);
|
|
185
|
-
return false;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
//# sourceMappingURL=protect-ffmpeg-codecs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protect-ffmpeg-codecs.js","sourceRoot":"","sources":["../../src/ffmpeg/protect-ffmpeg-codecs.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,OAAO,YAAY;IAEf,OAAO,CAAS;IAChB,cAAc,CAAS;IACd,GAAG,CAAU;IACb,QAAQ,CAAkB;IAC1B,UAAU,CAAS;IACnB,YAAY,CAAkE;IAC9E,cAAc,CAA+B;IAE9D,YAAY,QAAyB;QAEnC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACjB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,cAAc,CAAC;QACjD,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,qHAAqH;IAC9G,KAAK,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AAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAClF,CAAC;qBAAM,IAAG,cAAc,EAAE,CAAC;oBAEzB,OAAO,KAAK,CAAC;gBACf,CAAC;qBAAM,CAAC;oBAEN,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,sBAAsB,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;gBACjE,CAAC;YACH,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,kJAAkJ,EAC/J,OAAO,CAAC,CAAC;YAEX,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FfmpegProcess } from "./protect-ffmpeg.js";
|
|
2
|
-
import { Nullable } from "homebridge-plugin-utils";
|
|
3
|
-
import { ProtectCamera } from "../devices/index.js";
|
|
4
|
-
type ProcessResult = {
|
|
5
|
-
exitCode: Nullable<number>;
|
|
6
|
-
stderr: Buffer;
|
|
7
|
-
stdout: Buffer;
|
|
8
|
-
};
|
|
9
|
-
export declare class FfmpegExec extends FfmpegProcess {
|
|
10
|
-
private isLoggingErrors;
|
|
11
|
-
constructor(protectCamera: ProtectCamera, commandLineArgs?: string[], logErrors?: boolean);
|
|
12
|
-
exec(stdinData?: Buffer): Promise<Nullable<ProcessResult>>;
|
|
13
|
-
protected logFfmpegError(exitCode: number, signal: NodeJS.Signals): void;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/* Copyright(C) 2017-2025, HJD (https://github.com/hjdhjd). All rights reserved.
|
|
2
|
-
*
|
|
3
|
-
* protect-ffmpeg-exec.ts: Execute arbitrary FFmpeg commands and return the results.
|
|
4
|
-
*
|
|
5
|
-
*/
|
|
6
|
-
import { FfmpegProcess } from "./protect-ffmpeg.js";
|
|
7
|
-
export class FfmpegExec extends FfmpegProcess {
|
|
8
|
-
isLoggingErrors;
|
|
9
|
-
constructor(protectCamera, commandLineArgs, logErrors = true) {
|
|
10
|
-
// Initialize our parent.
|
|
11
|
-
super(protectCamera, commandLineArgs);
|
|
12
|
-
// We want to log errors when they occur.
|
|
13
|
-
this.isLoggingErrors = logErrors;
|
|
14
|
-
}
|
|
15
|
-
// Run the FFmpeg process and return the result.
|
|
16
|
-
async exec(stdinData) {
|
|
17
|
-
return new Promise((resolve) => {
|
|
18
|
-
this.start();
|
|
19
|
-
if (this.process === null) {
|
|
20
|
-
this.log.error("Unable to execute command.");
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
|
-
// Write data to stdin and close
|
|
24
|
-
if (stdinData) {
|
|
25
|
-
this.process.stdin.end(stdinData);
|
|
26
|
-
}
|
|
27
|
-
const stderr = [];
|
|
28
|
-
const stdout = [];
|
|
29
|
-
// Read standard output and standard error into buffers.
|
|
30
|
-
this.process.stderr.on("data", (chunk) => stderr.push(chunk));
|
|
31
|
-
this.process.stdout.on("data", (chunk) => stdout.push(chunk));
|
|
32
|
-
// We prepend this listener to ensure we can properly cleanup after ourselves.
|
|
33
|
-
this.process.prependOnceListener("exit", () => {
|
|
34
|
-
// Trigger our process cleanup activities.
|
|
35
|
-
this.stop();
|
|
36
|
-
});
|
|
37
|
-
// Return when process is done.
|
|
38
|
-
this.process.once("exit", (exitCode) => {
|
|
39
|
-
// Return the output and results.
|
|
40
|
-
resolve({
|
|
41
|
-
exitCode,
|
|
42
|
-
stderr: Buffer.concat(stderr),
|
|
43
|
-
stdout: Buffer.concat(stdout)
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
// Log errors.
|
|
49
|
-
logFfmpegError(exitCode, signal) {
|
|
50
|
-
// If we're ignoring errors, we're done.
|
|
51
|
-
if (!this.isLoggingErrors) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
// Otherwise, revert to our default logging in our parent.
|
|
55
|
-
super.logFfmpegError(exitCode, signal);
|
|
56
|
-
}
|
|
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AAa,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAEtE,8EAA8E;YAC9E,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE;gBAE5C,0CAA0C;gBAC1C,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;YAEH,+BAA+B;YAC/B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAErC,iCAAiC;gBACjC,OAAO,CAAC;oBAEN,QAAQ;oBACR,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;oBAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC;iBAC9B,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAED,cAAc;IACJ,cAAc,CAAC,QAAgB,EAAE,MAAsB;QAE/D,wCAAwC;QACxC,IAAG,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YAEzB,OAAO;QACT,CAAC;QAED,0DAA0D;QAC1D,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;CAEF"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { H264Level, H264Profile } from "homebridge";
|
|
2
|
-
import { ProtectCamera } from "../devices/index.js";
|
|
3
|
-
interface EncoderOptions {
|
|
4
|
-
bitrate: number;
|
|
5
|
-
fps: number;
|
|
6
|
-
height: number;
|
|
7
|
-
idrInterval: number;
|
|
8
|
-
inputFps: number;
|
|
9
|
-
level: H264Level;
|
|
10
|
-
profile: H264Profile;
|
|
11
|
-
useSmartQuality?: boolean;
|
|
12
|
-
width: number;
|
|
13
|
-
}
|
|
14
|
-
export declare class FfmpegOptions {
|
|
15
|
-
private readonly hwPixelFormat;
|
|
16
|
-
private readonly log;
|
|
17
|
-
private readonly platform;
|
|
18
|
-
private readonly protectCamera;
|
|
19
|
-
constructor(protectCamera: ProtectCamera);
|
|
20
|
-
private configureHwAccel;
|
|
21
|
-
get audioEncoder(): string[];
|
|
22
|
-
get audioDecoder(): string;
|
|
23
|
-
get videoDecoder(): string[];
|
|
24
|
-
get cropFilter(): string;
|
|
25
|
-
private defaultVideoEncoderOptions;
|
|
26
|
-
recordEncoder(options: EncoderOptions): string[];
|
|
27
|
-
streamEncoder(options: EncoderOptions): string[];
|
|
28
|
-
get recordingDefaultChannel(): string | undefined;
|
|
29
|
-
get hostSystemMaxPixels(): number;
|
|
30
|
-
private getH264Level;
|
|
31
|
-
private getH264Profile;
|
|
32
|
-
}
|
|
33
|
-
export {};
|