iobroker.eusec 1.1.0 → 1.1.2
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/README.md +13 -0
- package/admin/i18n/uk/translations.json +26 -0
- package/build/lib/interfaces.js +16 -2
- package/build/lib/interfaces.js.map +7 -1
- package/build/lib/log.js +70 -48
- package/build/lib/log.js.map +7 -1
- package/build/lib/tools.js +79 -84
- package/build/lib/tools.js.map +7 -1
- package/build/lib/types.js +92 -61
- package/build/lib/types.js.map +7 -1
- package/build/lib/utils.js +239 -234
- package/build/lib/utils.js.map +7 -1
- package/build/lib/video.js +243 -258
- package/build/lib/video.js.map +7 -1
- package/build/lib/web.js +58 -84
- package/build/lib/web.js.map +7 -1
- package/build/main.js +1177 -1421
- package/build/main.js.map +7 -1
- package/io-package.json +32 -4
- package/package.json +20 -42
package/build/lib/video.js
CHANGED
|
@@ -1,272 +1,257 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
4
11
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
+
var video_exports = {};
|
|
26
|
+
__export(video_exports, {
|
|
27
|
+
StreamInput: () => StreamInput,
|
|
28
|
+
StreamOutput: () => StreamOutput,
|
|
29
|
+
ffmpegPreviewImage: () => ffmpegPreviewImage,
|
|
30
|
+
ffmpegStreamToGo2rtc: () => ffmpegStreamToGo2rtc,
|
|
31
|
+
ffmpegStreamToHls: () => ffmpegStreamToHls
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(video_exports);
|
|
34
|
+
var import_net = __toESM(require("net"));
|
|
35
|
+
var import_path = __toESM(require("path"));
|
|
36
|
+
var import_fluent_ffmpeg = __toESM(require("@bropat/fluent-ffmpeg"));
|
|
37
|
+
var import_ffmpeg_static = __toESM(require("ffmpeg-static"));
|
|
38
|
+
var import_eufy_security_client = require("eufy-security-client");
|
|
39
|
+
var import_os = require("os");
|
|
40
|
+
var import_fs_extra = __toESM(require("fs-extra"));
|
|
41
|
+
var import_utils = require("./utils");
|
|
42
|
+
const _UniversalStream = class {
|
|
43
|
+
constructor(namespace, onSocket) {
|
|
44
|
+
let sockpath = "";
|
|
45
|
+
const unique_sock_id = (0, import_utils.lowestUnusedNumber)([..._UniversalStream.socks], 1);
|
|
46
|
+
_UniversalStream.socks.add(unique_sock_id);
|
|
47
|
+
this.sock_id = unique_sock_id;
|
|
48
|
+
if (process.platform === "win32") {
|
|
49
|
+
const pipePrefix = "\\\\.\\pipe\\";
|
|
50
|
+
const pipeName = `node-webrtc.${namespace}.${unique_sock_id}.sock`;
|
|
51
|
+
sockpath = import_path.default.join(pipePrefix, pipeName);
|
|
52
|
+
this.url = sockpath;
|
|
53
|
+
} else {
|
|
54
|
+
const pipeName = `${namespace}.${unique_sock_id}.sock`;
|
|
55
|
+
sockpath = import_path.default.join((0, import_os.tmpdir)(), pipeName);
|
|
56
|
+
this.url = "unix:" + sockpath;
|
|
57
|
+
try {
|
|
58
|
+
if (import_fs_extra.default.existsSync(sockpath))
|
|
59
|
+
import_fs_extra.default.unlinkSync(sockpath);
|
|
60
|
+
} catch (error) {
|
|
61
|
+
}
|
|
45
62
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
this.server = import_net.default.createServer(onSocket);
|
|
64
|
+
this.server.listen(sockpath);
|
|
65
|
+
}
|
|
66
|
+
close() {
|
|
67
|
+
if (this.server)
|
|
68
|
+
this.server.close();
|
|
69
|
+
_UniversalStream.socks.delete(this.sock_id);
|
|
70
|
+
}
|
|
50
71
|
};
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
let UniversalStream = _UniversalStream;
|
|
73
|
+
UniversalStream.socks = /* @__PURE__ */ new Set();
|
|
74
|
+
const StreamInput = function(namespace, stream) {
|
|
75
|
+
return new UniversalStream(namespace, (socket) => stream.pipe(socket, { end: true }));
|
|
54
76
|
};
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
catch (error) {
|
|
90
|
-
log.error(`ffmpegPreviewImage(): Error: ${error}`);
|
|
91
|
-
reject(error);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
77
|
+
const StreamOutput = function(namespace, stream) {
|
|
78
|
+
return new UniversalStream(namespace, (socket) => socket.pipe(stream, { end: true }));
|
|
79
|
+
};
|
|
80
|
+
const ffmpegPreviewImage = (config, input, output, log, skip_seconds = 2) => {
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
try {
|
|
83
|
+
if (import_ffmpeg_static.default) {
|
|
84
|
+
import_fluent_ffmpeg.default.setFfmpegPath(import_ffmpeg_static.default);
|
|
85
|
+
(0, import_fluent_ffmpeg.default)().withProcessOptions({
|
|
86
|
+
detached: true
|
|
87
|
+
}).addOptions([
|
|
88
|
+
`-ss ${skip_seconds}`,
|
|
89
|
+
"-frames:v 1"
|
|
90
|
+
]).input(input).inputFormat("hls").outputFormat("image2").output(output).on("error", function(err, stdout, stderr) {
|
|
91
|
+
log.error(`ffmpegPreviewImage(): An error occurred: ${err.message}`);
|
|
92
|
+
log.error(`ffmpegPreviewImage(): ffmpeg output:
|
|
93
|
+
${stdout}`);
|
|
94
|
+
log.error(`ffmpegPreviewImage(): ffmpeg stderr:
|
|
95
|
+
${stderr}`);
|
|
96
|
+
reject(err);
|
|
97
|
+
}).on("end", () => {
|
|
98
|
+
log.debug("ffmpegPreviewImage(): Preview image generated!");
|
|
99
|
+
resolve();
|
|
100
|
+
}).run();
|
|
101
|
+
} else {
|
|
102
|
+
reject(new Error("ffmpeg binary not found"));
|
|
103
|
+
}
|
|
104
|
+
} catch (error) {
|
|
105
|
+
log.error(`ffmpegPreviewImage(): Error: ${error}`);
|
|
106
|
+
reject(error);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
94
109
|
};
|
|
95
|
-
exports.ffmpegPreviewImage = ffmpegPreviewImage;
|
|
96
110
|
const ffmpegStreamToHls = (config, namespace, metadata, videoStream, audioStream, output, log) => {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
case eufy_security_client_1.AudioCodec.AAC:
|
|
133
|
-
audioFormat = "aac";
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
const command = (0, fluent_ffmpeg_1.default)()
|
|
137
|
-
.withProcessOptions({
|
|
138
|
-
detached: true
|
|
139
|
-
})
|
|
140
|
-
.input(uVideoStream.url)
|
|
141
|
-
.inputFormat(videoFormat)
|
|
142
|
-
.inputFps(metadata.videoFPS);
|
|
143
|
-
if (audioFormat !== "") {
|
|
144
|
-
command.input(uAudioStream.url)
|
|
145
|
-
.inputFormat(audioFormat)
|
|
146
|
-
.videoCodec("copy")
|
|
147
|
-
.audioCodec("copy");
|
|
148
|
-
options.push("-absf aac_adtstoasc");
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
log.warn(`ffmpegStreamToHls(): Not support audio codec or unknown audio codec (${eufy_security_client_1.AudioCodec[metadata.audioCodec]})`);
|
|
152
|
-
}
|
|
153
|
-
command.output(output)
|
|
154
|
-
.addOptions(options)
|
|
155
|
-
.on("error", function (err, stdout, stderr) {
|
|
156
|
-
log.error(`ffmpegStreamToHls(): An error occurred: ${err.message}`);
|
|
157
|
-
log.error(`ffmpegStreamToHls(): ffmpeg output:\n${stdout}`);
|
|
158
|
-
log.error(`ffmpegStreamToHls(): ffmpeg stderr:\n${stderr}`);
|
|
159
|
-
uVideoStream.close();
|
|
160
|
-
uAudioStream.close();
|
|
161
|
-
reject(err);
|
|
162
|
-
})
|
|
163
|
-
.on("end", () => {
|
|
164
|
-
log.debug("ffmpegStreamToHls(): Processing finished!");
|
|
165
|
-
uVideoStream.close();
|
|
166
|
-
uAudioStream.close();
|
|
167
|
-
resolve();
|
|
168
|
-
});
|
|
169
|
-
command.run();
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
reject(new Error("ffmpeg binary not found"));
|
|
173
|
-
}
|
|
111
|
+
return new Promise((resolve, reject) => {
|
|
112
|
+
try {
|
|
113
|
+
if (import_ffmpeg_static.default) {
|
|
114
|
+
import_fluent_ffmpeg.default.setFfmpegPath(import_ffmpeg_static.default);
|
|
115
|
+
videoStream.on("error", (error) => {
|
|
116
|
+
log.error("ffmpegStreamToHls(): Videostream Error", error);
|
|
117
|
+
});
|
|
118
|
+
audioStream.on("error", (error) => {
|
|
119
|
+
log.error("ffmpegStreamToHls(): Audiostream Error", error);
|
|
120
|
+
});
|
|
121
|
+
const uVideoStream = StreamInput(namespace, videoStream);
|
|
122
|
+
const uAudioStream = StreamInput(namespace, audioStream);
|
|
123
|
+
let videoFormat = "h264";
|
|
124
|
+
let audioFormat = "";
|
|
125
|
+
const options = [
|
|
126
|
+
"-hls_init_time 0",
|
|
127
|
+
"-hls_time 2",
|
|
128
|
+
"-hls_segment_type mpegts",
|
|
129
|
+
"-sc_threshold 0",
|
|
130
|
+
`-g ${metadata.videoFPS}`,
|
|
131
|
+
"-fflags genpts+nobuffer+flush_packets",
|
|
132
|
+
"-hls_playlist_type event"
|
|
133
|
+
];
|
|
134
|
+
switch (metadata.videoCodec) {
|
|
135
|
+
case import_eufy_security_client.VideoCodec.H264:
|
|
136
|
+
videoFormat = "h264";
|
|
137
|
+
break;
|
|
138
|
+
case import_eufy_security_client.VideoCodec.H265:
|
|
139
|
+
videoFormat = "hevc";
|
|
140
|
+
break;
|
|
141
|
+
}
|
|
142
|
+
switch (metadata.audioCodec) {
|
|
143
|
+
case import_eufy_security_client.AudioCodec.AAC:
|
|
144
|
+
audioFormat = "aac";
|
|
145
|
+
break;
|
|
174
146
|
}
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
147
|
+
const command = (0, import_fluent_ffmpeg.default)().withProcessOptions({
|
|
148
|
+
detached: true
|
|
149
|
+
}).input(uVideoStream.url).inputFormat(videoFormat).inputFps(metadata.videoFPS);
|
|
150
|
+
if (audioFormat !== "") {
|
|
151
|
+
command.input(uAudioStream.url).inputFormat(audioFormat).videoCodec("copy").audioCodec("copy");
|
|
152
|
+
options.push("-absf aac_adtstoasc");
|
|
153
|
+
} else {
|
|
154
|
+
log.warn(`ffmpegStreamToHls(): Not support audio codec or unknown audio codec (${import_eufy_security_client.AudioCodec[metadata.audioCodec]})`);
|
|
178
155
|
}
|
|
179
|
-
|
|
156
|
+
command.output(output).addOptions(options).on("error", function(err, stdout, stderr) {
|
|
157
|
+
log.error(`ffmpegStreamToHls(): An error occurred: ${err.message}`);
|
|
158
|
+
log.error(`ffmpegStreamToHls(): ffmpeg output:
|
|
159
|
+
${stdout}`);
|
|
160
|
+
log.error(`ffmpegStreamToHls(): ffmpeg stderr:
|
|
161
|
+
${stderr}`);
|
|
162
|
+
uVideoStream.close();
|
|
163
|
+
uAudioStream.close();
|
|
164
|
+
reject(err);
|
|
165
|
+
}).on("end", () => {
|
|
166
|
+
log.debug("ffmpegStreamToHls(): Processing finished!");
|
|
167
|
+
uVideoStream.close();
|
|
168
|
+
uAudioStream.close();
|
|
169
|
+
resolve();
|
|
170
|
+
});
|
|
171
|
+
command.run();
|
|
172
|
+
} else {
|
|
173
|
+
reject(new Error("ffmpeg binary not found"));
|
|
174
|
+
}
|
|
175
|
+
} catch (error) {
|
|
176
|
+
log.error(`ffmpegStreamToHls(): Error: ${error}`);
|
|
177
|
+
reject(error);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
180
|
};
|
|
181
|
-
exports.ffmpegStreamToHls = ffmpegStreamToHls;
|
|
182
181
|
const ffmpegStreamToGo2rtc = (config, namespace, camera, metadata, videoStream, audioStream, log) => {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
videoFormat = "hevc";
|
|
217
|
-
break;
|
|
218
|
-
}
|
|
219
|
-
switch (metadata.audioCodec) {
|
|
220
|
-
case eufy_security_client_1.AudioCodec.AAC:
|
|
221
|
-
audioFormat = "aac";
|
|
222
|
-
break;
|
|
223
|
-
}
|
|
224
|
-
const command = (0, fluent_ffmpeg_1.default)()
|
|
225
|
-
.withProcessOptions({
|
|
226
|
-
detached: true
|
|
227
|
-
})
|
|
228
|
-
.input(uVideoStream.url)
|
|
229
|
-
.inputFormat(videoFormat)
|
|
230
|
-
.inputFps(metadata.videoFPS)
|
|
231
|
-
.videoCodec("copy");
|
|
232
|
-
if (audioFormat !== "") {
|
|
233
|
-
command.input(uAudioStream.url)
|
|
234
|
-
.inputFormat(audioFormat)
|
|
235
|
-
//.audioCodec("copy");
|
|
236
|
-
//.audioCodec("aac");
|
|
237
|
-
.audioCodec("opus");
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
log.warn(`ffmpegStreamToGo2rtc(): Not support audio codec or unknown audio codec (${eufy_security_client_1.AudioCodec[metadata.audioCodec]})`);
|
|
241
|
-
}
|
|
242
|
-
command.output(`rtsp://localhost:${config.go2rtc_rtsp_port}/${camera}`)
|
|
243
|
-
.outputFormat("rtsp")
|
|
244
|
-
.addOptions(options)
|
|
245
|
-
.on("error", function (err, stdout, stderr) {
|
|
246
|
-
log.error(`ffmpegStreamToGo2rtc(): An error occurred: ${err.message}`);
|
|
247
|
-
log.error(`ffmpegStreamToGo2rtc(): ffmpeg output:\n${stdout}`);
|
|
248
|
-
log.error(`ffmpegStreamToGo2rtc(): ffmpeg stderr:\n${stderr}`);
|
|
249
|
-
uVideoStream.close();
|
|
250
|
-
uAudioStream.close();
|
|
251
|
-
reject(err);
|
|
252
|
-
})
|
|
253
|
-
.on("end", () => {
|
|
254
|
-
log.debug("ffmpegStreamToGo2rtc(): Processing finished!");
|
|
255
|
-
uVideoStream.close();
|
|
256
|
-
uAudioStream.close();
|
|
257
|
-
resolve();
|
|
258
|
-
});
|
|
259
|
-
command.run();
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
reject(new Error("ffmpeg binary not found"));
|
|
263
|
-
}
|
|
182
|
+
return new Promise((resolve, reject) => {
|
|
183
|
+
try {
|
|
184
|
+
if (import_ffmpeg_static.default) {
|
|
185
|
+
import_fluent_ffmpeg.default.setFfmpegPath(import_ffmpeg_static.default);
|
|
186
|
+
log.warn("ffmpegStreamToGo2rtc(): Started");
|
|
187
|
+
videoStream.on("error", (error) => {
|
|
188
|
+
log.error("ffmpegStreamToGo2rtc(): Videostream Error", error);
|
|
189
|
+
});
|
|
190
|
+
audioStream.on("error", (error) => {
|
|
191
|
+
log.error("ffmpegStreamToGo2rtc(): Audiostream Error", error);
|
|
192
|
+
});
|
|
193
|
+
const uVideoStream = StreamInput(namespace, videoStream);
|
|
194
|
+
const uAudioStream = StreamInput(namespace, audioStream);
|
|
195
|
+
let videoFormat = "h264";
|
|
196
|
+
let audioFormat = "";
|
|
197
|
+
const options = [
|
|
198
|
+
"-rtsp_transport tcp",
|
|
199
|
+
"-sc_threshold 0",
|
|
200
|
+
`-g ${metadata.videoFPS}`,
|
|
201
|
+
"-fflags genpts+nobuffer+flush_packets"
|
|
202
|
+
];
|
|
203
|
+
switch (metadata.videoCodec) {
|
|
204
|
+
case import_eufy_security_client.VideoCodec.H264:
|
|
205
|
+
videoFormat = "h264";
|
|
206
|
+
break;
|
|
207
|
+
case import_eufy_security_client.VideoCodec.H265:
|
|
208
|
+
videoFormat = "hevc";
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
switch (metadata.audioCodec) {
|
|
212
|
+
case import_eufy_security_client.AudioCodec.AAC:
|
|
213
|
+
audioFormat = "aac";
|
|
214
|
+
break;
|
|
264
215
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
216
|
+
const command = (0, import_fluent_ffmpeg.default)().withProcessOptions({
|
|
217
|
+
detached: true
|
|
218
|
+
}).input(uVideoStream.url).inputFormat(videoFormat).inputFps(metadata.videoFPS).videoCodec("copy");
|
|
219
|
+
if (audioFormat !== "") {
|
|
220
|
+
command.input(uAudioStream.url).inputFormat(audioFormat).audioCodec("opus");
|
|
221
|
+
} else {
|
|
222
|
+
log.warn(`ffmpegStreamToGo2rtc(): Not support audio codec or unknown audio codec (${import_eufy_security_client.AudioCodec[metadata.audioCodec]})`);
|
|
268
223
|
}
|
|
269
|
-
|
|
224
|
+
command.output(`rtsp://localhost:${config.go2rtc_rtsp_port}/${camera}`).outputFormat("rtsp").addOptions(options).on("error", function(err, stdout, stderr) {
|
|
225
|
+
log.error(`ffmpegStreamToGo2rtc(): An error occurred: ${err.message}`);
|
|
226
|
+
log.error(`ffmpegStreamToGo2rtc(): ffmpeg output:
|
|
227
|
+
${stdout}`);
|
|
228
|
+
log.error(`ffmpegStreamToGo2rtc(): ffmpeg stderr:
|
|
229
|
+
${stderr}`);
|
|
230
|
+
uVideoStream.close();
|
|
231
|
+
uAudioStream.close();
|
|
232
|
+
reject(err);
|
|
233
|
+
}).on("end", () => {
|
|
234
|
+
log.debug("ffmpegStreamToGo2rtc(): Processing finished!");
|
|
235
|
+
uVideoStream.close();
|
|
236
|
+
uAudioStream.close();
|
|
237
|
+
resolve();
|
|
238
|
+
});
|
|
239
|
+
command.run();
|
|
240
|
+
} else {
|
|
241
|
+
reject(new Error("ffmpeg binary not found"));
|
|
242
|
+
}
|
|
243
|
+
} catch (error) {
|
|
244
|
+
log.error(`ffmpegStreamToGo2rtc(): Error: ${error}`);
|
|
245
|
+
reject(error);
|
|
246
|
+
}
|
|
247
|
+
});
|
|
270
248
|
};
|
|
271
|
-
|
|
272
|
-
|
|
249
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
250
|
+
0 && (module.exports = {
|
|
251
|
+
StreamInput,
|
|
252
|
+
StreamOutput,
|
|
253
|
+
ffmpegPreviewImage,
|
|
254
|
+
ffmpegStreamToGo2rtc,
|
|
255
|
+
ffmpegStreamToHls
|
|
256
|
+
});
|
|
257
|
+
//# sourceMappingURL=video.js.map
|
package/build/lib/video.js.map
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/lib/video.ts"],
|
|
4
|
+
"sourcesContent": ["import net from \"net\";\r\nimport path from \"path\";\r\nimport ffmpeg from \"@bropat/fluent-ffmpeg\";\r\nimport pathToFfmpeg from \"ffmpeg-static\";\r\nimport { Readable } from \"stream\";\r\nimport { StreamMetadata, AudioCodec, VideoCodec } from \"eufy-security-client\";\r\nimport { tmpdir } from \"os\";\r\nimport fse from \"fs-extra\";\r\n\r\nimport { ioBrokerLogger } from \"./log\";\r\nimport { lowestUnusedNumber } from \"./utils\";\r\n\r\nclass UniversalStream {\r\n\r\n public url: string;\r\n private static socks = new Set<number>();\r\n private server: net.Server;\r\n private sock_id: number;\r\n\r\n constructor (namespace: string, onSocket: ((socket: net.Socket) => void) | undefined) {\r\n let sockpath = \"\";\r\n\r\n const unique_sock_id = lowestUnusedNumber([...UniversalStream.socks], 1);\r\n UniversalStream.socks.add(unique_sock_id);\r\n this.sock_id = unique_sock_id;\r\n\r\n if (process.platform === \"win32\") {\r\n const pipePrefix = \"\\\\\\\\.\\\\pipe\\\\\";\r\n const pipeName = `node-webrtc.${namespace}.${unique_sock_id}.sock`;\r\n\r\n sockpath = path.join(pipePrefix, pipeName);\r\n this.url = sockpath;\r\n }\r\n else {\r\n const pipeName = `${namespace}.${unique_sock_id}.sock`;\r\n sockpath = path.join(tmpdir(), pipeName);\r\n this.url = \"unix:\" + sockpath;\r\n\r\n try {\r\n if (fse.existsSync(sockpath))\r\n fse.unlinkSync(sockpath);\r\n } catch(error) {\r\n }\r\n }\r\n\r\n this.server = net.createServer(onSocket);\r\n this.server.listen(sockpath);\r\n }\r\n\r\n public close(): void {\r\n if (this.server)\r\n this.server.close();\r\n UniversalStream.socks.delete(this.sock_id);\r\n }\r\n\r\n}\r\n\r\nexport const StreamInput = function(namespace: string, stream: NodeJS.ReadableStream): UniversalStream {\r\n return new UniversalStream(namespace, (socket: net.Socket) => stream.pipe(socket, { end: true }))\r\n}\r\n\r\nexport const StreamOutput = function(namespace: string, stream: NodeJS.WritableStream): UniversalStream {\r\n return new UniversalStream(namespace, (socket: net.Socket) => socket.pipe(stream, { end: true }))\r\n}\r\n\r\nexport const ffmpegPreviewImage = (config: ioBroker.AdapterConfig, input:string, output: string, log: ioBrokerLogger, skip_seconds = 2.0): Promise<void> => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n if (pathToFfmpeg) {\r\n ffmpeg.setFfmpegPath(pathToFfmpeg);\r\n\r\n ffmpeg()\r\n .withProcessOptions({\r\n detached: true\r\n })\r\n .addOptions([\r\n `-ss ${skip_seconds}`,\r\n \"-frames:v 1\"\r\n ])\r\n .input(input)\r\n .inputFormat(\"hls\")\r\n .outputFormat(\"image2\")\r\n .output(output)\r\n .on(\"error\", function(err, stdout, stderr) {\r\n log.error(`ffmpegPreviewImage(): An error occurred: ${err.message}`);\r\n log.error(`ffmpegPreviewImage(): ffmpeg output:\\n${stdout}`);\r\n log.error(`ffmpegPreviewImage(): ffmpeg stderr:\\n${stderr}`);\r\n reject(err);\r\n })\r\n .on(\"end\", () => {\r\n log.debug(\"ffmpegPreviewImage(): Preview image generated!\");\r\n resolve();\r\n })\r\n .run();\r\n } else {\r\n reject(new Error(\"ffmpeg binary not found\"));\r\n }\r\n } catch (error) {\r\n log.error(`ffmpegPreviewImage(): Error: ${error}`);\r\n reject(error);\r\n }\r\n });\r\n}\r\n\r\nexport const ffmpegStreamToHls = (config: ioBroker.AdapterConfig, namespace: string, metadata: StreamMetadata, videoStream: Readable, audioStream: Readable, output: string, log: ioBrokerLogger): Promise<void> => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n if (pathToFfmpeg) {\r\n ffmpeg.setFfmpegPath(pathToFfmpeg);\r\n\r\n videoStream.on(\"error\", (error) => {\r\n log.error(\"ffmpegStreamToHls(): Videostream Error\", error);\r\n });\r\n\r\n audioStream.on(\"error\", (error) => {\r\n log.error(\"ffmpegStreamToHls(): Audiostream Error\", error);\r\n });\r\n\r\n const uVideoStream = StreamInput(namespace, videoStream);\r\n const uAudioStream = StreamInput(namespace, audioStream);\r\n\r\n let videoFormat = \"h264\";\r\n let audioFormat = \"\";\r\n const options: string[] = [\r\n \"-hls_init_time 0\",\r\n \"-hls_time 2\",\r\n \"-hls_segment_type mpegts\",\r\n //\"-start_number 1\",\r\n \"-sc_threshold 0\",\r\n `-g ${metadata.videoFPS}`,\r\n \"-fflags genpts+nobuffer+flush_packets\",\r\n //\"-flush_packets 1\",\r\n \"-hls_playlist_type event\"\r\n //\"-hls_flags split_by_time\"\r\n ];\r\n\r\n switch(metadata.videoCodec) {\r\n case VideoCodec.H264:\r\n videoFormat = \"h264\";\r\n break;\r\n case VideoCodec.H265:\r\n videoFormat = \"hevc\";\r\n break;\r\n }\r\n\r\n switch(metadata.audioCodec) {\r\n case AudioCodec.AAC:\r\n audioFormat = \"aac\";\r\n break;\r\n }\r\n\r\n const command = ffmpeg()\r\n .withProcessOptions({\r\n detached: true\r\n })\r\n .input(uVideoStream.url)\r\n .inputFormat(videoFormat)\r\n .inputFps(metadata.videoFPS);\r\n if (audioFormat !== \"\") {\r\n command.input(uAudioStream.url)\r\n .inputFormat(audioFormat)\r\n .videoCodec(\"copy\")\r\n .audioCodec(\"copy\");\r\n options.push(\"-absf aac_adtstoasc\");\r\n } else {\r\n log.warn(`ffmpegStreamToHls(): Not support audio codec or unknown audio codec (${AudioCodec[metadata.audioCodec]})`);\r\n }\r\n command.output(output)\r\n .addOptions(options)\r\n .on(\"error\", function(err, stdout, stderr) {\r\n log.error(`ffmpegStreamToHls(): An error occurred: ${err.message}`);\r\n log.error(`ffmpegStreamToHls(): ffmpeg output:\\n${stdout}`);\r\n log.error(`ffmpegStreamToHls(): ffmpeg stderr:\\n${stderr}`);\r\n uVideoStream.close();\r\n uAudioStream.close();\r\n reject(err);\r\n })\r\n .on(\"end\", () => {\r\n log.debug(\"ffmpegStreamToHls(): Processing finished!\");\r\n uVideoStream.close();\r\n uAudioStream.close();\r\n resolve();\r\n });\r\n command.run();\r\n } else {\r\n reject(new Error(\"ffmpeg binary not found\"));\r\n }\r\n } catch (error) {\r\n log.error(`ffmpegStreamToHls(): Error: ${error}`);\r\n reject(error);\r\n }\r\n });\r\n}\r\n\r\nexport const ffmpegStreamToGo2rtc = (config: ioBroker.AdapterConfig, namespace: string, camera: string, metadata: StreamMetadata, videoStream: Readable, audioStream: Readable, log: ioBrokerLogger): Promise<void> => {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n if (pathToFfmpeg) {\r\n ffmpeg.setFfmpegPath(pathToFfmpeg);\r\n\r\n log.warn(\"ffmpegStreamToGo2rtc(): Started\");\r\n\r\n videoStream.on(\"error\", (error) => {\r\n log.error(\"ffmpegStreamToGo2rtc(): Videostream Error\", error);\r\n });\r\n\r\n audioStream.on(\"error\", (error) => {\r\n log.error(\"ffmpegStreamToGo2rtc(): Audiostream Error\", error);\r\n });\r\n\r\n //TODO: For debugging purposes\r\n /*const outputFile = path.resolve(__dirname, \"../../test-stream.dump\");\r\n videoStream.pipe(fse.createWriteStream(outputFile)).on(\"finish\", () => {\r\n log.debug(\"videoStream dump finished!\");\r\n log.info(\"Manually test the output by running# ffplay output/test-stream.dump\");\r\n });*/\r\n\r\n const uVideoStream = StreamInput(namespace, videoStream);\r\n const uAudioStream = StreamInput(namespace, audioStream);\r\n\r\n let videoFormat = \"h264\";\r\n let audioFormat = \"\";\r\n const options: string[] = [\r\n \"-rtsp_transport tcp\",\r\n \"-sc_threshold 0\",\r\n `-g ${metadata.videoFPS}`,\r\n \"-fflags genpts+nobuffer+flush_packets\",\r\n //\"-rtpflags latm\",\r\n ];\r\n\r\n switch(metadata.videoCodec) {\r\n case VideoCodec.H264:\r\n videoFormat = \"h264\";\r\n break;\r\n case VideoCodec.H265:\r\n videoFormat = \"hevc\";\r\n break;\r\n }\r\n\r\n switch(metadata.audioCodec) {\r\n case AudioCodec.AAC:\r\n audioFormat = \"aac\";\r\n break;\r\n }\r\n\r\n const command = ffmpeg()\r\n .withProcessOptions({\r\n detached: true\r\n })\r\n .input(uVideoStream.url)\r\n .inputFormat(videoFormat)\r\n .inputFps(metadata.videoFPS)\r\n .videoCodec(\"copy\");\r\n if (audioFormat !== \"\") {\r\n command.input(uAudioStream.url)\r\n .inputFormat(audioFormat)\r\n //.audioCodec(\"copy\");\r\n //.audioCodec(\"aac\");\r\n .audioCodec(\"opus\");\r\n } else {\r\n log.warn(`ffmpegStreamToGo2rtc(): Not support audio codec or unknown audio codec (${AudioCodec[metadata.audioCodec]})`);\r\n }\r\n command.output(`rtsp://localhost:${config.go2rtc_rtsp_port}/${camera}`)\r\n .outputFormat(\"rtsp\")\r\n .addOptions(options)\r\n .on(\"error\", function(err, stdout, stderr) {\r\n log.error(`ffmpegStreamToGo2rtc(): An error occurred: ${err.message}`);\r\n log.error(`ffmpegStreamToGo2rtc(): ffmpeg output:\\n${stdout}`);\r\n log.error(`ffmpegStreamToGo2rtc(): ffmpeg stderr:\\n${stderr}`);\r\n uVideoStream.close();\r\n uAudioStream.close();\r\n reject(err);\r\n })\r\n .on(\"end\", () => {\r\n log.debug(\"ffmpegStreamToGo2rtc(): Processing finished!\");\r\n uVideoStream.close();\r\n uAudioStream.close();\r\n resolve();\r\n });\r\n command.run();\r\n } else {\r\n reject(new Error(\"ffmpeg binary not found\"));\r\n }\r\n } catch (error) {\r\n log.error(`ffmpegStreamToGo2rtc(): Error: ${error}`);\r\n reject(error);\r\n }\r\n });\r\n}\r\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAgB;AAChB,kBAAiB;AACjB,2BAAmB;AACnB,2BAAyB;AAEzB,kCAAuD;AACvD,gBAAuB;AACvB,sBAAgB;AAGhB,mBAAmC;AAEnC,MAAM,mBAAN,MAAsB;AAAA,EAOlB,YAAa,WAAmB,UAAsD;AAClF,QAAI,WAAW;AAEf,UAAM,qBAAiB,iCAAmB,CAAC,GAAG,iBAAgB,KAAK,GAAG,CAAC;AACvE,qBAAgB,MAAM,IAAI,cAAc;AACxC,SAAK,UAAU;AAEf,QAAI,QAAQ,aAAa,SAAS;AAC9B,YAAM,aAAa;AACnB,YAAM,WAAW,eA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