forked from homebridge-plugins/homebridge-camera-ffmpeg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.schema.json
348 lines (348 loc) · 11.1 KB
/
config.schema.json
1
2
3
4
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
45
46
47
48
49
50
51
52
53
54
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
90
91
92
93
94
95
96
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
"pluginAlias": "Camera-ffmpeg",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Once Homebridge is paired, Cameras are automatically added to HomeKit.\n\n1. To add Homebridge to Homekit, Open the Home <img src='https://user-images.githubusercontent.com/3979615/78010622-4ea1d380-738e-11ea-8a17-e6a465eeec35.png' height='16.42px'> app on your device.\n2. Tap the Home tab, then tap <img src='https://user-images.githubusercontent.com/3979615/78010869-9aed1380-738e-11ea-9644-9f46b3633026.png' height='16.42px'>.\n3. Tap Add Accessory, and select I Don't Have a Code or Cannot Scan.\n4. Enter the Homebridge PIN, this can be found under the QR code in Homebridge UI or your Homebridge logs, alternatively you can select Use Camera and scan the QR code again.\n\nFor help and examples of common configurations please read the [wiki](https://github.com/KhaosT/homebridge-camera-ffmpeg/wiki).",
"footerDisplay": "The **ffmpeg** binary must be installed on your system for this plugin to work. If you are using a custom compiled FFmpeg, to use Audio must compile with libfdk-aac enabled.",
"schema": {
"name": {
"title": "Name",
"type": "string"
},
"videoProcessor": {
"title": "Video Processor",
"type": "string",
"placeholder": "ffmpeg"
},
"interfaceName": {
"title": "Network Interface",
"type": "string",
"placeholder": "eth0"
},
"mqtt": {
"title": "MQTT Server",
"type": "string",
"placeholder": "127.0.0.1"
},
"portmqtt": {
"title": "MQTT Port",
"type": "integer",
"placeholder": "1883"
},
"usermqtt": {
"title": "MQTT Username",
"type": "string"
},
"passmqtt": {
"title": "MQTT Password",
"type": "string"
},
"topic": {
"title": "MQTT Topic",
"type": "string",
"placeholder": "homebridge"
},
"porthttp": {
"title": "HTTP Port",
"type": "integer",
"placeholder": "8080"
},
"cameras": {
"type": "array",
"items": {
"title": "Cameras",
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"placeholder": "Enter camera name...",
"required": true
},
"uploader": {
"type": "boolean"
},
"manufacturer": {
"name": "Manufacturer",
"type": "string"
},
"model": {
"name": "Model",
"type": "string"
},
"serialNumber": {
"name": "Camera Serial",
"type": "string"
},
"firmwareRevision": {
"name": "Firmware Version",
"type": "string"
},
"motion": {
"title": "Enable Motion",
"type": "boolean"
},
"doorbell": {
"title": "Enable Doorbell",
"type": "boolean"
},
"doorbellSwitch": {
"title": "Enable Doorbell Button",
"type": "boolean"
},
"switches": {
"title": "Enable Manual Automation Motion and/or Doorbell Switch",
"type": "boolean"
},
"motionTimeout": {
"title": "Number of Seconds for Automatic Motion Reset",
"type": "integer",
"placeholder": 1,
"minimum": 0,
"description": "Set to 0 to disable."
},
"videoConfig": {
"title": "Video Configuration",
"type": "object",
"properties": {
"source": {
"title": "Source",
"type": "string",
"placeholder": "-i rtsp://myfancy_rtsp_stream",
"required": true
},
"stillImageSource": {
"title": "Still Image Source",
"type": "string"
},
"maxStreams": {
"title": "Maximum Number of Streams",
"type": "integer",
"placeholder": 2,
"minimum": 1,
"description": "The maximum number of streams that will be generated for this camera"
},
"maxWidth": {
"title": "Maximum Width",
"type": "integer",
"placeholder": 1280,
"minimum": 1,
"description": "The maximum width reported to HomeKit"
},
"maxHeight": {
"title": "Maximum Height",
"type": "integer",
"placeholder": 720,
"minimum": 1,
"description": "The maximum height reported to HomeKit"
},
"maxFPS": {
"title": "Maximum FPS",
"type": "integer",
"placeholder": 10,
"minimum": 1,
"description": "The maximum frame rate of the stream"
},
"maxBitrate": {
"title": "Maximum Bitrate",
"type": "integer",
"placeholder": 300,
"minimum": 1,
"description": "The maximum bit rate of the stream"
},
"minBitrate": {
"title": "Minimum Bitrate",
"type": "integer",
"placeholder": 0,
"minimum": 0,
"description": "The minimum bit rate of the stream"
},
"preserveRatio": {
"title": "Preserve Ratio",
"type": "string",
"oneOf": [
{ "title": "Width", "enum": ["W"] },
{ "title": "Height", "enum": ["H"] }
]
},
"vcodec": {
"title": "Video Codec",
"type": "string",
"placeholder": "libx264",
"description": "The ffmpeg video processing codec to use.",
"typeahead": {
"source": [
"libx264",
"copy",
"h264_omx",
"h264",
"h264_mmal"
]
}
},
"packetSize": {
"title": "Packet Size",
"type": "number",
"placeholder": 1316,
"multipleOf": 188
},
"videoFilter": {
"title": "Allows a custom video filter to be passed to FFmpeg via -vf",
"type": "string",
"placeholder": "scale=1280:720"
},
"additionalCommandline": {
"title": "Additional of extra command line options",
"type": "string",
"description": "Additional of extra command line options to use with FFmpeg, for example '-loglevel verbose'"
},
"mapvideo": {
"type": "string",
"title": "Map Video",
"placeholder": "0:0",
"description": " Select the stream used for video"
},
"mapaudio": {
"type": "string",
"title": "Map Audio",
"placeholder": "0:1",
"description": " Select the stream used for audio"
},
"audio": {
"title": "Enable Audio",
"type": "boolean"
},
"vflip": {
"title": "Flip Stream Vertically",
"type": "boolean"
},
"hflip": {
"title": "Flip Stream Horizontally",
"type": "boolean"
},
"debug": {
"title": "Enable Debug Mode",
"type": "boolean",
"default": true
}
}
}
}
}
}
},
"layout": [
{
"type": "section",
"title": "Cameras",
"expandable": true,
"expanded": true,
"items": [
{
"key": "cameras",
"type": "array",
"orderable": false,
"buttonText": "Add Camera",
"items": [
"cameras[].name",
"cameras[].videoConfig.source",
"cameras[].videoConfig.stillImageSource",
"cameras[].videoConfig.vcodec",
"cameras[].videoConfig.audio",
{
"key": "cameras[]",
"type": "section",
"title": "Automation Settings",
"expandable": true,
"expanded": false,
"items": [
"cameras[].motion",
"cameras[].doorbell",
"cameras[].doorbellSwitch",
"cameras[].switches",
"cameras[].motionTimeout"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Customization Settings",
"expandable": true,
"expanded": false,
"items": [
"cameras[].manufacturer",
"cameras[].model",
"cameras[].serialNumber",
"cameras[].firmwareRevision"
]
},
{
"key": "cameras[].videoConfig",
"type": "section",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.maxStreams",
"cameras[].videoConfig.maxWidth",
"cameras[].videoConfig.maxHeight",
"cameras[].videoConfig.maxFPS",
"cameras[].videoConfig.maxBitrate",
"cameras[].videoConfig.minBitrate",
"cameras[].videoConfig.preserveRatio",
"cameras[].videoConfig.packetSize",
"cameras[].videoConfig.videoFilter",
"cameras[].videoConfig.additionalCommandline",
"cameras[].videoConfig.mapvideo",
"cameras[].videoConfig.mapaudio",
"cameras[].videoConfig.vflip",
"cameras[].videoConfig.hflip",
"cameras[].videoConfig.debug"
]
}
]
}
]
},
{
"type": "section",
"title": "Automation Settings",
"expandable": true,
"expanded": false,
"items": [
{
"type": "section",
"title": "MQTT Client",
"expandable": true,
"expanded": true,
"items": [
"mqtt",
"portmqtt",
"usermqtt",
"passmqtt",
"topic"
]
},
{
"type": "section",
"title": "HTTP Server",
"expandable": true,
"expanded": true,
"items": [
"porthttp"
]
}
]
},
{
"type": "section",
"title": "Optional Settings",
"expandable": true,
"expanded": false,
"items": [
"videoProcessor",
"interfaceName"
]
}
]
}