forked from Github/frigate
Compare commits
343 Commits
v0.14.0-be
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5e5127d48 | ||
|
|
24f4aa79c8 | ||
|
|
dfc94b5ad6 | ||
|
|
5acbe37e6f | ||
|
|
2461d01329 | ||
|
|
5cafca1be0 | ||
|
|
9c5a04f25f | ||
|
|
1ffdd32013 | ||
|
|
99506845f7 | ||
|
|
ffd05f90f3 | ||
|
|
3a8c290f91 | ||
|
|
af844ea9d5 | ||
|
|
51509760e3 | ||
|
|
f86957e5e1 | ||
|
|
2a15b95f18 | ||
|
|
039ab1ccd7 | ||
|
|
21c12d118b | ||
|
|
077402406b | ||
|
|
6381028fd6 | ||
|
|
a3d3fe07ce | ||
|
|
811da2e159 | ||
|
|
c4e2f3bc70 | ||
|
|
bd906a7915 | ||
|
|
3df33199bc | ||
|
|
7ad30f15d5 | ||
|
|
2f38d960d4 | ||
|
|
2fc58fea81 | ||
|
|
e7dfbf76bb | ||
|
|
94de29187a | ||
|
|
a82c1f303b | ||
|
|
55e1f865d8 | ||
|
|
3f996cd62c | ||
|
|
58a8028485 | ||
|
|
190ce5ee31 | ||
|
|
70aab068fd | ||
|
|
617d279419 | ||
|
|
4de088d725 | ||
|
|
f8fd746678 | ||
|
|
1529ee59fe | ||
|
|
19c253b429 | ||
|
|
13bb9dd715 | ||
|
|
9b4602acb3 | ||
|
|
e5448110fc | ||
|
|
4974defe6f | ||
|
|
65ceadda2b | ||
|
|
8b2adb55ed | ||
|
|
58ca44bd15 | ||
|
|
ef46451b80 | ||
|
|
758b0f9734 | ||
|
|
3650000b31 | ||
|
|
dbd042ca3e | ||
|
|
6b9082bdd9 | ||
|
|
f9baa3bf20 | ||
|
|
a75feb7f8f | ||
|
|
009900b29b | ||
|
|
dc04cf82d8 | ||
|
|
b2c23a367d | ||
|
|
338b59a32e | ||
|
|
07ffd76437 | ||
|
|
3eaf9f4011 | ||
|
|
9832831c5e | ||
|
|
d3259c4782 | ||
|
|
940c12d9d8 | ||
|
|
8f2cbe261b | ||
|
|
e86788034d | ||
|
|
4ecc0e15ce | ||
|
|
b01ce31903 | ||
|
|
87b69c373a | ||
|
|
07b3160dff | ||
|
|
096e2791f5 | ||
|
|
9d456ccfcf | ||
|
|
ad5c3741e9 | ||
|
|
fe188bd646 | ||
|
|
f47984818f | ||
|
|
7b274b6974 | ||
|
|
b1806b0a7c | ||
|
|
ff2e46650c | ||
|
|
69fe6cdc05 | ||
|
|
b7e0d14b83 | ||
|
|
7db6ed9ad5 | ||
|
|
da0f63f095 | ||
|
|
90221e8c94 | ||
|
|
37680c317c | ||
|
|
70ea6fc9a1 | ||
|
|
67e692a7f3 | ||
|
|
34382ac38e | ||
|
|
b94b08a33c | ||
|
|
540d66af57 | ||
|
|
a2deeb0d12 | ||
|
|
22fe261dd6 | ||
|
|
b44354ad29 | ||
|
|
3ffbdb35a2 | ||
|
|
0504e9ef79 | ||
|
|
b309287087 | ||
|
|
e891f2ad6d | ||
|
|
9b1fb33ac6 | ||
|
|
8a099b4ae5 | ||
|
|
80e8930e73 | ||
|
|
2637541c6c | ||
|
|
da913d8d31 | ||
|
|
88d4b694f8 | ||
|
|
b28cc45510 | ||
|
|
c0b23ca938 | ||
|
|
8e7b83d2f1 | ||
|
|
599dd7eecb | ||
|
|
84348350fe | ||
|
|
7d03d99852 | ||
|
|
7c39b176ac | ||
|
|
4c2e6f75a2 | ||
|
|
81139e8f47 | ||
|
|
cea0596cf5 | ||
|
|
51a1526146 | ||
|
|
b4db07d7a5 | ||
|
|
5c15659a34 | ||
|
|
1bd3285679 | ||
|
|
6de426c697 | ||
|
|
d28ad0f0c8 | ||
|
|
47aecff567 | ||
|
|
524f03a650 | ||
|
|
68e6ffdfef | ||
|
|
29345c429a | ||
|
|
2cdd483126 | ||
|
|
f2c46408c4 | ||
|
|
e5dc476c1e | ||
|
|
eb2363b93d | ||
|
|
7bfebd5b61 | ||
|
|
6addf4d88b | ||
|
|
c56e7e7c6c | ||
|
|
78c15f3020 | ||
|
|
30f0f73a4e | ||
|
|
e9da453190 | ||
|
|
91f62cf8ce | ||
|
|
58dbbd5d29 | ||
|
|
5c90f7dce7 | ||
|
|
b7cf5f4105 | ||
|
|
c850604931 | ||
|
|
82d2910039 | ||
|
|
5066fa369d | ||
|
|
3afd77cbe0 | ||
|
|
093201a1cc | ||
|
|
6102e9e5ea | ||
|
|
91215a1406 | ||
|
|
a4eb435f1a | ||
|
|
843d301950 | ||
|
|
d08fe170f2 | ||
|
|
51153af944 | ||
|
|
e7ec014502 | ||
|
|
2ebd2dfcc7 | ||
|
|
aaafd63b94 | ||
|
|
a361372182 | ||
|
|
8f51f7b4c4 | ||
|
|
e416e44998 | ||
|
|
fe4a737421 | ||
|
|
4ee8557061 | ||
|
|
88e1d56799 | ||
|
|
40be915061 | ||
|
|
0d7ee7a87a | ||
|
|
baf209f257 | ||
|
|
c2824d153e | ||
|
|
d2f88491b1 | ||
|
|
aacb8c84e0 | ||
|
|
f44df9fe61 | ||
|
|
34812b7439 | ||
|
|
0ce596ec8f | ||
|
|
2ea1d34f4f | ||
|
|
a0741aa7b1 | ||
|
|
188a7de467 | ||
|
|
1f4ca32e8c | ||
|
|
784b701cc5 | ||
|
|
be9e606ae4 | ||
|
|
fe9a3c9205 | ||
|
|
012aa63571 | ||
|
|
ef7846bb41 | ||
|
|
6948702891 | ||
|
|
56b4a551dc | ||
|
|
93e08688be | ||
|
|
0ed7e278eb | ||
|
|
b30fecbd28 | ||
|
|
f050c7b37d | ||
|
|
f9e1ad253f | ||
|
|
f0159bf41e | ||
|
|
21a777ab45 | ||
|
|
18b8e19847 | ||
|
|
53a2a865f1 | ||
|
|
48a87b16b8 | ||
|
|
46c3ef8c6b | ||
|
|
94b1350c9d | ||
|
|
bfbacee7b5 | ||
|
|
c3455518c2 | ||
|
|
00e235867a | ||
|
|
88046ebd15 | ||
|
|
abc1ecfb60 | ||
|
|
9bbb88cdcb | ||
|
|
c867d90f50 | ||
|
|
1129a2aba4 | ||
|
|
3410290b45 | ||
|
|
b34be991bd | ||
|
|
73755e9777 | ||
|
|
c871bebee6 | ||
|
|
a60ffe06ac | ||
|
|
9f81ce2876 | ||
|
|
5c33cdba4e | ||
|
|
e9cdef9f25 | ||
|
|
d01457e64d | ||
|
|
c72d304515 | ||
|
|
10c1f7ead4 | ||
|
|
7b57a66d45 | ||
|
|
767033e4d8 | ||
|
|
e6790d9a6a | ||
|
|
4bca405e29 | ||
|
|
bdda89b5e2 | ||
|
|
2cbc336bc0 | ||
|
|
6c107883b5 | ||
|
|
4635e64b2e | ||
|
|
5b60785cca | ||
|
|
ef304e6f7f | ||
|
|
24770148a7 | ||
|
|
ba6fc0fdb3 | ||
|
|
89a478ce0a | ||
|
|
f1bb797fe0 | ||
|
|
e208241eea | ||
|
|
02af1b0ac7 | ||
|
|
3c12872a56 | ||
|
|
4e5a6eb1c8 | ||
|
|
5617fbbcb1 | ||
|
|
15e2df1e5c | ||
|
|
0d862d6aa8 | ||
|
|
9ceffeb191 | ||
|
|
b49cda274d | ||
|
|
2934c7817d | ||
|
|
4078a147ef | ||
|
|
1cb5dcb7dc | ||
|
|
7aec8222fc | ||
|
|
30e1969fad | ||
|
|
a7da468b97 | ||
|
|
1a0d9e10d7 | ||
|
|
9514a3d089 | ||
|
|
349b27b764 | ||
|
|
e56ce993df | ||
|
|
3e1861e2ce | ||
|
|
187d98a153 | ||
|
|
2d4d1584fd | ||
|
|
c75fc40833 | ||
|
|
e3c8901549 | ||
|
|
6978140492 | ||
|
|
272a21ffab | ||
|
|
a8e901b63c | ||
|
|
bb359f67a4 | ||
|
|
c9d253a320 | ||
|
|
b3eab17f2c | ||
|
|
962d213699 | ||
|
|
18d561da0e | ||
|
|
30b86271ea | ||
|
|
5f3c35209d | ||
|
|
2535519830 | ||
|
|
f4dd3e44b6 | ||
|
|
11babb9509 | ||
|
|
e1bedf30bf | ||
|
|
859682c8d1 | ||
|
|
804edceec2 | ||
|
|
9f181014a1 | ||
|
|
4313fd97aa | ||
|
|
4e569ad644 | ||
|
|
b4384a1be3 | ||
|
|
5b42c91a91 | ||
|
|
926d394b2f | ||
|
|
fc5a926892 | ||
|
|
d2787d4308 | ||
|
|
8cc170f027 | ||
|
|
53fa64fd14 | ||
|
|
8c96dfe1d1 | ||
|
|
36ae42a011 | ||
|
|
0181d1e377 | ||
|
|
3f0a954856 | ||
|
|
2875e84cb5 | ||
|
|
7917bf55ff | ||
|
|
ea0292b911 | ||
|
|
e6d1ad0ac5 | ||
|
|
9808ff64e7 | ||
|
|
f65ddccd6e | ||
|
|
b763754723 | ||
|
|
d5dafffc39 | ||
|
|
bd7c575f26 | ||
|
|
13f250f630 | ||
|
|
7a4eb0b37c | ||
|
|
1e80342c41 | ||
|
|
7031c47fb2 | ||
|
|
e431031112 | ||
|
|
379061f847 | ||
|
|
beefc51361 | ||
|
|
bccffe6670 | ||
|
|
8418b65f34 | ||
|
|
6e53c109b6 | ||
|
|
7b99bbfd28 | ||
|
|
8179278bfa | ||
|
|
758df09da3 | ||
|
|
a3d116e70e | ||
|
|
8c325801ef | ||
|
|
35946d332d | ||
|
|
142641b387 | ||
|
|
402c16e7df | ||
|
|
3e6b8c23bc | ||
|
|
1c5e7ebb48 | ||
|
|
9cb3e11df6 | ||
|
|
1c2e2a7b38 | ||
|
|
a763ae303d | ||
|
|
ec88752666 | ||
|
|
4135cabf58 | ||
|
|
9fc22efa2d | ||
|
|
37dd3fc25b | ||
|
|
9e8202874e | ||
|
|
9245c5cb56 | ||
|
|
f1c0422d5e | ||
|
|
3dd401f57a | ||
|
|
6dd9660ecd | ||
|
|
d5f6decd30 | ||
|
|
cf4517cbdb | ||
|
|
61f79afae9 | ||
|
|
5513addab8 | ||
|
|
d064e44571 | ||
|
|
c95758580f | ||
|
|
ced5ab203f | ||
|
|
4236580672 | ||
|
|
f7c3ddd380 | ||
|
|
8546d3d315 | ||
|
|
2fda383782 | ||
|
|
4165639308 | ||
|
|
6913cc6abc | ||
|
|
d64633889b | ||
|
|
7bed854ff7 | ||
|
|
c1330704cf | ||
|
|
5900a2a4ba | ||
|
|
bfeb7b8a96 | ||
|
|
a86e22e0fc | ||
|
|
c07f6999ca | ||
|
|
eca8c52f15 | ||
|
|
be147d218b | ||
|
|
7a9ee63bd3 | ||
|
|
c2eac10925 | ||
|
|
63d81bef45 | ||
|
|
3f171e7670 | ||
|
|
681c7367d7 | ||
|
|
adb043e7ae |
@@ -10,9 +10,9 @@
|
|||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers/features/common-utils:1": {}
|
"ghcr.io/devcontainers/features/common-utils:1": {}
|
||||||
},
|
},
|
||||||
"forwardPorts": [8080, 5000, 5001, 5173, 8554, 8555],
|
"forwardPorts": [8971, 5000, 5001, 5173, 8554, 8555],
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"8080": {
|
"8971": {
|
||||||
"label": "External NGINX",
|
"label": "External NGINX",
|
||||||
"onAutoForward": "silent"
|
"onAutoForward": "silent"
|
||||||
},
|
},
|
||||||
|
|||||||
55
.github/DISCUSSION_TEMPLATE/camera-support.yml
vendored
55
.github/DISCUSSION_TEMPLATE/camera-support.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
title: "[Camera Support]: "
|
title: "[Camera Support]: "
|
||||||
labels: ["support", "triage"]
|
labels: ["support", "triage"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form for support or questions for an issue with your cameras.
|
||||||
|
|
||||||
|
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -11,9 +21,15 @@ body:
|
|||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
label: Version
|
||||||
description: Visible on the System page in the Web UI
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: What browser(s) are you using?
|
||||||
|
placeholder: Google Chrome 88.0.4324.150
|
||||||
|
description: >
|
||||||
|
Provide the full name and don't forget to add the version!
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: config
|
id: config
|
||||||
attributes:
|
attributes:
|
||||||
@@ -23,10 +39,18 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: frigatelogs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant Frigate log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -34,7 +58,7 @@ body:
|
|||||||
id: ffprobe
|
id: ffprobe
|
||||||
attributes:
|
attributes:
|
||||||
label: FFprobe output from your camera
|
label: FFprobe output from your camera
|
||||||
description: Run `ffprobe <camera_url>` and provide output below
|
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -69,16 +93,16 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: coral
|
id: object-detector
|
||||||
attributes:
|
attributes:
|
||||||
label: Coral version
|
label: Object Detector
|
||||||
options:
|
options:
|
||||||
- USB
|
- Coral
|
||||||
- PCIe
|
- OpenVino
|
||||||
- M.2
|
- TensorRT
|
||||||
- Dev Board
|
- RKNN
|
||||||
- Other
|
- Other
|
||||||
- CPU (no coral)
|
- CPU (no Coral)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
@@ -98,6 +122,13 @@ body:
|
|||||||
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: other
|
id: other
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
43
.github/DISCUSSION_TEMPLATE/config-support.yml
vendored
43
.github/DISCUSSION_TEMPLATE/config-support.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
title: "[Config Support]: "
|
title: "[Config Support]: "
|
||||||
labels: ["support", "triage"]
|
labels: ["support", "triage"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form for support or questions related to Frigate's configuration and config file.
|
||||||
|
|
||||||
|
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -11,7 +21,7 @@ body:
|
|||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
label: Version
|
||||||
description: Visible on the System page in the Web UI
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
@@ -23,10 +33,18 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: frigatelogs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant Frigate log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -61,18 +79,23 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: coral
|
id: object-detector
|
||||||
attributes:
|
attributes:
|
||||||
label: Coral version
|
label: Object Detector
|
||||||
options:
|
options:
|
||||||
- USB
|
- Coral
|
||||||
- PCIe
|
- OpenVino
|
||||||
- M.2
|
- TensorRT
|
||||||
- Dev Board
|
- RKNN
|
||||||
- Other
|
- Other
|
||||||
- CPU (no coral)
|
- CPU (no coral)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop or simple cut/paste is possible in this field
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: other
|
id: other
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
45
.github/DISCUSSION_TEMPLATE/detector-support.yml
vendored
45
.github/DISCUSSION_TEMPLATE/detector-support.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
title: "[Detector Support]: "
|
title: "[Detector Support]: "
|
||||||
labels: ["support", "triage"]
|
labels: ["support", "triage"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form for support or questions related to Frigate's object detectors.
|
||||||
|
|
||||||
|
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -11,7 +21,7 @@ body:
|
|||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
label: Version
|
||||||
description: Visible on the System page in the Web UI
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
@@ -31,10 +41,18 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: frigatelogs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant Frigate log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -63,18 +81,25 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: coral
|
id: object-detector
|
||||||
attributes:
|
attributes:
|
||||||
label: Coral version
|
label: Object Detector
|
||||||
options:
|
options:
|
||||||
- USB
|
- Coral
|
||||||
- PCIe
|
- OpenVino
|
||||||
- M.2
|
- TensorRT
|
||||||
- Dev Board
|
- RKNN
|
||||||
- Other
|
- Other
|
||||||
- CPU (no coral)
|
- CPU (no coral)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: other
|
id: other
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
51
.github/DISCUSSION_TEMPLATE/general-support.yml
vendored
51
.github/DISCUSSION_TEMPLATE/general-support.yml
vendored
@@ -1,6 +1,16 @@
|
|||||||
title: "[Support]: "
|
title: "[Support]: "
|
||||||
labels: ["support", "triage"]
|
labels: ["support", "triage"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form for support for issues that don't fall into any specific category.
|
||||||
|
|
||||||
|
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -11,9 +21,15 @@ body:
|
|||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
label: Version
|
||||||
description: Visible on the System page in the Web UI
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: What browser(s) are you using?
|
||||||
|
placeholder: Google Chrome 88.0.4324.150
|
||||||
|
description: >
|
||||||
|
Provide the full name and don't forget to add the version!
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: config
|
id: config
|
||||||
attributes:
|
attributes:
|
||||||
@@ -23,10 +39,18 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: frigatelogs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant Frigate log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -34,7 +58,7 @@ body:
|
|||||||
id: ffprobe
|
id: ffprobe
|
||||||
attributes:
|
attributes:
|
||||||
label: FFprobe output from your camera
|
label: FFprobe output from your camera
|
||||||
description: Run `ffprobe <camera_url>` and provide output below
|
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -69,14 +93,14 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: dropdown
|
- type: dropdown
|
||||||
id: coral
|
id: object-detector
|
||||||
attributes:
|
attributes:
|
||||||
label: Coral version
|
label: Object Detector
|
||||||
options:
|
options:
|
||||||
- USB
|
- Coral
|
||||||
- PCIe
|
- OpenVino
|
||||||
- M.2
|
- TensorRT
|
||||||
- Dev Board
|
- RKNN
|
||||||
- Other
|
- Other
|
||||||
- CPU (no coral)
|
- CPU (no coral)
|
||||||
validations:
|
validations:
|
||||||
@@ -98,6 +122,11 @@ body:
|
|||||||
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop for images is possible in this field
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: other
|
id: other
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
title: "[HW Accel Support]: "
|
title: "[HW Accel Support]: "
|
||||||
labels: ["support", "triage"]
|
labels: ["support", "triage"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form to submit a support request for hardware acceleration issues.
|
||||||
|
|
||||||
|
Before submitting your support request, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
@@ -11,9 +21,15 @@ body:
|
|||||||
id: version
|
id: version
|
||||||
attributes:
|
attributes:
|
||||||
label: Version
|
label: Version
|
||||||
description: Visible on the System page in the Web UI
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: In which browser(s) are you experiencing the issue with?
|
||||||
|
placeholder: Google Chrome 88.0.4324.150
|
||||||
|
description: >
|
||||||
|
Provide the full name and don't forget to add the version!
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: config
|
id: config
|
||||||
attributes:
|
attributes:
|
||||||
@@ -31,10 +47,18 @@ body:
|
|||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: logs
|
id: frigatelogs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant Frigate log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -42,7 +66,7 @@ body:
|
|||||||
id: ffprobe
|
id: ffprobe
|
||||||
attributes:
|
attributes:
|
||||||
label: FFprobe output from your camera
|
label: FFprobe output from your camera
|
||||||
description: Run `ffprobe <camera_url>` and provide output below
|
description: Run `ffprobe <camera_url>` from within the Frigate container if possible, and provide output below
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
@@ -87,6 +111,13 @@ body:
|
|||||||
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop for images is possible in this field. Please post screenshots of at least General and Cameras tabs.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: other
|
id: other
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
14
.github/DISCUSSION_TEMPLATE/question.yml
vendored
14
.github/DISCUSSION_TEMPLATE/question.yml
vendored
@@ -1,9 +1,21 @@
|
|||||||
title: "[Question]: "
|
title: "[Question]: "
|
||||||
labels: ["question"]
|
labels: ["question"]
|
||||||
body:
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form for questions you have about Frigate.
|
||||||
|
|
||||||
|
Before submitting your question, please [search the discussions][discussions], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your question has already been answered by the community.
|
||||||
|
|
||||||
|
**If you are looking for support, start a new discussion and use a support category.**
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
- type: textarea
|
- type: textarea
|
||||||
id: description
|
id: description
|
||||||
attributes:
|
attributes:
|
||||||
label: "What is your question:"
|
label: "What is your question?"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
146
.github/DISCUSSION_TEMPLATE/report-a-bug.yml
vendored
Normal file
146
.github/DISCUSSION_TEMPLATE/report-a-bug.yml
vendored
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
title: "[Bug]: "
|
||||||
|
labels: ["bug", "triage"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Use this form to submit a reproducible bug in Frigate or Frigate's UI.
|
||||||
|
|
||||||
|
Before submitting your bug report, please [search the discussions][discussions], look at recent open and closed [pull requests][prs], read the [official Frigate documentation][docs], and read the [Frigate FAQ][faq] pinned at the Discussion page to see if your bug has already been fixed by the developers or reported by the community.
|
||||||
|
|
||||||
|
**If you are unsure if your issue is actually a bug or not, please submit a support request first.**
|
||||||
|
|
||||||
|
[discussions]: https://www.github.com/blakeblackshear/frigate/discussions
|
||||||
|
[prs]: https://www.github.com/blakeblackshear/frigate/pulls
|
||||||
|
[docs]: https://docs.frigate.video
|
||||||
|
[faq]: https://github.com/blakeblackshear/frigate/discussions/12724
|
||||||
|
- type: checkboxes
|
||||||
|
attributes:
|
||||||
|
label: Checklist
|
||||||
|
description: Please verify that you've followed these steps
|
||||||
|
options:
|
||||||
|
- label: I have updated to the latest available Frigate version.
|
||||||
|
required: true
|
||||||
|
- label: I have cleared the cache of my browser.
|
||||||
|
required: true
|
||||||
|
- label: I have tried a different browser to see if it is related to my browser.
|
||||||
|
required: true
|
||||||
|
- label: I have tried reproducing the issue in [incognito mode](https://www.computerworld.com/article/1719851/how-to-go-incognito-in-chrome-firefox-safari-and-edge.html) to rule out problems with any third party extensions or plugins I have installed.
|
||||||
|
- type: textarea
|
||||||
|
id: description
|
||||||
|
attributes:
|
||||||
|
label: Describe the problem you are having
|
||||||
|
description: Provide a clear and concise description of what the bug is.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps
|
||||||
|
attributes:
|
||||||
|
label: Steps to reproduce
|
||||||
|
description: |
|
||||||
|
Please tell us exactly how to reproduce your issue.
|
||||||
|
Provide clear and concise step by step instructions and add code snippets if needed.
|
||||||
|
value: |
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
3.
|
||||||
|
...
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: Version
|
||||||
|
description: Visible on the System page in the Web UI. Please include the full version including the build identifier (eg. 0.14.0-ea36ds1)
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
attributes:
|
||||||
|
label: In which browser(s) are you experiencing the issue with?
|
||||||
|
placeholder: Google Chrome 88.0.4324.150
|
||||||
|
description: >
|
||||||
|
Provide the full name and don't forget to add the version!
|
||||||
|
- type: textarea
|
||||||
|
id: config
|
||||||
|
attributes:
|
||||||
|
label: Frigate config file
|
||||||
|
description: This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: yaml
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: docker
|
||||||
|
attributes:
|
||||||
|
label: docker-compose file or Docker CLI command
|
||||||
|
description: This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: yaml
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: frigatelogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant Frigate log output
|
||||||
|
description: Please copy and paste any relevant Frigate log output. Include logs before and after your exact error when possible. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: go2rtclogs
|
||||||
|
attributes:
|
||||||
|
label: Relevant go2rtc log output
|
||||||
|
description: Please copy and paste any relevant go2rtc log output. Include logs before and after your exact error when possible. Logs can be viewed via the Frigate UI, Docker, or the go2rtc dashboard. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: os
|
||||||
|
attributes:
|
||||||
|
label: Operating system
|
||||||
|
options:
|
||||||
|
- HassOS
|
||||||
|
- Debian
|
||||||
|
- Other Linux
|
||||||
|
- Proxmox
|
||||||
|
- UNRAID
|
||||||
|
- Windows
|
||||||
|
- Other
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: install-method
|
||||||
|
attributes:
|
||||||
|
label: Install method
|
||||||
|
options:
|
||||||
|
- HassOS Addon
|
||||||
|
- Docker Compose
|
||||||
|
- Docker CLI
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: dropdown
|
||||||
|
id: network
|
||||||
|
attributes:
|
||||||
|
label: Network connection
|
||||||
|
options:
|
||||||
|
- Wired
|
||||||
|
- Wireless
|
||||||
|
- Mixed
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: input
|
||||||
|
id: camera
|
||||||
|
attributes:
|
||||||
|
label: Camera make and model
|
||||||
|
description: Dahua, hikvision, amcrest, reolink, etc and model number
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots of the Frigate UI's System metrics pages
|
||||||
|
description: Drag and drop for images is possible in this field. Please post screenshots of all tabs.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: other
|
||||||
|
attributes:
|
||||||
|
label: Any other information that may be helpful
|
||||||
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
github:
|
github:
|
||||||
- blakeblackshear
|
- blakeblackshear
|
||||||
- NickM-27
|
- NickM-27
|
||||||
|
- hawkeye217
|
||||||
|
|||||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
5
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -2,4 +2,7 @@ blank_issues_enabled: false
|
|||||||
contact_links:
|
contact_links:
|
||||||
- name: Frigate Support
|
- name: Frigate Support
|
||||||
url: https://github.com/blakeblackshear/frigate/discussions/new/choose
|
url: https://github.com/blakeblackshear/frigate/discussions/new/choose
|
||||||
about: Get support for setting up or troubelshooting Frigate.
|
about: Get support for setting up or troubleshooting Frigate.
|
||||||
|
- name: Frigate Bug Report
|
||||||
|
url: https://github.com/blakeblackshear/frigate/discussions/new/choose
|
||||||
|
about: Report a specific UI or backend bug.
|
||||||
|
|||||||
2
.github/actions/setup/action.yml
vendored
2
.github/actions/setup/action.yml
vendored
@@ -5,7 +5,7 @@ inputs:
|
|||||||
required: true
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
image-name:
|
image-name:
|
||||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.create-short-sha.outputs.SHORT_SHA }}
|
||||||
cache-name:
|
cache-name:
|
||||||
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
value: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:cache
|
||||||
runs:
|
runs:
|
||||||
|
|||||||
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -220,7 +220,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
|
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
@@ -229,7 +229,7 @@ jobs:
|
|||||||
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||||
- uses: int128/docker-manifest-create-action@v2
|
- uses: int128/docker-manifest-create-action@v2
|
||||||
with:
|
with:
|
||||||
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}
|
tags: ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}
|
||||||
sources: |
|
sources: |
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-amd64
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-amd64
|
||||||
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ github.ref_name }}-${{ env.SHORT_SHA }}-rpi
|
ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ env.SHORT_SHA }}-rpi
|
||||||
|
|||||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -16,22 +16,32 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
- name: Log in to the Container registry
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
|
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Create tag variables
|
- name: Create tag variables
|
||||||
run: |
|
run: |
|
||||||
BRANCH=$([[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "master" || echo "dev")
|
BUILD_TYPE=$([[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "stable" || echo "beta")
|
||||||
|
echo "BUILD_TYPE=${BUILD_TYPE}" >> $GITHUB_ENV
|
||||||
echo "BASE=ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}" >> $GITHUB_ENV
|
echo "BASE=ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}" >> $GITHUB_ENV
|
||||||
echo "BUILD_TAG=${BRANCH}-${GITHUB_SHA::7}" >> $GITHUB_ENV
|
echo "BUILD_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
||||||
echo "CLEAN_VERSION=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/^[v]//')" >> $GITHUB_ENV
|
echo "CLEAN_VERSION=$(echo ${GITHUB_REF##*/} | tr '[:upper:]' '[:lower:]' | sed 's/^[v]//')" >> $GITHUB_ENV
|
||||||
- name: Tag and push the main image
|
- name: Tag and push the main image
|
||||||
run: |
|
run: |
|
||||||
VERSION_TAG=${BASE}:${CLEAN_VERSION}
|
VERSION_TAG=${BASE}:${CLEAN_VERSION}
|
||||||
|
STABLE_TAG=${BASE}:stable
|
||||||
PULL_TAG=${BASE}:${BUILD_TAG}
|
PULL_TAG=${BASE}:${BUILD_TAG}
|
||||||
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG} docker://${VERSION_TAG}
|
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG} docker://${VERSION_TAG}
|
||||||
for variant in standard-arm64 tensorrt tensorrt-jp4 tensorrt-jp5 rk; do
|
for variant in standard-arm64 tensorrt tensorrt-jp4 tensorrt-jp5 rk; do
|
||||||
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG}-${variant} docker://${VERSION_TAG}-${variant}
|
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG}-${variant} docker://${VERSION_TAG}-${variant}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# stable tag
|
||||||
|
if [[ "${BUILD_TYPE}" == "stable" ]]; then
|
||||||
|
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG} docker://${STABLE_TAG}
|
||||||
|
for variant in standard-arm64 tensorrt tensorrt-jp4 tensorrt-jp5 rk; do
|
||||||
|
docker run --rm -v $HOME/.docker/config.json:/config.json quay.io/skopeo/stable:latest copy --authfile /config.json --multi-arch all docker://${PULL_TAG}-${variant} docker://${STABLE_TAG}-${variant}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|||||||
26
.github/workflows/stale.yml
vendored
26
.github/workflows/stale.yml
vendored
@@ -25,17 +25,17 @@ jobs:
|
|||||||
- name: Print outputs
|
- name: Print outputs
|
||||||
run: echo ${{ join(steps.stale.outputs.*, ',') }}
|
run: echo ${{ join(steps.stale.outputs.*, ',') }}
|
||||||
|
|
||||||
clean_ghcr:
|
# clean_ghcr:
|
||||||
name: Delete outdated dev container images
|
# name: Delete outdated dev container images
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- name: Delete old images
|
# - name: Delete old images
|
||||||
uses: snok/container-retention-policy@v2
|
# uses: snok/container-retention-policy@v2
|
||||||
with:
|
# with:
|
||||||
image-names: dev-*
|
# image-names: dev-*
|
||||||
cut-off: 60 days ago UTC
|
# cut-off: 60 days ago UTC
|
||||||
keep-at-least: 5
|
# keep-at-least: 5
|
||||||
account-type: personal
|
# account-type: personal
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
# token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
token-type: github-token
|
# token-type: github-token
|
||||||
|
|
||||||
|
|||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -16,4 +16,5 @@ web/node_modules
|
|||||||
web/coverage
|
web/coverage
|
||||||
core
|
core
|
||||||
!/web/**/*.ts
|
!/web/**/*.ts
|
||||||
.idea/*
|
.idea/*
|
||||||
|
.ipynb_checkpoints
|
||||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
|||||||
default_target: local
|
default_target: local
|
||||||
|
|
||||||
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
COMMIT_HASH := $(shell git log -1 --pretty=format:"%h"|tail -1)
|
||||||
VERSION = 0.14.0
|
VERSION = 0.14.1
|
||||||
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
|
IMAGE_REPO ?= ghcr.io/blakeblackshear/frigate
|
||||||
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
GITHUB_REF_NAME ?= $(shell git rev-parse --abbrev-ref HEAD)
|
||||||
CURRENT_UID := $(shell id -u)
|
CURRENT_UID := $(shell id -u)
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -29,18 +29,22 @@ If you would like to make a donation to support development, please use [Github
|
|||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
Integration into Home Assistant
|
### Live dashboard
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="docs/static/img/media_browser.png"><img src="docs/static/img/media_browser.png" height=400></a>
|
<img width="800" alt="Live dashboard" src="https://github.com/blakeblackshear/frigate/assets/569905/5e713cb9-9db5-41dc-947a-6937c3bc376e">
|
||||||
<a href="docs/static/img/notification.png"><img src="docs/static/img/notification.png" height=400></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Also comes with a builtin UI:
|
### Streamlined review workflow
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="docs/static/img/home-ui.png"><img src="docs/static/img/home-ui.png" height=400></a>
|
<img width="800" alt="Streamlined review workflow" src="https://github.com/blakeblackshear/frigate/assets/569905/6fed96e8-3b18-40e5-9ddc-31e6f3c9f2ff">
|
||||||
<a href="docs/static/img/camera-ui.png"><img src="docs/static/img/camera-ui.png" height=400></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||

|
### Multi-camera scrubbing
|
||||||
|
<div>
|
||||||
|
<img width="800" alt="Multi-camera scrubbing" src="https://github.com/blakeblackshear/frigate/assets/569905/d6788a15-0eeb-4427-a8d4-80b93cae3d74">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
### Built-in mask and zone editor
|
||||||
|
<div>
|
||||||
|
<img width="800" alt="Multi-camera scrubbing" src="https://github.com/blakeblackshear/frigate/assets/569905/d7885fc3-bfe6-452f-b7d0-d957cb3e31f5">
|
||||||
|
</div>
|
||||||
|
|||||||
@@ -35,13 +35,16 @@ ARG TARGETARCH
|
|||||||
WORKDIR /rootfs/usr/local/go2rtc/bin
|
WORKDIR /rootfs/usr/local/go2rtc/bin
|
||||||
ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.9.2/go2rtc_linux_${TARGETARCH}" go2rtc
|
ADD --link --chmod=755 "https://github.com/AlexxIT/go2rtc/releases/download/v1.9.2/go2rtc_linux_${TARGETARCH}" go2rtc
|
||||||
|
|
||||||
|
FROM wget AS tempio
|
||||||
|
ARG TARGETARCH
|
||||||
|
RUN --mount=type=bind,source=docker/main/install_tempio.sh,target=/deps/install_tempio.sh \
|
||||||
|
/deps/install_tempio.sh
|
||||||
|
|
||||||
####
|
####
|
||||||
#
|
#
|
||||||
# OpenVino Support
|
# OpenVino Support
|
||||||
#
|
#
|
||||||
# 1. Download and convert a model from Intel's Public Open Model Zoo
|
# 1. Download and convert a model from Intel's Public Open Model Zoo
|
||||||
# 2. Build libUSB without udev to handle NCS2 enumeration
|
|
||||||
#
|
#
|
||||||
####
|
####
|
||||||
# Download and Convert OpenVino model
|
# Download and Convert OpenVino model
|
||||||
@@ -57,11 +60,18 @@ RUN apt-get -qq update \
|
|||||||
&& pip install -r /requirements-ov.txt
|
&& pip install -r /requirements-ov.txt
|
||||||
|
|
||||||
# Get OpenVino Model
|
# Get OpenVino Model
|
||||||
RUN mkdir /models \
|
RUN --mount=type=bind,source=docker/main/build_ov_model.py,target=/build_ov_model.py \
|
||||||
&& cd /models && omz_downloader --name ssdlite_mobilenet_v2 \
|
mkdir /models && cd /models \
|
||||||
&& cd /models && omz_converter --name ssdlite_mobilenet_v2 --precision FP16
|
&& wget http://download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz \
|
||||||
|
&& tar -xvf ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz \
|
||||||
|
&& python3 /build_ov_model.py
|
||||||
|
|
||||||
|
####
|
||||||
|
#
|
||||||
|
# Coral Compatibility
|
||||||
|
#
|
||||||
|
# Builds libusb without udev. Needed for synology and other devices with USB coral
|
||||||
|
####
|
||||||
# libUSB - No Udev
|
# libUSB - No Udev
|
||||||
FROM wget as libusb-build
|
FROM wget as libusb-build
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
@@ -97,11 +107,12 @@ RUN wget -qO edgetpu_model.tflite https://github.com/google-coral/test_data/raw/
|
|||||||
RUN wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite
|
RUN wget -qO cpu_model.tflite https://github.com/google-coral/test_data/raw/release-frogfish/ssdlite_mobiledet_coco_qat_postprocess.tflite
|
||||||
COPY labelmap.txt .
|
COPY labelmap.txt .
|
||||||
# Copy OpenVino model
|
# Copy OpenVino model
|
||||||
COPY --from=ov-converter /models/public/ssdlite_mobilenet_v2/FP16 openvino-model
|
COPY --from=ov-converter /models/ssdlite_mobilenet_v2.xml openvino-model/
|
||||||
|
COPY --from=ov-converter /models/ssdlite_mobilenet_v2.bin openvino-model/
|
||||||
RUN wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt && \
|
RUN wget -q https://github.com/openvinotoolkit/open_model_zoo/raw/master/data/dataset_classes/coco_91cl_bkgr.txt -O openvino-model/coco_91cl_bkgr.txt && \
|
||||||
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
|
sed -i 's/truck/car/g' openvino-model/coco_91cl_bkgr.txt
|
||||||
# Get Audio Model and labels
|
# Get Audio Model and labels
|
||||||
RUN wget -qO cpu_audio_model.tflite https://tfhub.dev/google/lite-model/yamnet/classification/tflite/1?lite-format=tflite
|
RUN wget -qO - https://www.kaggle.com/api/v1/models/google/yamnet/tfLite/classification-tflite/1/download | tar xvz && mv 1.tflite cpu_audio_model.tflite
|
||||||
COPY audio-labelmap.txt .
|
COPY audio-labelmap.txt .
|
||||||
|
|
||||||
|
|
||||||
@@ -159,6 +170,7 @@ FROM scratch AS deps-rootfs
|
|||||||
COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
|
COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/
|
||||||
COPY --from=go2rtc /rootfs/ /
|
COPY --from=go2rtc /rootfs/ /
|
||||||
COPY --from=libusb-build /usr/local/lib /usr/local/lib
|
COPY --from=libusb-build /usr/local/lib /usr/local/lib
|
||||||
|
COPY --from=tempio /rootfs/ /
|
||||||
COPY --from=s6-overlay /rootfs/ /
|
COPY --from=s6-overlay /rootfs/ /
|
||||||
COPY --from=models /rootfs/ /
|
COPY --from=models /rootfs/ /
|
||||||
COPY docker/main/rootfs/ /
|
COPY docker/main/rootfs/ /
|
||||||
@@ -176,7 +188,7 @@ ARG APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
|
|||||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
|
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
|
||||||
|
|
||||||
ENV PATH="/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/nginx/sbin:${PATH}"
|
ENV PATH="/usr/lib/btbn-ffmpeg/bin:/usr/local/go2rtc/bin:/usr/local/tempio/bin:/usr/local/nginx/sbin:${PATH}"
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \
|
RUN --mount=type=bind,source=docker/main/install_deps.sh,target=/deps/install_deps.sh \
|
||||||
|
|||||||
11
docker/main/build_ov_model.py
Normal file
11
docker/main/build_ov_model.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import openvino as ov
|
||||||
|
from openvino.tools import mo
|
||||||
|
|
||||||
|
ov_model = mo.convert_model(
|
||||||
|
"/models/ssdlite_mobilenet_v2_coco_2018_05_09/frozen_inference_graph.pb",
|
||||||
|
compress_to_fp16=True,
|
||||||
|
transformations_config="/usr/local/lib/python3.9/dist-packages/openvino/tools/mo/front/tf/ssd_v2_support.json",
|
||||||
|
tensorflow_object_detection_api_pipeline_config="/models/ssdlite_mobilenet_v2_coco_2018_05_09/pipeline.config",
|
||||||
|
reverse_input_channels=True,
|
||||||
|
)
|
||||||
|
ov.save_model(ov_model, "/models/ssdlite_mobilenet_v2.xml")
|
||||||
@@ -40,7 +40,7 @@ apt-get -qq install --no-install-recommends --no-install-suggests -y \
|
|||||||
# btbn-ffmpeg -> amd64
|
# btbn-ffmpeg -> amd64
|
||||||
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
||||||
mkdir -p /usr/lib/btbn-ffmpeg
|
mkdir -p /usr/lib/btbn-ffmpeg
|
||||||
wget -qO btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux64-gpl-5.1.tar.xz"
|
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux64-gpl-5.1.tar.xz"
|
||||||
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
|
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
|
||||||
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
|
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
|
||||||
fi
|
fi
|
||||||
@@ -48,7 +48,7 @@ fi
|
|||||||
# ffmpeg -> arm64
|
# ffmpeg -> arm64
|
||||||
if [[ "${TARGETARCH}" == "arm64" ]]; then
|
if [[ "${TARGETARCH}" == "arm64" ]]; then
|
||||||
mkdir -p /usr/lib/btbn-ffmpeg
|
mkdir -p /usr/lib/btbn-ffmpeg
|
||||||
wget -qO btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linuxarm64-gpl-5.1.tar.xz"
|
wget -qO btbn-ffmpeg.tar.xz "https://github.com/NickM-27/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linuxarm64-gpl-5.1.tar.xz"
|
||||||
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
|
tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1
|
||||||
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
|
rm -rf btbn-ffmpeg.tar.xz /usr/lib/btbn-ffmpeg/doc /usr/lib/btbn-ffmpeg/bin/ffplay
|
||||||
fi
|
fi
|
||||||
|
|||||||
16
docker/main/install_tempio.sh
Executable file
16
docker/main/install_tempio.sh
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
tempio_version="2021.09.0"
|
||||||
|
|
||||||
|
if [[ "${TARGETARCH}" == "amd64" ]]; then
|
||||||
|
arch="amd64"
|
||||||
|
elif [[ "${TARGETARCH}" == "arm64" ]]; then
|
||||||
|
arch="aarch64"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p /rootfs/usr/local/tempio/bin
|
||||||
|
|
||||||
|
wget -q -O /rootfs/usr/local/tempio/bin/tempio "https://github.com/home-assistant/tempio/releases/download/${tempio_version}/tempio_${arch}"
|
||||||
|
chmod 755 /rootfs/usr/local/tempio/bin/tempio
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
numpy
|
numpy
|
||||||
# Openvino Library - Custom built with MYRIAD support
|
tensorflow
|
||||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64'
|
openvino-dev>=2024.0.0
|
||||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64'
|
|
||||||
openvino-dev[tensorflow2] @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino_dev-2022.3.1-1-py3-none-any.whl
|
|
||||||
@@ -2,9 +2,8 @@ click == 8.1.*
|
|||||||
Flask == 3.0.*
|
Flask == 3.0.*
|
||||||
Flask_Limiter == 3.7.*
|
Flask_Limiter == 3.7.*
|
||||||
imutils == 0.5.*
|
imutils == 0.5.*
|
||||||
joserfc == 0.10.*
|
joserfc == 0.11.*
|
||||||
markupsafe == 2.1.*
|
markupsafe == 2.1.*
|
||||||
matplotlib == 3.8.*
|
|
||||||
mypy == 1.6.1
|
mypy == 1.6.1
|
||||||
numpy == 1.26.*
|
numpy == 1.26.*
|
||||||
onvif_zeep == 0.2.12
|
onvif_zeep == 0.2.12
|
||||||
@@ -29,7 +28,5 @@ norfair == 2.2.*
|
|||||||
setproctitle == 1.3.*
|
setproctitle == 1.3.*
|
||||||
ws4py == 0.5.*
|
ws4py == 0.5.*
|
||||||
unidecode == 1.3.*
|
unidecode == 1.3.*
|
||||||
onnxruntime == 1.16.*
|
onnxruntime == 1.18.*
|
||||||
# Openvino Library - Custom built with MYRIAD support
|
openvino == 2024.1.*
|
||||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-manylinux_2_31_x86_64.whl; platform_machine == 'x86_64'
|
|
||||||
openvino @ https://github.com/NateMeyer/openvino-wheels/releases/download/multi-arch_2022.3.1/openvino-2022.3.1-1-cp39-cp39-linux_aarch64.whl; platform_machine == 'aarch64'
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
certsync
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
certsync-pipeline
|
||||||
4
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync-log/run
Executable file
4
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync-log/run
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
#!/command/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
|
||||||
|
exec logutil-service /dev/shm/logs/certsync
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
longrun
|
||||||
30
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/finish
Executable file
30
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/finish
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/command/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
# Take down the S6 supervision tree when the service fails
|
||||||
|
|
||||||
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
# Logs should be sent to stdout so that s6 can collect them
|
||||||
|
|
||||||
|
declare exit_code_container
|
||||||
|
exit_code_container=$(cat /run/s6-linux-init-container-results/exitcode)
|
||||||
|
readonly exit_code_container
|
||||||
|
readonly exit_code_service="${1}"
|
||||||
|
readonly exit_code_signal="${2}"
|
||||||
|
readonly service="CERTSYNC"
|
||||||
|
|
||||||
|
echo "[INFO] Service ${service} exited with code ${exit_code_service} (by signal ${exit_code_signal})"
|
||||||
|
|
||||||
|
if [[ "${exit_code_service}" -eq 256 ]]; then
|
||||||
|
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||||
|
echo $((128 + exit_code_signal)) >/run/s6-linux-init-container-results/exitcode
|
||||||
|
fi
|
||||||
|
if [[ "${exit_code_signal}" -eq 15 ]]; then
|
||||||
|
exec /run/s6/basedir/bin/halt
|
||||||
|
fi
|
||||||
|
elif [[ "${exit_code_service}" -ne 0 ]]; then
|
||||||
|
if [[ "${exit_code_container}" -eq 0 ]]; then
|
||||||
|
echo "${exit_code_service}" >/run/s6-linux-init-container-results/exitcode
|
||||||
|
fi
|
||||||
|
exec /run/s6/basedir/bin/halt
|
||||||
|
fi
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
certsync-log
|
||||||
58
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/run
Executable file
58
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/run
Executable file
@@ -0,0 +1,58 @@
|
|||||||
|
#!/command/with-contenv bash
|
||||||
|
# shellcheck shell=bash
|
||||||
|
# Start the CERTSYNC service
|
||||||
|
|
||||||
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
|
# Logs should be sent to stdout so that s6 can collect them
|
||||||
|
|
||||||
|
echo "[INFO] Starting certsync..."
|
||||||
|
|
||||||
|
lefile="/etc/letsencrypt/live/frigate/fullchain.pem"
|
||||||
|
|
||||||
|
tls_enabled=`python3 /usr/local/nginx/get_tls_settings.py | jq -r .enabled`
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
if [[ "$tls_enabled" == 'false' ]]; then
|
||||||
|
sleep 9999
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e $lefile ]
|
||||||
|
then
|
||||||
|
echo "[ERROR] TLS certificate does not exist: $lefile"
|
||||||
|
fi
|
||||||
|
|
||||||
|
leprint=`openssl x509 -in $lefile -fingerprint -noout 2>&1 || echo 'failed'`
|
||||||
|
|
||||||
|
case "$leprint" in
|
||||||
|
*Fingerprint*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "[ERROR] Missing fingerprint from $lefile"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
liveprint=`echo | openssl s_client -showcerts -connect 127.0.0.1:8971 2>&1 | openssl x509 -fingerprint 2>&1 | grep -i fingerprint || echo 'failed'`
|
||||||
|
|
||||||
|
case "$liveprint" in
|
||||||
|
*Fingerprint*)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "[ERROR] Missing fingerprint from current nginx TLS cert"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ "$leprint" != "failed" && "$liveprint" != "failed" && "$leprint" != "$liveprint" ]]
|
||||||
|
then
|
||||||
|
echo "[INFO] Reloading nginx to refresh TLS certificate"
|
||||||
|
echo "$lefile: $leprint"
|
||||||
|
/usr/local/nginx/sbin/nginx -s reload
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 60
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
30000
|
||||||
1
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/type
Normal file
1
docker/main/rootfs/etc/s6-overlay/s6-rc.d/certsync/type
Normal file
@@ -0,0 +1 @@
|
|||||||
|
longrun
|
||||||
@@ -16,8 +16,8 @@ function migrate_db_path() {
|
|||||||
if [[ -f "${config_file_yaml}" ]]; then
|
if [[ -f "${config_file_yaml}" ]]; then
|
||||||
config_file="${config_file_yaml}"
|
config_file="${config_file_yaml}"
|
||||||
elif [[ ! -f "${config_file}" ]]; then
|
elif [[ ! -f "${config_file}" ]]; then
|
||||||
echo "[ERROR] Frigate config file not found"
|
# Frigate will create the config file on startup
|
||||||
return 1
|
return 0
|
||||||
fi
|
fi
|
||||||
unset config_file_yaml
|
unset config_file_yaml
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
set -o errexit -o nounset -o pipefail
|
set -o errexit -o nounset -o pipefail
|
||||||
|
|
||||||
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx)
|
dirs=(/dev/shm/logs/frigate /dev/shm/logs/go2rtc /dev/shm/logs/nginx /dev/shm/logs/certsync)
|
||||||
|
|
||||||
mkdir -p "${dirs[@]}"
|
mkdir -p "${dirs[@]}"
|
||||||
chown nobody:nogroup "${dirs[@]}"
|
chown nobody:nogroup "${dirs[@]}"
|
||||||
|
|||||||
5
docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/data/check
Executable file
5
docker/main/rootfs/etc/s6-overlay/s6-rc.d/nginx/data/check
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Wait for PID file to exist.
|
||||||
|
while ! test -f /run/nginx.pid; do sleep 1; done
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
3
|
||||||
@@ -8,6 +8,84 @@ set -o errexit -o nounset -o pipefail
|
|||||||
|
|
||||||
echo "[INFO] Starting NGINX..."
|
echo "[INFO] Starting NGINX..."
|
||||||
|
|
||||||
|
# Taken from https://github.com/felipecrs/cgroup-scripts/commits/master/get_cpus.sh
|
||||||
|
function get_cpus() {
|
||||||
|
local quota=""
|
||||||
|
local period=""
|
||||||
|
|
||||||
|
if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
|
||||||
|
if [ -f /sys/fs/cgroup/cpu.max ]; then
|
||||||
|
read -r quota period </sys/fs/cgroup/cpu.max
|
||||||
|
if [ "$quota" = "max" ]; then
|
||||||
|
quota=""
|
||||||
|
period=""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "[WARN] /sys/fs/cgroup/cpu.max not found. Falling back to /proc/cpuinfo." >&2
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -f /sys/fs/cgroup/cpu/cpu.cfs_quota_us ] && [ -f /sys/fs/cgroup/cpu/cpu.cfs_period_us ]; then
|
||||||
|
quota=$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us)
|
||||||
|
period=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us)
|
||||||
|
|
||||||
|
if [ "$quota" = "-1" ]; then
|
||||||
|
quota=""
|
||||||
|
period=""
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "[WARN] /sys/fs/cgroup/cpu/cpu.cfs_quota_us or /sys/fs/cgroup/cpu/cpu.cfs_period_us not found. Falling back to /proc/cpuinfo." >&2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
local cpus
|
||||||
|
if [ "${period}" != "0" ] && [ -n "${quota}" ] && [ -n "${period}" ]; then
|
||||||
|
cpus=$((quota / period))
|
||||||
|
if [ "$cpus" -eq 0 ]; then
|
||||||
|
cpus=1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf '%s' "$cpus"
|
||||||
|
}
|
||||||
|
|
||||||
|
function set_worker_processes() {
|
||||||
|
# Capture number of assigned CPUs to calculate worker processes
|
||||||
|
local cpus
|
||||||
|
|
||||||
|
cpus=$(get_cpus)
|
||||||
|
if [[ "${cpus}" -gt 4 ]]; then
|
||||||
|
cpus=4
|
||||||
|
fi
|
||||||
|
|
||||||
|
# we need to catch any errors because sed will fail if user has bind mounted a custom nginx file
|
||||||
|
sed -i "s/worker_processes auto;/worker_processes ${cpus};/" /usr/local/nginx/conf/nginx.conf || true
|
||||||
|
}
|
||||||
|
|
||||||
|
set_worker_processes
|
||||||
|
|
||||||
|
# ensure the directory for ACME challenges exists
|
||||||
|
mkdir -p /etc/letsencrypt/www
|
||||||
|
|
||||||
|
# Create self signed certs if needed
|
||||||
|
letsencrypt_path=/etc/letsencrypt/live/frigate
|
||||||
|
mkdir -p $letsencrypt_path
|
||||||
|
|
||||||
|
if [ ! \( -f "$letsencrypt_path/privkey.pem" -a -f "$letsencrypt_path/fullchain.pem" \) ]; then
|
||||||
|
echo "[INFO] No TLS certificate found. Generating a self signed certificate..."
|
||||||
|
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
|
||||||
|
-subj "/O=FRIGATE DEFAULT CERT/CN=*" \
|
||||||
|
-keyout "$letsencrypt_path/privkey.pem" -out "$letsencrypt_path/fullchain.pem" 2>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
# build templates for optional TLS support
|
||||||
|
python3 /usr/local/nginx/get_tls_settings.py | \
|
||||||
|
tempio -template /usr/local/nginx/templates/listen.gotmpl \
|
||||||
|
-out /usr/local/nginx/conf/listen.conf
|
||||||
|
|
||||||
# Replace the bash process with the NGINX process, redirecting stderr to stdout
|
# Replace the bash process with the NGINX process, redirecting stderr to stdout
|
||||||
exec 2>&1
|
exec 2>&1
|
||||||
exec nginx
|
exec \
|
||||||
|
s6-notifyoncheck -t 30000 -n 1 \
|
||||||
|
nginx
|
||||||
|
|||||||
80
docker/main/rootfs/labelmap/coco-80.txt
Normal file
80
docker/main/rootfs/labelmap/coco-80.txt
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
0 person
|
||||||
|
1 bicycle
|
||||||
|
2 car
|
||||||
|
3 motorcycle
|
||||||
|
4 airplane
|
||||||
|
5 car
|
||||||
|
6 train
|
||||||
|
7 car
|
||||||
|
8 boat
|
||||||
|
9 traffic light
|
||||||
|
10 fire hydrant
|
||||||
|
11 stop sign
|
||||||
|
12 parking meter
|
||||||
|
13 bench
|
||||||
|
14 bird
|
||||||
|
15 cat
|
||||||
|
16 dog
|
||||||
|
17 horse
|
||||||
|
18 sheep
|
||||||
|
19 cow
|
||||||
|
20 elephant
|
||||||
|
21 bear
|
||||||
|
22 zebra
|
||||||
|
23 giraffe
|
||||||
|
24 backpack
|
||||||
|
25 umbrella
|
||||||
|
26 handbag
|
||||||
|
27 tie
|
||||||
|
28 suitcase
|
||||||
|
29 frisbee
|
||||||
|
30 skis
|
||||||
|
31 snowboard
|
||||||
|
32 sports ball
|
||||||
|
33 kite
|
||||||
|
34 baseball bat
|
||||||
|
35 baseball glove
|
||||||
|
36 skateboard
|
||||||
|
37 surfboard
|
||||||
|
38 tennis racket
|
||||||
|
39 bottle
|
||||||
|
40 wine glass
|
||||||
|
41 cup
|
||||||
|
42 fork
|
||||||
|
43 knife
|
||||||
|
44 spoon
|
||||||
|
45 bowl
|
||||||
|
46 banana
|
||||||
|
47 apple
|
||||||
|
48 sandwich
|
||||||
|
49 orange
|
||||||
|
50 broccoli
|
||||||
|
51 carrot
|
||||||
|
52 hot dog
|
||||||
|
53 pizza
|
||||||
|
54 donut
|
||||||
|
55 cake
|
||||||
|
56 chair
|
||||||
|
57 couch
|
||||||
|
58 potted plant
|
||||||
|
59 bed
|
||||||
|
60 dining table
|
||||||
|
61 toilet
|
||||||
|
62 tv
|
||||||
|
63 laptop
|
||||||
|
64 mouse
|
||||||
|
65 remote
|
||||||
|
66 keyboard
|
||||||
|
67 cell phone
|
||||||
|
68 microwave
|
||||||
|
69 oven
|
||||||
|
70 toaster
|
||||||
|
71 sink
|
||||||
|
72 refrigerator
|
||||||
|
73 book
|
||||||
|
74 clock
|
||||||
|
75 vase
|
||||||
|
76 scissors
|
||||||
|
77 teddy bear
|
||||||
|
78 hair drier
|
||||||
|
79 toothbrush
|
||||||
91
docker/main/rootfs/labelmap/coco.txt
Normal file
91
docker/main/rootfs/labelmap/coco.txt
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
0 person
|
||||||
|
1 bicycle
|
||||||
|
2 car
|
||||||
|
3 motorcycle
|
||||||
|
4 airplane
|
||||||
|
5 bus
|
||||||
|
6 train
|
||||||
|
7 car
|
||||||
|
8 boat
|
||||||
|
9 traffic light
|
||||||
|
10 fire hydrant
|
||||||
|
11 street sign
|
||||||
|
12 stop sign
|
||||||
|
13 parking meter
|
||||||
|
14 bench
|
||||||
|
15 bird
|
||||||
|
16 cat
|
||||||
|
17 dog
|
||||||
|
18 horse
|
||||||
|
19 sheep
|
||||||
|
20 cow
|
||||||
|
21 elephant
|
||||||
|
22 bear
|
||||||
|
23 zebra
|
||||||
|
24 giraffe
|
||||||
|
25 hat
|
||||||
|
26 backpack
|
||||||
|
27 umbrella
|
||||||
|
28 shoe
|
||||||
|
29 eye glasses
|
||||||
|
30 handbag
|
||||||
|
31 tie
|
||||||
|
32 suitcase
|
||||||
|
33 frisbee
|
||||||
|
34 skis
|
||||||
|
35 snowboard
|
||||||
|
36 sports ball
|
||||||
|
37 kite
|
||||||
|
38 baseball bat
|
||||||
|
39 baseball glove
|
||||||
|
40 skateboard
|
||||||
|
41 surfboard
|
||||||
|
42 tennis racket
|
||||||
|
43 bottle
|
||||||
|
44 plate
|
||||||
|
45 wine glass
|
||||||
|
46 cup
|
||||||
|
47 fork
|
||||||
|
48 knife
|
||||||
|
49 spoon
|
||||||
|
50 bowl
|
||||||
|
51 banana
|
||||||
|
52 apple
|
||||||
|
53 sandwich
|
||||||
|
54 orange
|
||||||
|
55 broccoli
|
||||||
|
56 carrot
|
||||||
|
57 hot dog
|
||||||
|
58 pizza
|
||||||
|
59 donut
|
||||||
|
60 cake
|
||||||
|
61 chair
|
||||||
|
62 couch
|
||||||
|
63 potted plant
|
||||||
|
64 bed
|
||||||
|
65 mirror
|
||||||
|
66 dining table
|
||||||
|
67 window
|
||||||
|
68 desk
|
||||||
|
69 toilet
|
||||||
|
70 door
|
||||||
|
71 tv
|
||||||
|
72 laptop
|
||||||
|
73 mouse
|
||||||
|
74 remote
|
||||||
|
75 keyboard
|
||||||
|
76 cell phone
|
||||||
|
77 microwave
|
||||||
|
78 oven
|
||||||
|
79 toaster
|
||||||
|
80 sink
|
||||||
|
81 refrigerator
|
||||||
|
82 blender
|
||||||
|
83 book
|
||||||
|
84 clock
|
||||||
|
85 vase
|
||||||
|
86 scissors
|
||||||
|
87 teddy bear
|
||||||
|
88 hair drier
|
||||||
|
89 toothbrush
|
||||||
|
90 hair brush
|
||||||
@@ -21,9 +21,9 @@ FRIGATE_ENV_VARS = {k: v for k, v in os.environ.items() if k.startswith("FRIGATE
|
|||||||
if os.path.isdir("/run/secrets"):
|
if os.path.isdir("/run/secrets"):
|
||||||
for secret_file in os.listdir("/run/secrets"):
|
for secret_file in os.listdir("/run/secrets"):
|
||||||
if secret_file.startswith("FRIGATE_"):
|
if secret_file.startswith("FRIGATE_"):
|
||||||
FRIGATE_ENV_VARS[secret_file] = Path(
|
FRIGATE_ENV_VARS[secret_file] = (
|
||||||
os.path.join("/run/secrets", secret_file)
|
Path(os.path.join("/run/secrets", secret_file)).read_text().strip()
|
||||||
).read_text()
|
)
|
||||||
|
|
||||||
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
|
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
upstream go2rtc {
|
||||||
|
server 127.0.0.1:1984;
|
||||||
|
keepalive 1024;
|
||||||
|
}
|
||||||
@@ -56,16 +56,10 @@ http {
|
|||||||
keepalive 1024;
|
keepalive 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
upstream go2rtc {
|
include go2rtc_upstream.conf;
|
||||||
server 127.0.0.1:1984;
|
|
||||||
keepalive 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
# intended for external traffic, protected by auth
|
include listen.conf;
|
||||||
listen [::]:8080 ipv6only=off;
|
|
||||||
# intended for internal traffic, not protected by auth
|
|
||||||
listen [::]:5000 ipv6only=off;
|
|
||||||
|
|
||||||
# vod settings
|
# vod settings
|
||||||
vod_base_url '';
|
vod_base_url '';
|
||||||
@@ -134,6 +128,8 @@ http {
|
|||||||
image/jpeg jpg;
|
image/jpeg jpg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
expires 7d;
|
||||||
|
add_header Cache-Control "public";
|
||||||
autoindex on;
|
autoindex on;
|
||||||
root /media/frigate;
|
root /media/frigate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Header used to validate reverse proxy trust
|
||||||
|
proxy_set_header X-Proxy-Secret $http_x_proxy_secret;
|
||||||
|
|
||||||
# these headers will be copied to the /auth request and are available
|
# these headers will be copied to the /auth request and are available
|
||||||
# to be mapped in the config to Frigate's remote-user header
|
# to be mapped in the config to Frigate's remote-user header
|
||||||
|
|
||||||
@@ -19,4 +22,4 @@ proxy_set_header X-authentik-username $http_x_authentik_username;
|
|||||||
proxy_set_header X-authentik-groups $http_x_authentik_groups;
|
proxy_set_header X-authentik-groups $http_x_authentik_groups;
|
||||||
proxy_set_header X-authentik-email $http_x_authentik_email;
|
proxy_set_header X-authentik-email $http_x_authentik_email;
|
||||||
proxy_set_header X-authentik-name $http_x_authentik_name;
|
proxy_set_header X-authentik-name $http_x_authentik_name;
|
||||||
proxy_set_header X-authentik-uid $http_x_authentik_uid;
|
proxy_set_header X-authentik-uid $http_x_authentik_uid;
|
||||||
|
|||||||
28
docker/main/rootfs/usr/local/nginx/get_tls_settings.py
Normal file
28
docker/main/rootfs/usr/local/nginx/get_tls_settings.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
"""Prints the tls config as json to stdout."""
|
||||||
|
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
|
||||||
|
|
||||||
|
# Check if we can use .yaml instead of .yml
|
||||||
|
config_file_yaml = config_file.replace(".yml", ".yaml")
|
||||||
|
if os.path.isfile(config_file_yaml):
|
||||||
|
config_file = config_file_yaml
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(config_file) as f:
|
||||||
|
raw_config = f.read()
|
||||||
|
|
||||||
|
if config_file.endswith((".yaml", ".yml")):
|
||||||
|
config: dict[str, any] = yaml.safe_load(raw_config)
|
||||||
|
elif config_file.endswith(".json"):
|
||||||
|
config: dict[str, any] = json.loads(raw_config)
|
||||||
|
except FileNotFoundError:
|
||||||
|
config: dict[str, any] = {}
|
||||||
|
|
||||||
|
tls_config: dict[str, any] = config.get("tls", {"enabled": True})
|
||||||
|
|
||||||
|
print(json.dumps(tls_config))
|
||||||
33
docker/main/rootfs/usr/local/nginx/templates/listen.gotmpl
Normal file
33
docker/main/rootfs/usr/local/nginx/templates/listen.gotmpl
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
# intended for internal traffic, not protected by auth
|
||||||
|
listen 5000;
|
||||||
|
|
||||||
|
{{ if not .enabled }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen 8971;
|
||||||
|
{{ else }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen 8971 ssl;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/frigate/fullchain.pem;
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/frigate/privkey.pem;
|
||||||
|
|
||||||
|
# generated 2024-06-01, Mozilla Guideline v5.7, nginx 1.25.3, OpenSSL 1.1.1w, modern configuration, no OCSP
|
||||||
|
# https://ssl-config.mozilla.org/#server=nginx&version=1.25.3&config=modern&openssl=1.1.1w&ocsp=false&guideline=5.7
|
||||||
|
ssl_session_timeout 1d;
|
||||||
|
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
|
||||||
|
ssl_session_tickets off;
|
||||||
|
|
||||||
|
# modern configuration
|
||||||
|
ssl_protocols TLSv1.3;
|
||||||
|
ssl_prefer_server_ciphers off;
|
||||||
|
|
||||||
|
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
|
||||||
|
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||||
|
|
||||||
|
# ACME challenge location
|
||||||
|
location /.well-known/acme-challenge/ {
|
||||||
|
default_type "text/plain";
|
||||||
|
root /etc/letsencrypt/www;
|
||||||
|
}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
@@ -22,5 +22,5 @@ ADD https://github.com/MarcA711/rknn-toolkit2/releases/download/v2.0.0/librknnrt
|
|||||||
|
|
||||||
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffmpeg
|
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffmpeg
|
||||||
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffprobe
|
RUN rm -rf /usr/lib/btbn-ffmpeg/bin/ffprobe
|
||||||
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-3/ffmpeg /usr/lib/btbn-ffmpeg/bin/
|
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-5/ffmpeg /usr/lib/btbn-ffmpeg/bin/
|
||||||
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-3/ffprobe /usr/lib/btbn-ffmpeg/bin/
|
ADD --chmod=111 https://github.com/MarcA711/Rockchip-FFmpeg-Builds/releases/download/6.1-5/ffprobe /usr/lib/btbn-ffmpeg/bin/
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ title: Advanced Options
|
|||||||
sidebar_label: Advanced Options
|
sidebar_label: Advanced Options
|
||||||
---
|
---
|
||||||
|
|
||||||
### `logger`
|
### Logging
|
||||||
|
|
||||||
|
#### Frigate `logger`
|
||||||
|
|
||||||
Change the default log level for troubleshooting purposes.
|
Change the default log level for troubleshooting purposes.
|
||||||
|
|
||||||
@@ -28,6 +30,18 @@ Examples of available modules are:
|
|||||||
- `watchdog.<camera_name>`
|
- `watchdog.<camera_name>`
|
||||||
- `ffmpeg.<camera_name>.<sorted_roles>` NOTE: All FFmpeg logs are sent as `error` level.
|
- `ffmpeg.<camera_name>.<sorted_roles>` NOTE: All FFmpeg logs are sent as `error` level.
|
||||||
|
|
||||||
|
#### Go2RTC Logging
|
||||||
|
|
||||||
|
See [the go2rtc docs](for logging configuration)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
...
|
||||||
|
log:
|
||||||
|
exec: trace
|
||||||
|
```
|
||||||
|
|
||||||
### `environment_vars`
|
### `environment_vars`
|
||||||
|
|
||||||
This section can be used to set environment variables for those unable to modify the environment of the container (ie. within HassOS)
|
This section can be used to set environment variables for those unable to modify the environment of the container (ie. within HassOS)
|
||||||
@@ -80,6 +94,14 @@ model:
|
|||||||
input_pixel_format: "bgr"
|
input_pixel_format: "bgr"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### `labelmap`
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
|
||||||
|
If the labelmap is customized then the labels used for alerts will need to be adjusted as well. See [alert labels](../configuration/review.md#restricting-alerts-to-specific-labels) for more info.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. By default, truck is renamed to car because they are often confused. You cannot add new object types, but you can change the names of existing objects in the model.
|
The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. By default, truck is renamed to car because they are often confused. You cannot add new object types, but you can change the names of existing objects in the model.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -106,7 +128,53 @@ Some labels have special handling and modifications can disable functionality.
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Custom ffmpeg build
|
## Network Configuration
|
||||||
|
|
||||||
|
Changes to Frigate's internal network configuration can be made by bind mounting nginx.conf into the container. For example:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
frigate:
|
||||||
|
container_name: frigate
|
||||||
|
...
|
||||||
|
volumes:
|
||||||
|
...
|
||||||
|
- /path/to/your/nginx.conf:/usr/local/nginx/conf/nginx.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enabling IPv6
|
||||||
|
|
||||||
|
IPv6 is disabled by default, to enable IPv6 listen.gotmpl needs to be bind mounted with IPv6 enabled. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ if not .enabled }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen 8971;
|
||||||
|
{{ else }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen 8971 ssl;
|
||||||
|
|
||||||
|
# intended for internal traffic, not protected by auth
|
||||||
|
listen 5000;
|
||||||
|
```
|
||||||
|
|
||||||
|
becomes
|
||||||
|
|
||||||
|
```
|
||||||
|
{{ if not .enabled }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen [::]:8971 ipv6only=off;
|
||||||
|
{{ else }}
|
||||||
|
# intended for external traffic, protected by auth
|
||||||
|
listen [::]:8971 ipv6only=off ssl;
|
||||||
|
|
||||||
|
# intended for internal traffic, not protected by auth
|
||||||
|
listen [::]:5000 ipv6only=off;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Custom Dependencies
|
||||||
|
|
||||||
|
### Custom ffmpeg build
|
||||||
|
|
||||||
Included with Frigate is a build of ffmpeg that works for the vast majority of users. However, there exists some hardware setups which have incompatibilities with the included build. In this case, a docker volume mapping can be used to overwrite the included ffmpeg build with an ffmpeg build that works for your specific hardware setup.
|
Included with Frigate is a build of ffmpeg that works for the vast majority of users. However, there exists some hardware setups which have incompatibilities with the included build. In this case, a docker volume mapping can be used to overwrite the included ffmpeg build with an ffmpeg build that works for your specific hardware setup.
|
||||||
|
|
||||||
@@ -118,9 +186,9 @@ To do this:
|
|||||||
|
|
||||||
NOTE: The folder that is mapped from the host needs to be the folder that contains `/bin`. So if the full structure is `/home/appdata/frigate/custom-ffmpeg/bin/ffmpeg` then `/home/appdata/frigate/custom-ffmpeg` needs to be mapped to `/usr/lib/btbn-ffmpeg`.
|
NOTE: The folder that is mapped from the host needs to be the folder that contains `/bin`. So if the full structure is `/home/appdata/frigate/custom-ffmpeg/bin/ffmpeg` then `/home/appdata/frigate/custom-ffmpeg` needs to be mapped to `/usr/lib/btbn-ffmpeg`.
|
||||||
|
|
||||||
## Custom go2rtc version
|
### Custom go2rtc version
|
||||||
|
|
||||||
Frigate currently includes go2rtc v1.9.2, there may be certain cases where you want to run a different version of go2rtc.
|
Frigate currently includes go2rtc v1.9.4, there may be certain cases where you want to run a different version of go2rtc.
|
||||||
|
|
||||||
To do this:
|
To do this:
|
||||||
|
|
||||||
@@ -129,7 +197,7 @@ To do this:
|
|||||||
3. Give `go2rtc` execute permission.
|
3. Give `go2rtc` execute permission.
|
||||||
4. Restart Frigate and the custom version will be used, you can verify by checking go2rtc logs.
|
4. Restart Frigate and the custom version will be used, you can verify by checking go2rtc logs.
|
||||||
|
|
||||||
## Validating your config.yaml file updates
|
## Validating your config.yml file updates
|
||||||
|
|
||||||
When frigate starts up, it checks whether your config file is valid, and if it is not, the process exits. To minimize interruptions when updating your config, you have three options -- you can edit the config via the WebUI which has built in validation, use the config API, or you can validate on the command line using the frigate docker container.
|
When frigate starts up, it checks whether your config file is valid, and if it is not, the process exits. To minimize interruptions when updating your config, you have three options -- you can edit the config via the WebUI which has built in validation, use the config API, or you can validate on the command line using the frigate docker container.
|
||||||
|
|
||||||
|
|||||||
@@ -5,30 +5,31 @@ title: Authentication
|
|||||||
|
|
||||||
# Authentication
|
# Authentication
|
||||||
|
|
||||||
## Modes
|
|
||||||
|
|
||||||
Frigate supports two modes for authentication
|
|
||||||
|
|
||||||
| Mode | Description |
|
|
||||||
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| `native` | (default) Use this mode if you don't implement authentication with a proxy in front of Frigate. |
|
|
||||||
| `proxy` | Use this mode if you have an existing proxy for authentication. Supports passing authenticated user downstream to Frigate for role-based authorization (future implementation). |
|
|
||||||
|
|
||||||
### Native mode
|
|
||||||
|
|
||||||
Frigate stores user information in its database. Password hashes are generated using industry standard PBKDF2-SHA256 with 600,000 iterations. Upon successful login, a JWT token is issued with an expiration date and set as a cookie. The cookie is refreshed as needed automatically. This JWT token can also be passed in the Authorization header as a bearer token.
|
Frigate stores user information in its database. Password hashes are generated using industry standard PBKDF2-SHA256 with 600,000 iterations. Upon successful login, a JWT token is issued with an expiration date and set as a cookie. The cookie is refreshed as needed automatically. This JWT token can also be passed in the Authorization header as a bearer token.
|
||||||
|
|
||||||
Users are managed in the UI under Settings > Users.
|
Users are managed in the UI under Settings > Users.
|
||||||
|
|
||||||
#### Onboarding
|
The following ports are available to access the Frigate web UI.
|
||||||
|
|
||||||
|
| Port | Description |
|
||||||
|
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||||
|
| `8971` | Authenticated UI and API. Reverse proxies should use this port. |
|
||||||
|
| `5000` | Internal unauthenticated UI and API access. Access to this port should be limited. Intended to be used within the docker network for services that integrate with Frigate and do not support authentication. |
|
||||||
|
|
||||||
|
## Onboarding
|
||||||
|
|
||||||
On startup, an admin user and password are generated and printed in the logs. It is recommended to set a new password for the admin account after logging in for the first time under Settings > Users.
|
On startup, an admin user and password are generated and printed in the logs. It is recommended to set a new password for the admin account after logging in for the first time under Settings > Users.
|
||||||
|
|
||||||
#### Resetting admin password
|
## Resetting admin password
|
||||||
|
|
||||||
In the event that you are locked out of your instance, you can tell Frigate to reset the admin password and print it in the logs on next startup using the `reset_admin_password` setting in your config file.
|
In the event that you are locked out of your instance, you can tell Frigate to reset the admin password and print it in the logs on next startup using the `reset_admin_password` setting in your config file.
|
||||||
|
|
||||||
#### Login failure rate limiting
|
```yaml
|
||||||
|
auth:
|
||||||
|
reset_admin_password: true
|
||||||
|
```
|
||||||
|
|
||||||
|
## Login failure rate limiting
|
||||||
|
|
||||||
In order to limit the risk of brute force attacks, rate limiting is available for login failures. This is implemented with Flask-Limiter, and the string notation for valid values is available in [the documentation](https://flask-limiter.readthedocs.io/en/stable/configuration.html#rate-limit-string-notation).
|
In order to limit the risk of brute force attacks, rate limiting is available for login failures. This is implemented with Flask-Limiter, and the string notation for valid values is available in [the documentation](https://flask-limiter.readthedocs.io/en/stable/configuration.html#rate-limit-string-notation).
|
||||||
|
|
||||||
@@ -46,22 +47,60 @@ If you are running a reverse proxy in the same docker compose file as Frigate, h
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
auth:
|
auth:
|
||||||
mode: native
|
|
||||||
failed_login_rate_limit: "1/second;5/minute;20/hour"
|
failed_login_rate_limit: "1/second;5/minute;20/hour"
|
||||||
trusted_proxies:
|
trusted_proxies:
|
||||||
- 172.18.0.0/16 # <---- this is the subnet for the internal docker compose network
|
- 172.18.0.0/16 # <---- this is the subnet for the internal docker compose network
|
||||||
```
|
```
|
||||||
|
|
||||||
### Proxy mode
|
## JWT Token Secret
|
||||||
|
|
||||||
Proxy mode is designed to complement common upstream authentication proxies such as Authelia, Authentik, oauth2_proxy, or traefik-forward-auth.
|
The JWT token secret needs to be kept secure. Anyone with this secret can generate valid JWT tokens to authenticate with Frigate. This should be a cryptographically random string of at least 64 characters.
|
||||||
|
|
||||||
#### Header mapping
|
You can generate a token using the Python secret library with the following command:
|
||||||
|
|
||||||
If your proxy supports passing a header with the authenticated username, you can use the `header_map` config to specify the header name so it is passed to Frigate. For example, the following will map the `X-Forwarded-User` value. Header names are not case sensitive.
|
```shell
|
||||||
|
python3 -c 'import secrets; print(secrets.token_hex(64))'
|
||||||
|
```
|
||||||
|
|
||||||
|
Frigate looks for a JWT token secret in the following order:
|
||||||
|
|
||||||
|
1. An environment variable named `FRIGATE_JWT_SECRET`
|
||||||
|
2. A docker secret named `FRIGATE_JWT_SECRET` in `/run/secrets/`
|
||||||
|
3. A `jwt_secret` option from the Home Assistant Addon options
|
||||||
|
4. A `.jwt_secret` file in the config directory
|
||||||
|
|
||||||
|
If no secret is found on startup, Frigate generates one and stores it in a `.jwt_secret` file in the config directory.
|
||||||
|
|
||||||
|
Changing the secret will invalidate current tokens.
|
||||||
|
|
||||||
|
## Proxy configuration
|
||||||
|
|
||||||
|
Frigate can be configured to leverage features of common upstream authentication proxies such as Authelia, Authentik, oauth2_proxy, or traefik-forward-auth.
|
||||||
|
|
||||||
|
If you are leveraging the authentication of an upstream proxy, you likely want to disable Frigate's authentication. Optionally, if communication between the reverse proxy and Frigate is over an untrusted network, you should set an `auth_secret` in the `proxy` config and configure the proxy to send the secret value as a header named `X-Proxy-Secret`. Assuming this is an untrusted network, you will also want to [configure a real TLS certificate](tls.md) to ensure the traffic can't simply be sniffed to steal the secret.
|
||||||
|
|
||||||
|
Here is an example of how to disable Frigate's authentication and also ensure the requests come only from your known proxy.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
auth:
|
auth:
|
||||||
|
enabled: False
|
||||||
|
|
||||||
|
proxy:
|
||||||
|
auth_secret: <some random long string>
|
||||||
|
```
|
||||||
|
|
||||||
|
You can use the following code to generate a random secret.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
python3 -c 'import secrets; print(secrets.token_hex(64))'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Header mapping
|
||||||
|
|
||||||
|
If you have disabled Frigate's authentication and your proxy supports passing a header with the authenticated username, you can use the `header_map` config to specify the header name so it is passed to Frigate. For example, the following will map the `X-Forwarded-User` value. Header names are not case sensitive.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
proxy:
|
||||||
...
|
...
|
||||||
header_map:
|
header_map:
|
||||||
user: x-forwarded-user
|
user: x-forwarded-user
|
||||||
@@ -89,10 +128,10 @@ If you would like to add more options, you can overwrite the default file with a
|
|||||||
|
|
||||||
Future versions of Frigate may leverage group and role headers for authorization in Frigate as well.
|
Future versions of Frigate may leverage group and role headers for authorization in Frigate as well.
|
||||||
|
|
||||||
#### Login page redirection
|
### Login page redirection
|
||||||
|
|
||||||
Frigate gracefully performs login page redirection that should work with most authentication proxies. If your reverse proxy returns a `Location` header on `401`, `302`, or `307` unauthorized responses, Frigate's frontend will automatically detect it and redirect to that URL.
|
Frigate gracefully performs login page redirection that should work with most authentication proxies. If your reverse proxy returns a `Location` header on `401`, `302`, or `307` unauthorized responses, Frigate's frontend will automatically detect it and redirect to that URL.
|
||||||
|
|
||||||
#### Custom logout url
|
### Custom logout url
|
||||||
|
|
||||||
If your reverse proxy has a dedicated logout url, you can specify using the `logout_url` config option. This will update the link for the `Logout` link in the UI.
|
If your reverse proxy has a dedicated logout url, you can specify using the `logout_url` config option. This will update the link for the `Logout` link in the UI.
|
||||||
|
|||||||
@@ -9,6 +9,12 @@ This page makes use of presets of FFmpeg args. For more information on presets,
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
Many cameras support encoding options which greatly affect the live view experience, see the [Live view](/configuration/live) page for more info.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## MJPEG Cameras
|
## MJPEG Cameras
|
||||||
|
|
||||||
Note that mjpeg cameras require encoding the video into h264 for recording, and restream roles. This will use significantly more CPU than if the cameras supported h264 feeds directly. It is recommended to use the restream role to create an h264 restream and then use that as the source for ffmpeg.
|
Note that mjpeg cameras require encoding the video into h264 for recording, and restream roles. This will use significantly more CPU than if the cameras supported h264 feeds directly. It is recommended to use the restream role to create an h264 restream and then use that as the source for ffmpeg.
|
||||||
@@ -59,6 +65,18 @@ ffmpeg:
|
|||||||
|
|
||||||
## Model/vendor specific setup
|
## Model/vendor specific setup
|
||||||
|
|
||||||
|
### Amcrest & Dahua
|
||||||
|
|
||||||
|
Amcrest & Dahua cameras should be connected to via RTSP using the following format:
|
||||||
|
|
||||||
|
```
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/cam/realmonitor?channel=1&subtype=0 # this is the main stream
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/cam/realmonitor?channel=1&subtype=1 # this is the sub stream, typically supporting low resolutions only
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/cam/realmonitor?channel=1&subtype=2 # higher end cameras support a third stream with a mid resolution (1280x720, 1920x1080)
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/cam/realmonitor?channel=1&subtype=3 # new higher end cameras support a fourth stream with another mid resolution (1280x720, 1920x1080)
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
### Annke C800
|
### Annke C800
|
||||||
|
|
||||||
This camera is H.265 only. To be able to play clips on some devices (like MacOs or iPhone) the H.265 stream has to be repackaged and the audio stream has to be converted to aac. Unfortunately direct playback of in the browser is not working (yet), but the downloaded clip can be played locally.
|
This camera is H.265 only. To be able to play clips on some devices (like MacOs or iPhone) the H.265 stream has to be repackaged and the audio stream has to be converted to aac. Unfortunately direct playback of in the browser is not working (yet), but the downloaded clip can be played locally.
|
||||||
@@ -71,7 +89,7 @@ cameras:
|
|||||||
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
|
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -tag:v hvc1 -bsf:v hevc_mp4toannexb -c:a aac
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://user:password@camera-ip:554/H264/ch1/main/av_stream # <----- Update for your camera
|
- path: rtsp://USERNAME:PASSWORD@CAMERA-IP/H264/ch1/main/av_stream # <----- Update for your camera
|
||||||
roles:
|
roles:
|
||||||
- detect
|
- detect
|
||||||
- record
|
- record
|
||||||
@@ -89,6 +107,29 @@ ffmpeg:
|
|||||||
input_args: preset-rtsp-blue-iris
|
input_args: preset-rtsp-blue-iris
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Hikvision Cameras
|
||||||
|
|
||||||
|
Hikvision cameras should be connected to via RTSP using the following format:
|
||||||
|
|
||||||
|
```
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/streaming/channels/101 # this is the main stream
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/streaming/channels/102 # this is the sub stream, typically supporting low resolutions only
|
||||||
|
rtsp://USERNAME:PASSWORD@CAMERA-IP/streaming/channels/103 # higher end cameras support a third stream with a mid resolution (1280x720, 1920x1080)
|
||||||
|
```
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
[Some users have reported](https://www.reddit.com/r/frigate_nvr/comments/1hg4ze7/hikvision_security_settings) that newer Hikvision cameras require adjustments to the security settings:
|
||||||
|
|
||||||
|
```
|
||||||
|
RTSP Authentication - digest/basic
|
||||||
|
RTSP Digest Algorithm - MD5
|
||||||
|
WEB Authentication - digest/basic
|
||||||
|
WEB Digest Algorithm - MD5
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
### Reolink Cameras
|
### Reolink Cameras
|
||||||
|
|
||||||
Reolink has older cameras (ex: 410 & 520) as well as newer camera (ex: 520a & 511wa) which support different subsets of options. In both cases using the http stream is recommended.
|
Reolink has older cameras (ex: 410 & 520) as well as newer camera (ex: 520a & 511wa) which support different subsets of options. In both cases using the http stream is recommended.
|
||||||
@@ -175,7 +216,7 @@ go2rtc:
|
|||||||
- rtspx://192.168.1.1:7441/abcdefghijk
|
- rtspx://192.168.1.1:7441/abcdefghijk
|
||||||
```
|
```
|
||||||
|
|
||||||
[See the go2rtc docs for more information](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#source-rtsp)
|
[See the go2rtc docs for more information](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-rtsp)
|
||||||
|
|
||||||
In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record if used directly with unifi protect.
|
In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record if used directly with unifi protect.
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,14 @@ cameras:
|
|||||||
side: ...
|
side: ...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
If you only define one stream in your `inputs` and do not assign a `detect` role to it, Frigate will automatically assign it the `detect` role. Frigate will always decode a stream to support motion detection, Birdseye, the API image endpoints, and other features, even if you have disabled object detection with `enabled: False` in your config's `detect` section.
|
||||||
|
|
||||||
|
If you plan to use Frigate for recording only, it is still recommended to define a `detect` role for a low resolution stream to minimize resource usage from the required stream decoding.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
For camera model specific settings check the [camera specific](camera_specific.md) infos.
|
For camera model specific settings check the [camera specific](camera_specific.md) infos.
|
||||||
|
|
||||||
## Setting up camera PTZ controls
|
## Setting up camera PTZ controls
|
||||||
@@ -71,33 +79,41 @@ cameras:
|
|||||||
|
|
||||||
If the ONVIF connection is successful, PTZ controls will be available in the camera's WebUI.
|
If the ONVIF connection is successful, PTZ controls will be available in the camera's WebUI.
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
If your ONVIF camera does not require authentication credentials, you may still need to specify an empty string for `user` and `password`, eg: `user: ""` and `password: ""`.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
An ONVIF-capable camera that supports relative movement within the field of view (FOV) can also be configured to automatically track moving objects and keep them in the center of the frame. For autotracking setup, see the [autotracking](autotracking.md) docs.
|
An ONVIF-capable camera that supports relative movement within the field of view (FOV) can also be configured to automatically track moving objects and keep them in the center of the frame. For autotracking setup, see the [autotracking](autotracking.md) docs.
|
||||||
|
|
||||||
## ONVIF PTZ camera recommendations
|
## ONVIF PTZ camera recommendations
|
||||||
|
|
||||||
This list of working and non-working PTZ cameras is based on user feedback.
|
This list of working and non-working PTZ cameras is based on user feedback.
|
||||||
|
|
||||||
| Brand or specific camera | PTZ Controls | Autotracking | Notes |
|
| Brand or specific camera | PTZ Controls | Autotracking | Notes |
|
||||||
| ------------------------ | :----------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ---------------------------- | :----------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| Amcrest | ✅ | ✅ | ⛔️ Generally, Amcrest should work, but some older models (like the common IP2M-841) don't support auto tracking |
|
| Amcrest | ✅ | ✅ | ⛔️ Generally, Amcrest should work, but some older models (like the common IP2M-841) don't support autotracking |
|
||||||
| Amcrest ASH21 | ❌ | ❌ | No ONVIF support |
|
| Amcrest ASH21 | ✅ | ❌ | ONVIF service port: 80 |
|
||||||
| Ctronics PTZ | ✅ | ❌ | |
|
| Amcrest IP4M-S2112EW-AI | ✅ | ❌ | FOV relative movement not supported. |
|
||||||
| Dahua | ✅ | ✅ | |
|
| Amcrest IP5M-1190EW | ✅ | ❌ | ONVIF Port: 80. FOV relative movement not supported. |
|
||||||
| Foscam R5 | ✅ | ❌ | |
|
| Ctronics PTZ | ✅ | ❌ | |
|
||||||
| Hanwha XNP-6550RH | ✅ | ❌ | |
|
| Dahua | ✅ | ✅ | |
|
||||||
| Hikvision | ✅ | ❌ | Incomplete ONVIF support (MoveStatus won't update even on latest firmware) - reported with HWP-N4215IH-DE and DS-2DE3304W-DE, but likely others |
|
| Dahua DH-SD2A500HB | ✅ | ❌ | |
|
||||||
| Reolink 511WA | ✅ | ❌ | Zoom only |
|
| Foscam R5 | ✅ | ❌ | |
|
||||||
| Reolink E1 Pro | ✅ | ❌ | |
|
| Hanwha XNP-6550RH | ✅ | ❌ | |
|
||||||
| Reolink E1 Zoom | ✅ | ❌ | |
|
| Hikvision | ✅ | ❌ | Incomplete ONVIF support (MoveStatus won't update even on latest firmware) - reported with HWP-N4215IH-DE and DS-2DE3304W-DE, but likely others |
|
||||||
| Reolink RLC-823A 16x | ✅ | ❌ | |
|
| Hikvision DS-2DE3A404IWG-E/W | ✅ | ✅ | |
|
||||||
| Sunba 405-D20X | ✅ | ❌ | |
|
| Reolink 511WA | ✅ | ❌ | Zoom only |
|
||||||
| Tapo C200 | ✅ | ❌ | Incomplete ONVIF support |
|
| Reolink E1 Pro | ✅ | ❌ | |
|
||||||
| Tapo C210 | ✅ | ❌ | Incomplete ONVIF support, ONVIF Service Port: 2020 |
|
| Reolink E1 Zoom | ✅ | ❌ | |
|
||||||
| Tapo C220 | ✅ | ❌ | Incomplete ONVIF support, ONVIF Service Port: 2020 |
|
| Reolink RLC-823A 16x | ✅ | ❌ | |
|
||||||
| Tapo C225 | ✅ | ❌ | Incomplete ONVIF support, ONVIF Service Port: 2020 |
|
| Speco O8P32X | ✅ | ❌ | |
|
||||||
| Tapo C520WS | ✅ | ❌ | Incomplete ONVIF support, ONVIF Service Port: 2020 |
|
| Sunba 405-D20X | ✅ | ❌ | |
|
||||||
| Uniview IPC672LR-AX4DUPK | ✅ | ❌ | Firmware says FOV relative movement is supported, but camera doesn't actually move when sending ONVIF commands |
|
| Tapo | ✅ | ❌ | Many models supported, ONVIF Service Port: 2020 |
|
||||||
| Vikylin PTZ-2804X-I2 | ❌ | ❌ | Incomplete ONVIF support |
|
| Uniview IPC672LR-AX4DUPK | ✅ | ❌ | Firmware says FOV relative movement is supported, but camera doesn't actually move when sending ONVIF commands |
|
||||||
|
| Uniview IPC6612SR-X33-VG | ✅ | ✅ | Leave `calibrate_on_startup` as `False`. A user has reported that zooming with `absolute` is working. |
|
||||||
|
| Vikylin PTZ-2804X-I2 | ❌ | ❌ | Incomplete ONVIF support |
|
||||||
|
|
||||||
## Setting up camera groups
|
## Setting up camera groups
|
||||||
|
|
||||||
@@ -115,6 +131,6 @@ camera_groups:
|
|||||||
cameras:
|
cameras:
|
||||||
- driveway_cam
|
- driveway_cam
|
||||||
- garage_cam
|
- garage_cam
|
||||||
icon: car
|
icon: LuCar
|
||||||
order: 0
|
order: 0
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Depending on your system, these parameters may not be compatible. More informati
|
|||||||
|
|
||||||
## Raspberry Pi 3/4
|
## Raspberry Pi 3/4
|
||||||
|
|
||||||
Ensure you increase the allocated RAM for your GPU to at least 128 (`raspi-config` > Performance Options > GPU Memory).
|
Ensure you increase the allocated RAM for your GPU to at least 128 (`raspi-config` > Performance Options > GPU Memory).
|
||||||
If you are using the HA addon, you may need to use the full access variant and turn off `Protection mode` for hardware acceleration.
|
If you are using the HA addon, you may need to use the full access variant and turn off `Protection mode` for hardware acceleration.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -67,7 +67,7 @@ Or map in all the `/dev/video*` devices.
|
|||||||
|
|
||||||
### Via VAAPI
|
### Via VAAPI
|
||||||
|
|
||||||
VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. VAAPI is recommended for all generations of Intel-based CPUs if QSV does not work.
|
VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. VAAPI is recommended for all generations of Intel-based CPUs.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
@@ -82,7 +82,7 @@ With some of the processors, like the J4125, the default driver `iHD` doesn't se
|
|||||||
|
|
||||||
### Via Quicksync (>=10th Generation only)
|
### Via Quicksync (>=10th Generation only)
|
||||||
|
|
||||||
QSV must be set specifically based on the video encoding of the stream.
|
If VAAPI does not work for you, you can try QSV if your processor supports it. QSV must be set specifically based on the video encoding of the stream.
|
||||||
|
|
||||||
#### H.264 streams
|
#### H.264 streams
|
||||||
|
|
||||||
@@ -362,43 +362,15 @@ that NVDEC/NVDEC1 are in use.
|
|||||||
|
|
||||||
## Rockchip platform
|
## Rockchip platform
|
||||||
|
|
||||||
Hardware accelerated video de-/encoding is supported on all Rockchip SoCs using [Nyanmisaka's FFmpeg Fork](https://github.com/nyanmisaka/ffmpeg-rockchip) based on [Rockchip's mpp library](https://github.com/rockchip-linux/mpp).
|
Hardware accelerated video de-/encoding is supported on all Rockchip SoCs using [Nyanmisaka's FFmpeg 6.1 Fork](https://github.com/nyanmisaka/ffmpeg-rockchip) based on [Rockchip's mpp library](https://github.com/rockchip-linux/mpp).
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and rkvdec2 driver. To check, enter the following commands:
|
Make sure to follow the [Rockchip specific installation instructions](/frigate/installation#rockchip-platform).
|
||||||
|
|
||||||
```
|
|
||||||
$ uname -r
|
|
||||||
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
|
|
||||||
$ ls /dev/dri
|
|
||||||
by-path card0 card1 renderD128 renderD129 # should list renderD128
|
|
||||||
```
|
|
||||||
|
|
||||||
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
|
|
||||||
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
|
|
||||||
|
|
||||||
Next, you need to grant docker permissions to access your hardware:
|
|
||||||
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
|
|
||||||
- After everything works, you should only grant necessary permissions to increase security. Add the lines below to your `docker-compose.yml` file or the following options to your docker run command: `--security-opt systempaths=unconfined --security-opt apparmor=unconfined --device /dev/dri:/dev/dri --device /dev/dma_heap:/dev/dma_heap --device /dev/rga:/dev/rga --device /dev/mpp_service:/dev/mpp_service`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
security_opt:
|
|
||||||
- apparmor=unconfined
|
|
||||||
- systempaths=unconfined
|
|
||||||
devices:
|
|
||||||
- /dev/dri:/dev/dri
|
|
||||||
- /dev/dma_heap:/dev/dma_heap
|
|
||||||
- /dev/rga:/dev/rga
|
|
||||||
- /dev/mpp_service:/dev/mpp_service
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
Add one of the following FFmpeg presets to your `config.yaml` to enable hardware video processing:
|
Add one of the following FFmpeg presets to your `config.yml` to enable hardware video processing:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# if you try to decode a h264 encoded stream
|
# if you try to decode a h264 encoded stream
|
||||||
|
|||||||
@@ -7,13 +7,25 @@ Frigate intelligently displays your camera streams on the Live view dashboard. Y
|
|||||||
|
|
||||||
## Live View technologies
|
## Live View technologies
|
||||||
|
|
||||||
Frigate intelligently uses three different streaming technologies to display your camera streams. The highest quality and fluency of the Live view requires the bundled `go2rtc` to be configured as shown in the [step by step guide](/guides/configuring_go2rtc).
|
Frigate intelligently uses three different streaming technologies to display your camera streams on the dashboard and the single camera view, switching between available modes based on network bandwidth, player errors, or required features like two-way talk. The highest quality and fluency of the Live view requires the bundled `go2rtc` to be configured as shown in the [step by step guide](/guides/configuring_go2rtc).
|
||||||
|
|
||||||
| Source | Latency | Frame Rate | Resolution | Audio | Requires go2rtc | Other Limitations |
|
The jsmpeg live view will use more browser and client GPU resources. Using go2rtc is highly recommended and will provide a superior experience.
|
||||||
| ------ | ------- | ------------------------------------- | -------------- | ---------------------------- | --------------- | ------------------------------------------------ |
|
|
||||||
| jsmpeg | low | same as `detect -> fps`, capped at 10 | same as detect | no | no | none |
|
| Source | Frame Rate | Resolution | Audio | Requires go2rtc | Notes |
|
||||||
| mse | low | native | native | yes (depends on audio codec) | yes | iPhone requires iOS 17.1+, Firefox is h.264 only |
|
| ------ | ------------------------------------- | ---------- | ---------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| webrtc | lowest | native | native | yes (depends on audio codec) | yes | requires extra config, doesn't support h.265 |
|
| jsmpeg | same as `detect -> fps`, capped at 10 | 720p | no | no | Resolution is configurable, but go2rtc is recommended if you want higher resolutions and better frame rates. jsmpeg is Frigate's default without go2rtc configured. |
|
||||||
|
| mse | native | native | yes (depends on audio codec) | yes | iPhone requires iOS 17.1+, Firefox is h.264 only. This is Frigate's default when go2rtc is configured. |
|
||||||
|
| webrtc | native | native | yes (depends on audio codec) | yes | Requires extra configuration, doesn't support h.265. Frigate attempts to use WebRTC when MSE fails or when using a camera's two-way talk feature. |
|
||||||
|
|
||||||
|
### Camera Settings Recommendations
|
||||||
|
|
||||||
|
If you are using go2rtc, you should adjust the following settings in your camera's firmware for the best experience with Live view:
|
||||||
|
|
||||||
|
- Video codec: **H.264** - provides the most compatible video codec with all Live view technologies and browsers. Avoid any kind of "smart codec" or "+" codec like _H.264+_ or _H.265+_. as these non-standard codecs remove keyframes (see below).
|
||||||
|
- Audio codec: **AAC** - provides the most compatible audio codec with all Live view technologies and browsers that support audio.
|
||||||
|
- I-frame interval (sometimes called the keyframe interval, the interframe space, or the GOP length): match your camera's frame rate, or choose "1x" (for interframe space on Reolink cameras). For example, if your stream outputs 20fps, your i-frame interval should be 20 (or 1x on Reolink). Values higher than the frame rate will cause the stream to take longer to begin playback. See [this page](https://gardinal.net/understanding-the-keyframe-interval/) for more on keyframes.
|
||||||
|
|
||||||
|
The default video and audio codec on your camera may not always be compatible with your browser, which is why setting them to H.264 and AAC is recommended. See the [go2rtc docs](https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#codecs-madness) for codec support information.
|
||||||
|
|
||||||
### Audio Support
|
### Audio Support
|
||||||
|
|
||||||
@@ -30,6 +42,15 @@ go2rtc:
|
|||||||
- "ffmpeg:http_cam#audio=opus" # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
|
- "ffmpeg:http_cam#audio=opus" # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If your camera does not have audio and you are having problems with Live view, you should have go2rtc send video only:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
no_audio_camera:
|
||||||
|
- ffmpeg:rtsp://192.168.1.5:554/live0#video=copy
|
||||||
|
```
|
||||||
|
|
||||||
### Setting Stream For Live UI
|
### Setting Stream For Live UI
|
||||||
|
|
||||||
There may be some cameras that you would prefer to use the sub stream for live view, but the main stream for recording. This can be done via `live -> stream_name`.
|
There may be some cameras that you would prefer to use the sub stream for live view, but the main stream for recording. This can be done via `live -> stream_name`.
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ It is, but the definition of "unnecessary" varies. I want to ignore areas of mot
|
|||||||
|
|
||||||
> For me, giving my masks ANY padding results in a lot of people detection I'm not interested in. I live in the city and catch a lot of the sidewalk on my camera. People walk by my front door all the time and the margin between the sidewalk and actually walking onto my stoop is very thin, so I basically have everything but the exact contours of my stoop masked out. This results in very tidy detections but this info keeps throwing me off. Am I just overthinking it?
|
> For me, giving my masks ANY padding results in a lot of people detection I'm not interested in. I live in the city and catch a lot of the sidewalk on my camera. People walk by my front door all the time and the margin between the sidewalk and actually walking onto my stoop is very thin, so I basically have everything but the exact contours of my stoop masked out. This results in very tidy detections but this info keeps throwing me off. Am I just overthinking it?
|
||||||
|
|
||||||
This is what `required_zones` are for. You should define a zone (remember this is evaluated based on the bottom center of the bounding box) and make it required to save snapshots and clips (now events in 0.9.0). You can also use this in your conditions for a notification.
|
This is what `required_zones` are for. You should define a zone (remember this is evaluated based on the bottom center of the bounding box) and make it required to save snapshots and clips (previously events in 0.9.0 to 0.13.0 and review items in 0.14.0 and later). You can also use this in your conditions for a notification.
|
||||||
|
|
||||||
> Maybe my specific situation just warrants this. I've just been having a hard time understanding the relevance of this information - it seems to be that it's exactly what would be expected when "masking out" an area of ANY image.
|
> Maybe my specific situation just warrants this. I've just been having a hard time understanding the relevance of this information - it seems to be that it's exactly what would be expected when "masking out" an area of ANY image.
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,15 @@ detectors:
|
|||||||
device: ""
|
device: ""
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Single PCIE/M.2 Coral
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
detectors:
|
||||||
|
coral:
|
||||||
|
type: edgetpu
|
||||||
|
device: pci
|
||||||
|
```
|
||||||
|
|
||||||
### Multiple PCIE/M.2 Corals
|
### Multiple PCIE/M.2 Corals
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -109,9 +118,13 @@ detectors:
|
|||||||
|
|
||||||
The OpenVINO detector type runs an OpenVINO IR model on AMD and Intel CPUs, Intel GPUs and Intel VPU hardware. To configure an OpenVINO detector, set the `"type"` attribute to `"openvino"`.
|
The OpenVINO detector type runs an OpenVINO IR model on AMD and Intel CPUs, Intel GPUs and Intel VPU hardware. To configure an OpenVINO detector, set the `"type"` attribute to `"openvino"`.
|
||||||
|
|
||||||
The OpenVINO device to be used is specified using the `"device"` attribute according to the naming conventions in the [Device Documentation](https://docs.openvino.ai/latest/openvino_docs_OV_UG_Working_with_devices.html). Other supported devices could be `AUTO`, `CPU`, `GPU`, `MYRIAD`, etc. If not specified, the default OpenVINO device will be selected by the `AUTO` plugin.
|
The OpenVINO device to be used is specified using the `"device"` attribute according to the naming conventions in the [Device Documentation](https://docs.openvino.ai/2024/openvino-workflow/running-inference/inference-devices-and-modes.html). The most common devices are `CPU` and `GPU`. Currently, there is a known issue with using `AUTO`. For backwards compatibility, Frigate will attempt to use `GPU` if `AUTO` is set in your configuration.
|
||||||
|
|
||||||
OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer. It will also run on AMD CPUs despite having no official support for it. A supported Intel platform is required to use the `GPU` device with OpenVINO. The `MYRIAD` device may be run on any platform, including Arm devices. For detailed system requirements, see [OpenVINO System Requirements](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html)
|
OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer. It will also run on AMD CPUs despite having no official support for it. A supported Intel platform is required to use the `GPU` device with OpenVINO. For detailed system requirements, see [OpenVINO System Requirements](https://docs.openvino.ai/2024/about-openvino/release-notes-openvino/system-requirements.html)
|
||||||
|
|
||||||
|
### Supported Models
|
||||||
|
|
||||||
|
#### SSDLite MobileNet v2
|
||||||
|
|
||||||
An OpenVINO model is provided in the container at `/openvino-model/ssdlite_mobilenet_v2.xml` and is used by this detector type by default. The model comes from Intel's Open Model Zoo [SSDLite MobileNet V2](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/ssdlite_mobilenet_v2) and is converted to an FP16 precision IR model. Use the model configuration shown below when using the OpenVINO detector with the default model.
|
An OpenVINO model is provided in the container at `/openvino-model/ssdlite_mobilenet_v2.xml` and is used by this detector type by default. The model comes from Intel's Open Model Zoo [SSDLite MobileNet V2](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/ssdlite_mobilenet_v2) and is converted to an FP16 precision IR model. Use the model configuration shown below when using the OpenVINO detector with the default model.
|
||||||
|
|
||||||
@@ -119,66 +132,52 @@ An OpenVINO model is provided in the container at `/openvino-model/ssdlite_mobil
|
|||||||
detectors:
|
detectors:
|
||||||
ov:
|
ov:
|
||||||
type: openvino
|
type: openvino
|
||||||
device: AUTO
|
device: GPU
|
||||||
model:
|
|
||||||
path: /openvino-model/ssdlite_mobilenet_v2.xml
|
|
||||||
|
|
||||||
model:
|
model:
|
||||||
width: 300
|
width: 300
|
||||||
height: 300
|
height: 300
|
||||||
input_tensor: nhwc
|
input_tensor: nhwc
|
||||||
input_pixel_format: bgr
|
input_pixel_format: bgr
|
||||||
|
path: /openvino-model/ssdlite_mobilenet_v2.xml
|
||||||
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
This detector also supports YOLOX. Other YOLO variants are not officially supported/tested. Frigate does not come with any yolo models preloaded, so you will need to supply your own models. This detector has been verified to work with the [yolox_tiny](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny) model from Intel's Open Model Zoo. You can follow [these instructions](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny#download-a-model-and-convert-it-into-openvino-ir-format) to retrieve the OpenVINO-compatible `yolox_tiny` model. Make sure that the model input dimensions match the `width` and `height` parameters, and `model_type` is set accordingly. See [Full Configuration Reference](/configuration/reference.md) for a list of possible `model_type` options. Below is an example of how `yolox_tiny` can be used in Frigate:
|
#### YOLOX
|
||||||
|
|
||||||
|
This detector also supports YOLOX. Frigate does not come with any YOLOX models preloaded, so you will need to supply your own models.
|
||||||
|
|
||||||
|
#### YOLO-NAS
|
||||||
|
|
||||||
|
[YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) models are supported, but not included by default. You can build and download a compatible model with pre-trained weights using [this notebook](https://github.com/blakeblackshear/frigate/blob/dev/notebooks/YOLO_NAS_Pretrained_Export.ipynb) [](https://colab.research.google.com/github/blakeblackshear/frigate/blob/dev/notebooks/YOLO_NAS_Pretrained_Export.ipynb).
|
||||||
|
|
||||||
|
:::warning
|
||||||
|
|
||||||
|
The pre-trained YOLO-NAS weights from DeciAI are subject to their license and can't be used commercially. For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
The input image size in this notebook is set to 320x320. This results in lower CPU usage and faster inference times without impacting performance in most cases due to the way Frigate crops video frames to areas of interest before running detection. The notebook and config can be updated to 640x640 if desired.
|
||||||
|
|
||||||
|
After placing the downloaded onnx model in your config folder, you can use the following configuration:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
detectors:
|
detectors:
|
||||||
ov:
|
ov:
|
||||||
type: openvino
|
type: openvino
|
||||||
device: AUTO
|
device: GPU
|
||||||
model:
|
|
||||||
path: /path/to/yolox_tiny.xml
|
|
||||||
|
|
||||||
model:
|
model:
|
||||||
width: 416
|
model_type: yolonas
|
||||||
height: 416
|
width: 320 # <--- should match whatever was set in notebook
|
||||||
|
height: 320 # <--- should match whatever was set in notebook
|
||||||
input_tensor: nchw
|
input_tensor: nchw
|
||||||
input_pixel_format: bgr
|
input_pixel_format: bgr
|
||||||
model_type: yolox
|
path: /config/yolo_nas_s.onnx
|
||||||
labelmap_path: /path/to/coco_80cl.txt
|
labelmap_path: /labelmap/coco-80.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
### Intel NCS2 VPU and Myriad X Setup
|
Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects.
|
||||||
|
|
||||||
Intel produces a neural net inference acceleration chip called Myriad X. This chip was sold in their Neural Compute Stick 2 (NCS2) which has been discontinued. If intending to use the MYRIAD device for acceleration, additional setup is required to pass through the USB device. The host needs a udev rule installed to handle the NCS2 device.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo usermod -a -G users "$(whoami)"
|
|
||||||
cat <<EOF > 97-myriad-usbboot.rules
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
|
|
||||||
EOF
|
|
||||||
sudo cp 97-myriad-usbboot.rules /etc/udev/rules.d/
|
|
||||||
sudo udevadm control --reload-rules
|
|
||||||
sudo udevadm trigger
|
|
||||||
```
|
|
||||||
|
|
||||||
Additionally, the Frigate docker container needs to run with the following configuration:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
--device-cgroup-rule='c 189:\* rmw' -v /dev/bus/usb:/dev/bus/usb
|
|
||||||
```
|
|
||||||
|
|
||||||
or in your compose file:
|
|
||||||
|
|
||||||
```yml
|
|
||||||
device_cgroup_rules:
|
|
||||||
- "c 189:* rmw"
|
|
||||||
volumes:
|
|
||||||
- /dev/bus/usb:/dev/bus/usb
|
|
||||||
```
|
|
||||||
|
|
||||||
## NVidia TensorRT Detector
|
## NVidia TensorRT Detector
|
||||||
|
|
||||||
@@ -313,39 +312,11 @@ Hardware accelerated object detection is supported on the following SoCs:
|
|||||||
- RK3576
|
- RK3576
|
||||||
- RK3588
|
- RK3588
|
||||||
|
|
||||||
This implementation uses the [Rockchip's RKNN-Toolkit2](https://github.com/airockchip/rknn-toolkit2/) Currently, only [Yolo-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) is supported as object detection model.
|
This implementation uses the [Rockchip's RKNN-Toolkit2](https://github.com/airockchip/rknn-toolkit2/), version v2.0.0.beta0. Currently, only [Yolo-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) is supported as object detection model.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and rknpu driver. To check, enter the following commands:
|
Make sure to follow the [Rockchip specific installation instrucitions](/frigate/installation#rockchip-platform).
|
||||||
|
|
||||||
```
|
|
||||||
$ uname -r
|
|
||||||
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
|
|
||||||
$ ls /dev/dri
|
|
||||||
by-path card0 card1 renderD128 renderD129 # should list renderD129
|
|
||||||
$ sudo cat /sys/kernel/debug/rknpu/version
|
|
||||||
RKNPU driver: v0.9.2 # or later version
|
|
||||||
```
|
|
||||||
|
|
||||||
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
|
|
||||||
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
|
|
||||||
|
|
||||||
Next, you need to grant docker permissions to access your hardware:
|
|
||||||
|
|
||||||
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
|
|
||||||
- After everything works, you should only grant necessary permissions to increase security. Add the lines below to your `docker-compose.yml` file or the following options to your docker run command: `--security-opt systempaths=unconfined --security-opt apparmor=unconfined --device /dev/dri:/dev/dri`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
security_opt:
|
|
||||||
- apparmor=unconfined
|
|
||||||
- systempaths=unconfined
|
|
||||||
devices:
|
|
||||||
- /dev/dri:/dev/dri
|
|
||||||
```
|
|
||||||
|
|
||||||
### Configuration
|
### Configuration
|
||||||
|
|
||||||
@@ -376,13 +347,21 @@ model: # required
|
|||||||
input_pixel_format: bgr # required
|
input_pixel_format: bgr # required
|
||||||
# shape of detection frame
|
# shape of detection frame
|
||||||
input_tensor: nhwc
|
input_tensor: nhwc
|
||||||
|
# needs to be adjusted to model, see below
|
||||||
|
labelmap_path: /labelmap.txt # required
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The correct labelmap must be loaded for each model. If you use a custom model (see notes below), you must make sure to provide the correct labelmap. The table below lists the correct paths for the bundled models:
|
||||||
|
|
||||||
|
| `path` | `labelmap_path` |
|
||||||
|
| --------------------- | --------------------- |
|
||||||
|
| deci-fp16-yolonas\_\* | /labelmap/coco-80.txt |
|
||||||
|
|
||||||
### Choosing a model
|
### Choosing a model
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
yolo-nas models use weights from DeciAI. These weights are subject to their license and can't be used commercially. For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
|
The pre-trained YOLO-NAS weights from DeciAI are subject to their license and can't be used commercially. For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@@ -405,6 +384,5 @@ $ cat /sys/kernel/debug/rknpu/load
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
- By default the rknn detector uses the yolonas_s model (`model: path: default-fp16-yolonas_s`). This model comes with the image, so no further steps than those mentioned above are necessary and no download happens.
|
- All models are automatically downloaded and stored in the folder `config/model_cache/rknn_cache`. After upgrading Frigate, you should remove older models to free up space.
|
||||||
- The other choices are automatically downloaded and stored in the folder `config/model_cache/rknn_cache`. After upgrading Frigate, you should remove older models to free up space.
|
- You can also provide your own `.rknn` model. You should not save your own models in the `rknn_cache` folder, store them directly in the `model_cache` folder or another subfolder. To convert a model to `.rknn` format see the `rknn-toolkit2` (requires a x86 machine). Note, that there is only post-processing for the supported models.
|
||||||
- Finally, you can also provide your own `.rknn` model. You should not save your own models in the `rknn_cache` folder, store them directly in the `model_cache` folder or another subfolder. To convert a model to `.rknn` format see the `rknn-toolkit2` (requires a x86 machine). Note, that there is only post-processing for the supported models.
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ False positives can also be reduced by filtering a detection based on its shape.
|
|||||||
|
|
||||||
### Object Area
|
### Object Area
|
||||||
|
|
||||||
`min_area` and `max_area` filter on the area of an objects bounding box in pixels and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter. The recordings timeline can be used to determine the area of the bounding box in that frame by selecting a timeline item then mousing over or tapping the red box.
|
`min_area` and `max_area` filter on the area of an objects bounding box in pixels and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter.
|
||||||
|
|
||||||
### Object Proportions
|
### Object Proportions
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ title: Available Objects
|
|||||||
|
|
||||||
import labels from "../../../labelmap.txt";
|
import labels from "../../../labelmap.txt";
|
||||||
|
|
||||||
Frigate includes the object models listed below from the Google Coral test data.
|
Frigate includes the object labels listed below from the Google Coral test data.
|
||||||
|
|
||||||
Please note:
|
Please note:
|
||||||
|
|
||||||
24
docs/docs/configuration/pwa.md
Normal file
24
docs/docs/configuration/pwa.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
id: pwa
|
||||||
|
title: Installing Frigate App
|
||||||
|
---
|
||||||
|
|
||||||
|
Frigate supports being installed as a [Progressive Web App](https://web.dev/explore/progressive-web-apps) on Desktop, Android, and iOS.
|
||||||
|
|
||||||
|
This adds features including the ability to deep link directly into the app.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
In order to install Frigate as a PWA, the following requirements must be met:
|
||||||
|
|
||||||
|
- Frigate must be accessed via a secure context (localhost, secure https, etc.)
|
||||||
|
- On Android, Firefox, Chrome, Edge, Opera, and Samsung Internet Browser all support installing PWAs.
|
||||||
|
- On iOS 16.4 and later, PWAs can be installed from the Share menu in Safari, Chrome, Edge, Firefox, and Orion.
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
Installation varies slightly based on the device that is being used:
|
||||||
|
|
||||||
|
- Desktop: Use the install button typically found in right edge of the address bar
|
||||||
|
- Android: Use the `Install as App` button in the more options menu
|
||||||
|
- iOS: Use the `Add to Homescreen` button in the share menu
|
||||||
@@ -159,11 +159,14 @@ Using Frigate UI, HomeAssistant, or MQTT, cameras can be automated to only recor
|
|||||||
|
|
||||||
## How do I export recordings?
|
## How do I export recordings?
|
||||||
|
|
||||||
The export page in the Frigate WebUI allows for exporting real time clips with a designated start and stop time as well as exporting a time-lapse for a designated start and stop time. These exports can take a while so it is important to leave the file until it is no longer in progress.
|
Footage can be exported from Frigate by right-clicking (desktop) or long pressing (mobile) on a review item in the Review pane or by clicking the Export button in the History view. Exported footage is then organized and searchable through the Export view, accessible from the main navigation bar.
|
||||||
|
|
||||||
### Time-lapse export
|
### Time-lapse export
|
||||||
|
|
||||||
|
Time lapse exporting is available only via the [HTTP API](../integrations/api.md#post-apiexportcamerastartstart-timestampendend-timestamp).
|
||||||
|
|
||||||
When exporting a time-lapse the default speed-up is 25x with 30 FPS. This means that every 25 seconds of (real-time) recording is condensed into 1 second of time-lapse video (always without audio) with a smoothness of 30 FPS.
|
When exporting a time-lapse the default speed-up is 25x with 30 FPS. This means that every 25 seconds of (real-time) recording is condensed into 1 second of time-lapse video (always without audio) with a smoothness of 30 FPS.
|
||||||
|
|
||||||
To configure the speed-up factor, the frame rate and further custom settings, the configuration parameter `timelapse_args` can be used. The below configuration example would change the time-lapse speed to 60x (for fitting 1 hour of recording into 1 minute of time-lapse) with 25 FPS:
|
To configure the speed-up factor, the frame rate and further custom settings, the configuration parameter `timelapse_args` can be used. The below configuration example would change the time-lapse speed to 60x (for fitting 1 hour of recording into 1 minute of time-lapse) with 25 FPS:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -63,11 +63,31 @@ database:
|
|||||||
# The path to store the SQLite DB (default: shown below)
|
# The path to store the SQLite DB (default: shown below)
|
||||||
path: /config/frigate.db
|
path: /config/frigate.db
|
||||||
|
|
||||||
|
# Optional: TLS configuration
|
||||||
|
tls:
|
||||||
|
# Optional: Enable TLS for port 8971 (default: shown below)
|
||||||
|
enabled: True
|
||||||
|
|
||||||
|
# Optional: Proxy configuration
|
||||||
|
proxy:
|
||||||
|
# Optional: Mapping for headers from upstream proxies. Only used if Frigate's auth
|
||||||
|
# is disabled.
|
||||||
|
# NOTE: Many authentication proxies pass a header downstream with the authenticated
|
||||||
|
# user name. Not all values are supported. It must be a whitelisted header.
|
||||||
|
# See the docs for more info.
|
||||||
|
header_map:
|
||||||
|
user: x-forwarded-user
|
||||||
|
# Optional: Url for logging out a user. This sets the location of the logout url in
|
||||||
|
# the UI.
|
||||||
|
logout_url: /api/logout
|
||||||
|
# Optional: Auth secret that is checked against the X-Proxy-Secret header sent from
|
||||||
|
# the proxy. If not set, all requests are trusted regardless of origin.
|
||||||
|
auth_secret: None
|
||||||
|
|
||||||
# Optional: Authentication configuration
|
# Optional: Authentication configuration
|
||||||
auth:
|
auth:
|
||||||
# Optional: Authentication mode (default: shown below)
|
# Optional: Enable authentication
|
||||||
# Valid values are: native, proxy
|
enabled: True
|
||||||
mode: native
|
|
||||||
# Optional: Reset the admin user password on startup (default: shown below)
|
# Optional: Reset the admin user password on startup (default: shown below)
|
||||||
# New password is printed in the logs
|
# New password is printed in the logs
|
||||||
reset_admin_password: False
|
reset_admin_password: False
|
||||||
@@ -82,23 +102,14 @@ auth:
|
|||||||
# When the session is going to expire in less time than this setting,
|
# When the session is going to expire in less time than this setting,
|
||||||
# it will be refreshed back to the session_length.
|
# it will be refreshed back to the session_length.
|
||||||
refresh_time: 43200 # 12 hours
|
refresh_time: 43200 # 12 hours
|
||||||
# Optional: Mapping for headers from upstream proxies. Only used in proxy auth mode.
|
|
||||||
# NOTE: Many authentication proxies pass a header downstream with the authenticated
|
|
||||||
# user name. Not all values are supported. It must be a whitelisted header.
|
|
||||||
# See the docs for more info.
|
|
||||||
header_map:
|
|
||||||
user: x-forwarded-user
|
|
||||||
# Optional: Rate limiting for login failures to help prevent brute force
|
# Optional: Rate limiting for login failures to help prevent brute force
|
||||||
# login attacks (default: shown below)
|
# login attacks (default: shown below)
|
||||||
# See the docs for more information on valid values
|
# See the docs for more information on valid values
|
||||||
failed_login_rate_limit: None
|
failed_login_rate_limit: None
|
||||||
# Optional: Trusted proxies for determining IP address to rate limit
|
# Optional: Trusted proxies for determining IP address to rate limit
|
||||||
# NOTE: This is only used for rate limiting login attempts and does not bypass
|
# NOTE: This is only used for rate limiting login attempts and does not bypass
|
||||||
# authentication in any way
|
# authentication. See the authentication docs for more details.
|
||||||
trusted_proxies: []
|
trusted_proxies: []
|
||||||
# Optional: Url for logging out a user. This only needs to be set if you are using
|
|
||||||
# proxy mode.
|
|
||||||
logout_url: /api/logout
|
|
||||||
# Optional: Number of hashing iterations for user passwords
|
# Optional: Number of hashing iterations for user passwords
|
||||||
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
|
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
|
||||||
# NOTE: changing this value will not automatically update password hashes, you
|
# NOTE: changing this value will not automatically update password hashes, you
|
||||||
@@ -191,7 +202,7 @@ birdseye:
|
|||||||
inactivity_threshold: 30
|
inactivity_threshold: 30
|
||||||
# Optional: Configure the birdseye layout
|
# Optional: Configure the birdseye layout
|
||||||
layout:
|
layout:
|
||||||
# Optional: Scaling factor for the layout calculator (default: shown below)
|
# Optional: Scaling factor for the layout calculator, range 1.0-5.0 (default: shown below)
|
||||||
scaling_factor: 2.0
|
scaling_factor: 2.0
|
||||||
# Optional: Maximum number of cameras to show at one time, showing the most recent (default: show all cameras)
|
# Optional: Maximum number of cameras to show at one time, showing the most recent (default: show all cameras)
|
||||||
max_cameras: 1
|
max_cameras: 1
|
||||||
@@ -309,6 +320,9 @@ review:
|
|||||||
- car
|
- car
|
||||||
- person
|
- person
|
||||||
# Optional: required zones for an object to be marked as an alert (default: none)
|
# Optional: required zones for an object to be marked as an alert (default: none)
|
||||||
|
# NOTE: when settings required zones globally, this zone must exist on all cameras
|
||||||
|
# or the config will be considered invalid. In that case the required_zones
|
||||||
|
# should be configured at the camera level.
|
||||||
required_zones:
|
required_zones:
|
||||||
- driveway
|
- driveway
|
||||||
# Optional: detections configuration
|
# Optional: detections configuration
|
||||||
@@ -318,12 +332,20 @@ review:
|
|||||||
- car
|
- car
|
||||||
- person
|
- person
|
||||||
# Optional: required zones for an object to be marked as a detection (default: none)
|
# Optional: required zones for an object to be marked as a detection (default: none)
|
||||||
|
# NOTE: when settings required zones globally, this zone must exist on all cameras
|
||||||
|
# or the config will be considered invalid. In that case the required_zones
|
||||||
|
# should be configured at the camera level.
|
||||||
required_zones:
|
required_zones:
|
||||||
- driveway
|
- driveway
|
||||||
|
|
||||||
# Optional: Motion configuration
|
# Optional: Motion configuration
|
||||||
# NOTE: Can be overridden at the camera level
|
# NOTE: Can be overridden at the camera level
|
||||||
motion:
|
motion:
|
||||||
|
# Optional: enables detection for the camera (default: True)
|
||||||
|
# NOTE: Motion detection is required for object detection,
|
||||||
|
# setting this to False and leaving detect enabled
|
||||||
|
# will result in an error on startup.
|
||||||
|
enabled: False
|
||||||
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
|
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
|
||||||
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
|
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
|
||||||
# The value should be between 1 and 255.
|
# The value should be between 1 and 255.
|
||||||
@@ -455,13 +477,15 @@ snapshots:
|
|||||||
quality: 70
|
quality: 70
|
||||||
|
|
||||||
# Optional: Restream configuration
|
# Optional: Restream configuration
|
||||||
# Uses https://github.com/AlexxIT/go2rtc (v1.8.3)
|
# Uses https://github.com/AlexxIT/go2rtc (v1.9.2)
|
||||||
go2rtc:
|
go2rtc:
|
||||||
|
|
||||||
# Optional: jsmpeg stream configuration for WebUI
|
# Optional: Live stream configuration for WebUI.
|
||||||
|
# NOTE: Can be overridden at the camera level
|
||||||
live:
|
live:
|
||||||
# Optional: Set the name of the stream that should be used for live view
|
# Optional: Set the name of the stream configured in go2rtc
|
||||||
# in frigate WebUI. (default: name of camera)
|
# that should be used for live view in frigate WebUI. (default: name of camera)
|
||||||
|
# NOTE: In most cases this should be set at the camera level only.
|
||||||
stream_name: camera_name
|
stream_name: camera_name
|
||||||
# Optional: Set the height of the jsmpeg stream. (default: 720)
|
# Optional: Set the height of the jsmpeg stream. (default: 720)
|
||||||
# This must be less than or equal to the height of the detect stream. Lower resolutions
|
# This must be less than or equal to the height of the detect stream. Lower resolutions
|
||||||
@@ -602,6 +626,9 @@ cameras:
|
|||||||
user: admin
|
user: admin
|
||||||
# Optional: password for login.
|
# Optional: password for login.
|
||||||
password: admin
|
password: admin
|
||||||
|
# Optional: Ignores time synchronization mismatches between the camera and the server during authentication.
|
||||||
|
# Using NTP on both ends is recommended and this should only be set to True in a "safe" environment due to the security risk it represents.
|
||||||
|
ignore_time_mismatch: False
|
||||||
# Optional: PTZ camera object autotracking. Keeps a moving object in
|
# Optional: PTZ camera object autotracking. Keeps a moving object in
|
||||||
# the center of the frame by automatically moving the PTZ camera.
|
# the center of the frame by automatically moving the PTZ camera.
|
||||||
autotracking:
|
autotracking:
|
||||||
@@ -645,8 +672,6 @@ cameras:
|
|||||||
|
|
||||||
# Optional
|
# Optional
|
||||||
ui:
|
ui:
|
||||||
# Optional: Set the default live mode for cameras in the UI (default: shown below)
|
|
||||||
live_mode: mse
|
|
||||||
# Optional: Set a timezone to use in the UI (default: use browser local time)
|
# Optional: Set a timezone to use in the UI (default: use browser local time)
|
||||||
# timezone: America/Denver
|
# timezone: America/Denver
|
||||||
# Optional: Set the time format used.
|
# Optional: Set the time format used.
|
||||||
@@ -707,7 +732,7 @@ camera_groups:
|
|||||||
- side_cam
|
- side_cam
|
||||||
- front_doorbell_cam
|
- front_doorbell_cam
|
||||||
# Required: icon used for group
|
# Required: icon used for group
|
||||||
icon: car
|
icon: LuCar
|
||||||
# Required: index of this group
|
# Required: index of this group
|
||||||
order: 0
|
order: 0
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ title: Restream
|
|||||||
|
|
||||||
Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://<frigate_host>:8554/<camera_name>`. Port 8554 must be open. [This allows you to use a video feed for detection in Frigate and Home Assistant live view at the same time without having to make two separate connections to the camera](#reduce-connections-to-camera). The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate.
|
Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://<frigate_host>:8554/<camera_name>`. Port 8554 must be open. [This allows you to use a video feed for detection in Frigate and Home Assistant live view at the same time without having to make two separate connections to the camera](#reduce-connections-to-camera). The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate.
|
||||||
|
|
||||||
Frigate uses [go2rtc](https://github.com/AlexxIT/go2rtc/tree/v1.9.2) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `go2rtc` in the config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#configuration) for more advanced configurations and features.
|
Frigate uses [go2rtc](https://github.com/AlexxIT/go2rtc/tree/v1.9.4) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `go2rtc` in the config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#configuration) for more advanced configurations and features.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
You can access the go2rtc stream info at `http://frigate_ip:8080/api/go2rtc/streams` which can be helpful to debug as well as provide useful information about your camera streams.
|
You can access the go2rtc stream info at `/api/go2rtc/streams` which can be helpful to debug as well as provide useful information about your camera streams.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ cameras:
|
|||||||
|
|
||||||
## Advanced Restream Configurations
|
## Advanced Restream Configurations
|
||||||
|
|
||||||
The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#source-exec) source in go2rtc can be used for custom ffmpeg commands. An example is below:
|
The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-exec) source in go2rtc can be used for custom ffmpeg commands. An example is below:
|
||||||
|
|
||||||
NOTE: The output will need to be passed with two curly braces `{{output}}`
|
NOTE: The output will need to be passed with two curly braces `{{output}}`
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,16 @@ The Review page of the Frigate UI is for quickly reviewing historical footage of
|
|||||||
|
|
||||||
Review items are filterable by date, object type, and camera.
|
Review items are filterable by date, object type, and camera.
|
||||||
|
|
||||||
|
### Review items vs. events
|
||||||
|
|
||||||
|
In Frigate 0.13 and earlier versions, the UI presented "events". An event was synonymous with a tracked or detected object. In Frigate 0.14 and later, a review item is a time period where any number of tracked objects were active.
|
||||||
|
|
||||||
|
For example, consider a situation where two people walked past your house. One was walking a dog. At the same time, a car drove by on the street behind them.
|
||||||
|
|
||||||
|
In this scenario, Frigate 0.13 and earlier would show 4 events in the UI - one for each person, another for the dog, and yet another for the car. You would have had 4 separate videos to watch even though they would have all overlapped.
|
||||||
|
|
||||||
|
In 0.14 and later, all of that is bundled into a single review item which starts and ends to capture all of that activity. Reviews for a single camera cannot overlap. Once you have watched that time period on that camera, it is marked as reviewed.
|
||||||
|
|
||||||
## Alerts and Detections
|
## Alerts and Detections
|
||||||
|
|
||||||
Not every segment of video captured by Frigate may be of the same level of interest to you. Video of people who enter your property may be a different priority than those walking by on the sidewalk. For this reason, Frigate 0.14 categorizes review items as _alerts_ and _detections_. By default, all person and car objects are considered alerts. You can refine categorization of your review items by configuring required zones for them.
|
Not every segment of video captured by Frigate may be of the same level of interest to you. Video of people who enter your property may be a different priority than those walking by on the sidewalk. For this reason, Frigate 0.14 categorizes review items as _alerts_ and _detections_. By default, all person and car objects are considered alerts. You can refine categorization of your review items by configuring required zones for them.
|
||||||
@@ -31,8 +41,6 @@ review:
|
|||||||
|
|
||||||
By default all detections that do not qualify as an alert qualify as a detection. However, detections can further be filtered to only include certain labels or certain zones.
|
By default all detections that do not qualify as an alert qualify as a detection. However, detections can further be filtered to only include certain labels or certain zones.
|
||||||
|
|
||||||
By default a review item will only be marked as an alert if a person or car is detected. This can be configured to include any object or audio label using the following config:
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# can be overridden at the camera level
|
# can be overridden at the camera level
|
||||||
review:
|
review:
|
||||||
@@ -42,12 +50,26 @@ review:
|
|||||||
- dog
|
- dog
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Excluding a camera from alerts or detections
|
||||||
|
|
||||||
|
To exclude a specific camera from alerts or detections, simply provide an empty list to the alerts or detections field _at the camera level_.
|
||||||
|
|
||||||
|
For example, to exclude objects on the camera _gatecamera_ from any detections, include this in your config:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
cameras:
|
||||||
|
gatecamera:
|
||||||
|
review:
|
||||||
|
detections:
|
||||||
|
labels: []
|
||||||
|
```
|
||||||
|
|
||||||
## Restricting review items to specific zones
|
## Restricting review items to specific zones
|
||||||
|
|
||||||
By default a review item will be created if any `review -> alerts -> labels` and `review -> detections -> labels` are detected anywhere in the camera frame. You will likely want to configure review items to only be created when the object enters an area of interest, [see the zone docs for more information](./zones.md#restricting-alerts-and-detections-to-specific-zones)
|
By default a review item will be created if any `review -> alerts -> labels` and `review -> detections -> labels` are detected anywhere in the camera frame. You will likely want to configure review items to only be created when the object enters an area of interest, [see the zone docs for more information](./zones.md#restricting-alerts-and-detections-to-specific-zones)
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
|
|
||||||
Because zones don't apply to audio, audio labels will always be marked as an alert.
|
Because zones don't apply to audio, audio labels will always be marked as a detection by default.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|||||||
59
docs/docs/configuration/tls.md
Normal file
59
docs/docs/configuration/tls.md
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
---
|
||||||
|
id: tls
|
||||||
|
title: TLS
|
||||||
|
---
|
||||||
|
|
||||||
|
# TLS
|
||||||
|
|
||||||
|
Frigate's integrated NGINX server supports TLS certificates. By default Frigate will generate a self signed certificate that will be used for port 8971. Frigate is designed to make it easy to use whatever tool you prefer to manage certificates.
|
||||||
|
|
||||||
|
Frigate is often running behind a reverse proxy that manages TLS certificates for multiple services. You will likely need to set your reverse proxy to allow self signed certificates or you can disable TLS in Frigate's config. However, if you are running on a dedicated device that's separate from your proxy or if you expose Frigate directly to the internet, you may want to configure TLS with valid certificates.
|
||||||
|
|
||||||
|
In many deployments, TLS will be unnecessary. It can be disabled in the config with the following yaml:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
tls:
|
||||||
|
enabled: False
|
||||||
|
```
|
||||||
|
|
||||||
|
## Certificates
|
||||||
|
|
||||||
|
TLS certificates can be mounted at `/etc/letsencrypt/live/frigate` using a bind mount or docker volume.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
frigate:
|
||||||
|
...
|
||||||
|
volumes:
|
||||||
|
- /path/to/your/certificate_folder:/etc/letsencrypt/live/frigate:ro
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
Within the folder, the private key is expected to be named `privkey.pem` and the certificate is expected to be named `fullchain.pem`.
|
||||||
|
|
||||||
|
Note that certbot uses symlinks, and those can't be followed by the container unless it has access to the targets as well, so if using certbot you'll also have to mount the `archive` folder for your domain, e.g.:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
frigate:
|
||||||
|
...
|
||||||
|
volumes:
|
||||||
|
- /etc/letsencrypt/live/frigate:/etc/letsencrypt/live/frigate:ro
|
||||||
|
- /etc/letsencrypt/archive/frigate:/etc/letsencrypt/archive/frigate:ro
|
||||||
|
...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Frigate automatically compares the fingerprint of the certificate at `/etc/letsencrypt/live/frigate/fullchain.pem` against the fingerprint of the TLS cert in NGINX every minute. If these differ, the NGINX config is reloaded to pick up the updated certificate.
|
||||||
|
|
||||||
|
If you issue Frigate valid certificates you will likely want to configure it to run on port 443 so you can access it without a port number like `https://your-frigate-domain.com` by mapping 8971 to 443.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
frigate:
|
||||||
|
...
|
||||||
|
ports:
|
||||||
|
- "443:8971"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## ACME Challenge
|
||||||
|
|
||||||
|
Frigate also supports hosting the acme challenge files for the HTTP challenge method if needed. The challenge files should be mounted at `/etc/letsencrypt/www`.
|
||||||
@@ -69,15 +69,6 @@ Sometimes you want to limit a zone to specific object types to have more granula
|
|||||||
```yaml
|
```yaml
|
||||||
cameras:
|
cameras:
|
||||||
name_of_your_camera:
|
name_of_your_camera:
|
||||||
record:
|
|
||||||
events:
|
|
||||||
required_zones:
|
|
||||||
- entire_yard
|
|
||||||
- front_yard_street
|
|
||||||
snapshots:
|
|
||||||
required_zones:
|
|
||||||
- entire_yard
|
|
||||||
- front_yard_street
|
|
||||||
zones:
|
zones:
|
||||||
entire_yard:
|
entire_yard:
|
||||||
coordinates: ... (everywhere you want a person)
|
coordinates: ... (everywhere you want a person)
|
||||||
|
|||||||
@@ -9,6 +9,13 @@ The glossary explains terms commonly used in Frigate's documentation.
|
|||||||
|
|
||||||
A box returned from the object detection model that outlines an object in the frame. These have multiple colors depending on object type in the debug live view.
|
A box returned from the object detection model that outlines an object in the frame. These have multiple colors depending on object type in the debug live view.
|
||||||
|
|
||||||
|
### Bounding Box Colors
|
||||||
|
|
||||||
|
- At startup different colors will be assigned to each object label
|
||||||
|
- A dark blue thin line indicates that object is not detected at this current point in time
|
||||||
|
- A gray thin line indicates that object is detected as being stationary
|
||||||
|
- A thick line indicates that object is the subject of autotracking (when enabled).
|
||||||
|
|
||||||
## Event
|
## Event
|
||||||
|
|
||||||
The time period starting when a tracked object entered the frame and ending when it left the frame, including any time that the object remained still. Events are saved when it is considered a [true positive](#threshold) and meets the requirements for a snapshot or recording to be saved.
|
The time period starting when a tracked object entered the frame and ending when it left the frame, including any time that the object remained still. Events are saved when it is considered a [true positive](#threshold) and meets the requirements for a snapshot or recording to be saved.
|
||||||
@@ -41,6 +48,10 @@ When pixels in the current camera frame are different than previous frames. When
|
|||||||
|
|
||||||
A portion of the camera frame that is sent to object detection, regions can be sent due to motion, active objects, or occasionally for stationary objects. These are represented by green boxes in the debug live view.
|
A portion of the camera frame that is sent to object detection, regions can be sent due to motion, active objects, or occasionally for stationary objects. These are represented by green boxes in the debug live view.
|
||||||
|
|
||||||
|
## Review Item
|
||||||
|
|
||||||
|
A review item is a time period where any number of events/tracked objects were active. [See the review docs for more info](/configuration/review)
|
||||||
|
|
||||||
## Snapshot Score
|
## Snapshot Score
|
||||||
|
|
||||||
The score shown in a snapshot is the score of that object at that specific moment in time.
|
The score shown in a snapshot is the score of that object at that specific moment in time.
|
||||||
|
|||||||
@@ -13,20 +13,19 @@ Many users have reported various issues with Reolink cameras, so I do not recomm
|
|||||||
|
|
||||||
Here are some of the camera's I recommend:
|
Here are some of the camera's I recommend:
|
||||||
|
|
||||||
- <a href="https://amzn.to/3uFLtxB" target="_blank" rel="nofollow noopener sponsored">Loryta(Dahua) T5442TM-AS-LED</a> (affiliate link)
|
- <a href="https://amzn.to/4fwoNWA" target="_blank" rel="nofollow noopener sponsored">Loryta(Dahua) IPC-T549M-ALED-S3</a> (affiliate link)
|
||||||
- <a href="https://amzn.to/3isJ3gU" target="_blank" rel="nofollow noopener sponsored">Loryta(Dahua) IPC-T5442TM-AS</a> (affiliate link)
|
- <a href="https://amzn.to/3YXpcMw" target="_blank" rel="nofollow noopener sponsored">Loryta(Dahua) IPC-T54IR-AS</a> (affiliate link)
|
||||||
- <a href="https://amzn.to/2ZWNWIA" target="_blank" rel="nofollow noopener sponsored">Amcrest IP5M-T1179EW-28MM</a> (affiliate link)
|
- <a href="https://amzn.to/3AvBHoY" target="_blank" rel="nofollow noopener sponsored">Amcrest IP5M-T1179EW-AI-V3</a> (affiliate link)
|
||||||
|
|
||||||
I may earn a small commission for my endorsement, recommendation, testimonial, or link to any products or services from this website.
|
I may earn a small commission for my endorsement, recommendation, testimonial, or link to any products or services from this website.
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
|
||||||
My current favorite is the Beelink EQ12 because of the efficient N100 CPU and dual NICs that allow you to setup a dedicated private network for your cameras where they can be blocked from accessing the internet. There are many used workstation options on eBay that work very well. Anything with an Intel CPU and capable of running Debian should work fine. As a bonus, you may want to look for devices with a M.2 or PCIe express slot that is compatible with the Google Coral. I may earn a small commission for my endorsement, recommendation, testimonial, or link to any products or services from this website.
|
My current favorite is the Beelink EQ13 because of the efficient N100 CPU and dual NICs that allow you to setup a dedicated private network for your cameras where they can be blocked from accessing the internet. There are many used workstation options on eBay that work very well. Anything with an Intel CPU and capable of running Debian should work fine. As a bonus, you may want to look for devices with a M.2 or PCIe express slot that is compatible with the Google Coral. I may earn a small commission for my endorsement, recommendation, testimonial, or link to any products or services from this website.
|
||||||
|
|
||||||
| Name | Coral Inference Speed | Coral Compatibility | Notes |
|
| Name | Coral Inference Speed | Coral Compatibility | Notes |
|
||||||
| ------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------------------------------------------------------------------------------------------------- | --------------------- | ------------------- | ----------------------------------------------------------------------------------------- |
|
||||||
| Beelink EQ12 (<a href="https://amzn.to/3OlTMJY" target="_blank" rel="nofollow noopener sponsored">Amazon</a>) | 5-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. |
|
| Beelink EQ13 (<a href="https://amzn.to/4iQaBKu" target="_blank" rel="nofollow noopener sponsored">Amazon</a>) | 5-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. |
|
||||||
| Intel NUC (<a href="https://amzn.to/3psFlHi" target="_blank" rel="nofollow noopener sponsored">Amazon</a>) | 5-10ms | USB | Overkill for most, but great performance. Can handle many cameras at 5fps depending on typical amounts of motion. Requires extra parts. |
|
|
||||||
|
|
||||||
## Detectors
|
## Detectors
|
||||||
|
|
||||||
@@ -69,6 +68,7 @@ Inference speeds vary greatly depending on the CPU, GPU, or VPU used, some known
|
|||||||
| Intel i5 7500 | ~ 15 ms | Inference speeds on CPU were ~ 260 ms |
|
| Intel i5 7500 | ~ 15 ms | Inference speeds on CPU were ~ 260 ms |
|
||||||
| Intel i5 1135G7 | 10 - 15 ms | |
|
| Intel i5 1135G7 | 10 - 15 ms | |
|
||||||
| Intel i5 12600K | ~ 15 ms | Inference speeds on CPU were ~ 35 ms |
|
| Intel i5 12600K | ~ 15 ms | Inference speeds on CPU were ~ 35 ms |
|
||||||
|
| Intel Arc A750 | ~ 4 ms | |
|
||||||
|
|
||||||
### TensorRT - Nvidia GPU
|
### TensorRT - Nvidia GPU
|
||||||
|
|
||||||
@@ -95,6 +95,18 @@ Frigate supports all Jetson boards, from the inexpensive Jetson Nano to the powe
|
|||||||
|
|
||||||
Inference speed will vary depending on the YOLO model, jetson platform and jetson nvpmodel (GPU/DLA/EMC clock speed). It is typically 20-40 ms for most models. The DLA is more efficient than the GPU, but not faster, so using the DLA will reduce power consumption but will slightly increase inference time.
|
Inference speed will vary depending on the YOLO model, jetson platform and jetson nvpmodel (GPU/DLA/EMC clock speed). It is typically 20-40 ms for most models. The DLA is more efficient than the GPU, but not faster, so using the DLA will reduce power consumption but will slightly increase inference time.
|
||||||
|
|
||||||
|
#### Rockchip platform
|
||||||
|
|
||||||
|
Frigate supports hardware video processing on all Rockchip boards. However, hardware object detection is only supported on these boards:
|
||||||
|
|
||||||
|
- RK3562
|
||||||
|
- RK3566
|
||||||
|
- RK3568
|
||||||
|
- RK3576
|
||||||
|
- RK3588
|
||||||
|
|
||||||
|
The inference time of a rk3588 with all 3 cores enabled is typically 25-30 ms for yolo-nas s.
|
||||||
|
|
||||||
## What does Frigate use the CPU for and what does it use a detector for? (ELI5 Version)
|
## What does Frigate use the CPU for and what does it use a detector for? (ELI5 Version)
|
||||||
|
|
||||||
This is taken from a [user question on reddit](https://www.reddit.com/r/homeassistant/comments/q8mgau/comment/hgqbxh5/?utm_source=share&utm_medium=web2x&context=3). Modified slightly for clarity.
|
This is taken from a [user question on reddit](https://www.reddit.com/r/homeassistant/comments/q8mgau/comment/hgqbxh5/?utm_source=share&utm_medium=web2x&context=3). Modified slightly for clarity.
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ title: Installation
|
|||||||
|
|
||||||
Frigate is a Docker container that can be run on any Docker host including as a [HassOS Addon](https://www.home-assistant.io/addons/). Note that a Home Assistant Addon is **not** the same thing as the integration. The [integration](/integrations/home-assistant) is required to integrate Frigate into Home Assistant.
|
Frigate is a Docker container that can be run on any Docker host including as a [HassOS Addon](https://www.home-assistant.io/addons/). Note that a Home Assistant Addon is **not** the same thing as the integration. The [integration](/integrations/home-assistant) is required to integrate Frigate into Home Assistant.
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
If you already have Frigate installed as a Home Assistant addon, check out the [getting started guide](../guides/getting_started#configuring-frigate) to configure Frigate.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
**MQTT broker (optional)** - An MQTT broker is optional with Frigate, but is required for the Home Assistant integration. If using Home Assistant, Frigate and Home Assistant must be connected to the same MQTT broker.
|
**MQTT broker (optional)** - An MQTT broker is optional with Frigate, but is required for the Home Assistant integration. If using Home Assistant, Frigate and Home Assistant must be connected to the same MQTT broker.
|
||||||
@@ -34,7 +40,7 @@ The following ports are used by Frigate and can be mapped via docker as required
|
|||||||
|
|
||||||
| Port | Description |
|
| Port | Description |
|
||||||
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `8080` | Authenticated UI and API access. Reverse proxies should use this port. |
|
| `8971` | Authenticated UI and API access without TLS. Reverse proxies should use this port. |
|
||||||
| `5000` | Internal unauthenticated UI and API access. Access to this port should be limited. Intended to be used within the docker network for services that integrate with Frigate. |
|
| `5000` | Internal unauthenticated UI and API access. Access to this port should be limited. Intended to be used within the docker network for services that integrate with Frigate. |
|
||||||
| `8554` | RTSP restreaming. By default, these streams are unauthenticated. Authentication can be configured in go2rtc section of config. |
|
| `8554` | RTSP restreaming. By default, these streams are unauthenticated. Authentication can be configured in go2rtc section of config. |
|
||||||
| `8555` | WebRTC connections for low latency live views. |
|
| `8555` | WebRTC connections for low latency live views. |
|
||||||
@@ -44,7 +50,6 @@ The following ports are used by Frigate and can be mapped via docker as required
|
|||||||
Writing to a local disk or external USB drive:
|
Writing to a local disk or external USB drive:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: "3.9"
|
|
||||||
services:
|
services:
|
||||||
frigate:
|
frigate:
|
||||||
...
|
...
|
||||||
@@ -95,6 +100,56 @@ By default, the Raspberry Pi limits the amount of memory available to the GPU. I
|
|||||||
|
|
||||||
Additionally, the USB Coral draws a considerable amount of power. If using any other USB devices such as an SSD, you will experience instability due to the Pi not providing enough power to USB devices. You will need to purchase an external USB hub with it's own power supply. Some have reported success with <a href="https://amzn.to/3a2mH0P" target="_blank" rel="nofollow noopener sponsored">this</a> (affiliate link).
|
Additionally, the USB Coral draws a considerable amount of power. If using any other USB devices such as an SSD, you will experience instability due to the Pi not providing enough power to USB devices. You will need to purchase an external USB hub with it's own power supply. Some have reported success with <a href="https://amzn.to/3a2mH0P" target="_blank" rel="nofollow noopener sponsored">this</a> (affiliate link).
|
||||||
|
|
||||||
|
### Rockchip platform
|
||||||
|
|
||||||
|
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and necessary drivers (especially rkvdec2 and rknpu). To check, enter the following commands:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ uname -r
|
||||||
|
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
|
||||||
|
$ ls /dev/dri
|
||||||
|
by-path card0 card1 renderD128 renderD129 # should list renderD128 (VPU) and renderD129 (NPU)
|
||||||
|
$ sudo cat /sys/kernel/debug/rknpu/version
|
||||||
|
RKNPU driver: v0.9.2 # or later version
|
||||||
|
```
|
||||||
|
|
||||||
|
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
|
||||||
|
|
||||||
|
#### Setup
|
||||||
|
|
||||||
|
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
|
||||||
|
|
||||||
|
Next, you need to grant docker permissions to access your hardware:
|
||||||
|
|
||||||
|
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
|
||||||
|
- After everything works, you should only grant necessary permissions to increase security. Disable the privileged mode and add the lines below to your `docker-compose.yml` file:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
security_opt:
|
||||||
|
- apparmor=unconfined
|
||||||
|
- systempaths=unconfined
|
||||||
|
devices:
|
||||||
|
- /dev/dri
|
||||||
|
- /dev/dma_heap
|
||||||
|
- /dev/rga
|
||||||
|
- /dev/mpp_service
|
||||||
|
```
|
||||||
|
|
||||||
|
or add these options to your `docker run` command:
|
||||||
|
|
||||||
|
```
|
||||||
|
--security-opt systempaths=unconfined \
|
||||||
|
--security-opt apparmor=unconfined \
|
||||||
|
--device /dev/dri \
|
||||||
|
--device /dev/dma_heap \
|
||||||
|
--device /dev/rga \
|
||||||
|
--device /dev/mpp_service
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Configuration
|
||||||
|
|
||||||
|
Next, you should configure [hardware object detection](/configuration/object_detectors#rockchip-platform) and [hardware video processing](/configuration/hardware_acceleration#rockchip-platform).
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Running in Docker with compose is the recommended install method.
|
Running in Docker with compose is the recommended install method.
|
||||||
@@ -122,7 +177,7 @@ services:
|
|||||||
tmpfs:
|
tmpfs:
|
||||||
size: 1000000000
|
size: 1000000000
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8971:8971"
|
||||||
# - "5000:5000" # Internal unauthenticated access. Expose carefully.
|
# - "5000:5000" # Internal unauthenticated access. Expose carefully.
|
||||||
- "8554:8554" # RTSP feeds
|
- "8554:8554" # RTSP feeds
|
||||||
- "8555:8555/tcp" # WebRTC over tcp
|
- "8555:8555/tcp" # WebRTC over tcp
|
||||||
@@ -145,7 +200,7 @@ docker run -d \
|
|||||||
-v /path/to/your/config:/config \
|
-v /path/to/your/config:/config \
|
||||||
-v /etc/localtime:/etc/localtime:ro \
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
-e FRIGATE_RTSP_PASSWORD='password' \
|
-e FRIGATE_RTSP_PASSWORD='password' \
|
||||||
-p 8080:8080 \
|
-p 8971:8971 \
|
||||||
-p 8554:8554 \
|
-p 8554:8554 \
|
||||||
-p 8555:8555/tcp \
|
-p 8555:8555/tcp \
|
||||||
-p 8555:8555/udp \
|
-p 8555:8555/udp \
|
||||||
@@ -321,7 +376,7 @@ docker run \
|
|||||||
--network=bridge \
|
--network=bridge \
|
||||||
--privileged \
|
--privileged \
|
||||||
--workdir=/opt/frigate \
|
--workdir=/opt/frigate \
|
||||||
-p 8080:8080 \
|
-p 8971:8971 \
|
||||||
-p 8554:8554 \
|
-p 8554:8554 \
|
||||||
-p 8555:8555 \
|
-p 8555:8555 \
|
||||||
-p 8555:8555/udp \
|
-p 8555:8555/udp \
|
||||||
|
|||||||
@@ -13,7 +13,15 @@ Use of the bundled go2rtc is optional. You can still configure FFmpeg to connect
|
|||||||
|
|
||||||
# Setup a go2rtc stream
|
# Setup a go2rtc stream
|
||||||
|
|
||||||
First, you will want to configure go2rtc to connect to your camera stream by adding the stream you want to use for live view in your Frigate config file. If you set the stream name under go2rtc to match the name of your camera, it will automatically be mapped and you will get additional live view options for the camera. Avoid changing any other parts of your config at this step. Note that go2rtc supports [many different stream types](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#module-streams), not just rtsp.
|
First, you will want to configure go2rtc to connect to your camera stream by adding the stream you want to use for live view in your Frigate config file. Avoid changing any other parts of your config at this step. Note that go2rtc supports [many different stream types](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#module-streams), not just rtsp.
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
For the best experience, you should set the stream name under `go2rtc` to match the name of your camera so that Frigate will automatically map it and be able to use better live view options for the camera.
|
||||||
|
|
||||||
|
See [the live view docs](../configuration/live.md#setting-stream-for-live-ui) for more information.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
go2rtc:
|
go2rtc:
|
||||||
@@ -22,65 +30,83 @@ go2rtc:
|
|||||||
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
||||||
```
|
```
|
||||||
|
|
||||||
The easiest live view to get working is MSE. After adding this to the config, restart Frigate and try to watch the live stream by selecting MSE in the dropdown after clicking on the camera.
|
After adding this to the config, restart Frigate and try to watch the live stream for a single camera by clicking on it from the dashboard. It should look much clearer and more fluent than the original jsmpeg stream.
|
||||||
|
|
||||||
|
|
||||||
### What if my video doesn't play?
|
### What if my video doesn't play?
|
||||||
|
|
||||||
If you are unable to see your video feed, first check the go2rtc logs in the Frigate UI under Logs in the sidebar. If go2rtc is having difficulty connecting to your camera, you should see some error messages in the log. If you do not see any errors, then the video codec of the stream may not be supported in your browser. If your camera stream is set to H265, try switching to H264. You can see more information about [video codec compatibility](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#codecs-madness) in the go2rtc documentation. If you are not able to switch your camera settings from H265 to H264 or your stream is a different format such as MJPEG, you can use go2rtc to re-encode the video using the [FFmpeg parameters](https://github.com/AlexxIT/go2rtc/tree/v1.9.2#source-ffmpeg). It supports rotating and resizing video feeds and hardware acceleration. Keep in mind that transcoding video from one format to another is a resource intensive task and you may be better off using the built-in jsmpeg view. Here is an example of a config that will re-encode the stream to H264 without hardware acceleration:
|
- Check Logs:
|
||||||
|
- Access the go2rtc logs in the Frigate UI under Logs in the sidebar.
|
||||||
|
- If go2rtc is having difficulty connecting to your camera, you should see some error messages in the log.
|
||||||
|
|
||||||
```yaml
|
- Check go2rtc Web Interface: if you don't see any errors in the logs, try viewing the camera through go2rtc's web interface.
|
||||||
go2rtc:
|
- Navigate to port 1984 in your browser to access go2rtc's web interface.
|
||||||
streams:
|
- If using Frigate through Home Assistant, enable the web interface at port 1984.
|
||||||
back:
|
- If using Docker, forward port 1984 before accessing the web interface.
|
||||||
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
- Click `stream` for the specific camera to see if the camera's stream is being received.
|
||||||
- "ffmpeg:back#video=h264"
|
|
||||||
```
|
|
||||||
|
|
||||||
Some camera streams may need to use the ffmpeg module in go2rtc. This has the downside of slower startup times, but has compatibility with more stream types.
|
- Check Video Codec:
|
||||||
|
- If the camera stream works in go2rtc but not in your browser, the video codec might be unsupported.
|
||||||
|
- If using H265, switch to H264. Refer to [video codec compatibility](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#codecs-madness) in go2rtc documentation.
|
||||||
|
- If unable to switch from H265 to H264, or if the stream format is different (e.g., MJPEG), re-encode the video using [FFmpeg parameters](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-ffmpeg). It supports rotating and resizing video feeds and hardware acceleration. Keep in mind that transcoding video from one format to another is a resource intensive task and you may be better off using the built-in jsmpeg view.
|
||||||
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
back:
|
||||||
|
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
||||||
|
- "ffmpeg:back#video=h264#hardware"
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
- Switch to FFmpeg if needed:
|
||||||
go2rtc:
|
- Some camera streams may need to use the ffmpeg module in go2rtc. This has the downside of slower startup times, but has compatibility with more stream types.
|
||||||
streams:
|
```yaml
|
||||||
back:
|
go2rtc:
|
||||||
- ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
streams:
|
||||||
```
|
back:
|
||||||
|
- ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
||||||
|
```
|
||||||
|
|
||||||
If you can see the video but do not have audio, this is most likely because your camera's audio stream is not AAC. If possible, update your camera's audio settings to AAC. If your cameras do not support AAC audio, you will need to tell go2rtc to re-encode the audio to AAC on demand if you want audio. This will use additional CPU and add some latency. To add AAC audio on demand, you can update your go2rtc config as follows:
|
- If you can see the video but do not have audio, this is most likely because your camera's audio stream codec is not AAC.
|
||||||
|
- If possible, update your camera's audio settings to AAC in your camera's firmware.
|
||||||
|
- If your cameras do not support AAC audio, you will need to tell go2rtc to re-encode the audio to AAC on demand if you want audio. This will use additional CPU and add some latency. To add AAC audio on demand, you can update your go2rtc config as follows:
|
||||||
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
back:
|
||||||
|
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
||||||
|
- "ffmpeg:back#audio=aac"
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
If you need to convert **both** the audio and video streams, you can use the following:
|
||||||
go2rtc:
|
|
||||||
streams:
|
|
||||||
back:
|
|
||||||
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
|
||||||
- "ffmpeg:back#audio=aac"
|
|
||||||
```
|
|
||||||
|
|
||||||
If you need to convert **both** the audio and video streams, you can use the following:
|
```yaml
|
||||||
|
go2rtc:
|
||||||
|
streams:
|
||||||
|
back:
|
||||||
|
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
||||||
|
- "ffmpeg:back#video=h264#audio=aac#hardware"
|
||||||
|
```
|
||||||
|
|
||||||
```yaml
|
When using the ffmpeg module, you would add AAC audio like this:
|
||||||
go2rtc:
|
|
||||||
streams:
|
|
||||||
back:
|
|
||||||
- rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
|
|
||||||
- "ffmpeg:back#video=h264#audio=aac"
|
|
||||||
```
|
|
||||||
|
|
||||||
When using the ffmpeg module, you would add AAC audio like this:
|
```yaml
|
||||||
|
go2rtc:
|
||||||
```yaml
|
streams:
|
||||||
go2rtc:
|
back:
|
||||||
streams:
|
- "ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2#video=copy#audio=copy#audio=aac#hardware"
|
||||||
back:
|
```
|
||||||
- "ffmpeg:rtsp://user:password@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2#video=copy#audio=copy#audio=aac"
|
|
||||||
```
|
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
To access the go2rtc stream externally when utilizing the Frigate Add-On (for instance through VLC), you must first enable the RTSP Restream port. You can do this by visiting the Frigate Add-On configuration page within Home Assistant and revealing the hidden options under the "Show disabled ports" section.
|
To access the go2rtc stream externally when utilizing the Frigate Add-On (for
|
||||||
|
instance through VLC), you must first enable the RTSP Restream port.
|
||||||
|
You can do this by visiting the Frigate Add-On configuration page within Home
|
||||||
|
Assistant and revealing the hidden options under the "Show disabled ports"
|
||||||
|
section.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
||||||
1. If the stream you added to go2rtc is also used by Frigate for the `record` or `detect` role, you can migrate your config to pull from the RTSP restream to reduce the number of connections to your camera as shown [here](/configuration/restream#reduce-connections-to-camera).
|
1. If the stream you added to go2rtc is also used by Frigate for the `record` or `detect` role, you can migrate your config to pull from the RTSP restream to reduce the number of connections to your camera as shown [here](/configuration/restream#reduce-connections-to-camera).
|
||||||
1. You may also prefer to [setup WebRTC](/configuration/live#webrtc-extra-configuration) for slightly lower latency than MSE. Note that WebRTC only supports h264 and specific audio formats.
|
2. You may also prefer to [setup WebRTC](/configuration/live#webrtc-extra-configuration) for slightly lower latency than MSE. Note that WebRTC only supports h264 and specific audio formats and may require opening ports on your router.
|
||||||
|
|||||||
@@ -5,9 +5,17 @@ title: Getting started
|
|||||||
|
|
||||||
# Getting Started
|
# Getting Started
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
|
||||||
|
If you already have an environment with Linux and Docker installed, you can continue to [Installing Frigate](#installing-frigate) below.
|
||||||
|
|
||||||
|
If you already have Frigate installed in Docker or as a Home Assistant addon, you can continue to [Configuring Frigate](#configuring-frigate) below.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## Setting up hardware
|
## Setting up hardware
|
||||||
|
|
||||||
This section guides you through setting up a server with Debian Bookworm and Docker. If you already have an environment with Linux and Docker installed, you can continue to [Installing Frigate](#installing-frigate) below.
|
This section guides you through setting up a server with Debian Bookworm and Docker.
|
||||||
|
|
||||||
### Install Debian 12 (Bookworm)
|
### Install Debian 12 (Bookworm)
|
||||||
|
|
||||||
@@ -77,20 +85,19 @@ This section shows how to create a minimal directory structure for a Docker inst
|
|||||||
|
|
||||||
### Setup directories
|
### Setup directories
|
||||||
|
|
||||||
Frigate requires a valid config file to start. The following directory structure is the bare minimum to get started. Once Frigate is running, you can use the built-in config editor which supports config validation.
|
Frigate will create a config file if one does not exist on the initial startup. The following directory structure is the bare minimum to get started. Once Frigate is running, you can use the built-in config editor which supports config validation.
|
||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
├── docker-compose.yml
|
├── docker-compose.yml
|
||||||
├── config/
|
├── config/
|
||||||
│ └── config.yml
|
|
||||||
└── storage/
|
└── storage/
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create the above structure:
|
This will create the above structure:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir storage config && touch docker-compose.yml config/config.yml
|
mkdir storage config && touch docker-compose.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are setting up Frigate on a Linux device via SSH, you can use [nano](https://itsfoss.com/nano-editor-guide/) to edit the following files. If you prefer to edit remote files with a full editor instead of a terminal, I recommend using [Visual Studio Code](https://code.visualstudio.com/) with the [Remote SSH extension](https://code.visualstudio.com/docs/remote/ssh-tutorial).
|
If you are setting up Frigate on a Linux device via SSH, you can use [nano](https://itsfoss.com/nano-editor-guide/) to edit the following files. If you prefer to edit remote files with a full editor instead of a terminal, I recommend using [Visual Studio Code](https://code.visualstudio.com/) with the [Remote SSH extension](https://code.visualstudio.com/docs/remote/ssh-tutorial).
|
||||||
@@ -117,27 +124,11 @@ services:
|
|||||||
tmpfs:
|
tmpfs:
|
||||||
size: 1000000000
|
size: 1000000000
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8971:8971"
|
||||||
- "8554:8554" # RTSP feeds
|
- "8554:8554" # RTSP feeds
|
||||||
```
|
```
|
||||||
|
|
||||||
`config.yml`
|
Now you should be able to start Frigate by running `docker compose up -d` from within the folder containing `docker-compose.yml`. On startup, an admin user and password will be created and outputted in the logs. You can see this by running `docker logs frigate`. Frigate should now be accessible at `https://server_ip:8971` where you can login with the `admin` user and finish the configuration using the built-in configuration editor.
|
||||||
|
|
||||||
```yaml
|
|
||||||
mqtt:
|
|
||||||
enabled: False
|
|
||||||
|
|
||||||
cameras:
|
|
||||||
dummy_camera: # <--- this will be changed to your actual camera later
|
|
||||||
enabled: False
|
|
||||||
ffmpeg:
|
|
||||||
inputs:
|
|
||||||
- path: rtsp://127.0.0.1:554/rtsp
|
|
||||||
roles:
|
|
||||||
- detect
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you should be able to start Frigate by running `docker compose up -d` from within the folder containing `docker-compose.yml`. On startup, an admin user and password will be created and outputted in the logs. You can see this by running `docker logs frigate`. Frigate should now be accessible at `server_ip:8080` where you can login with the `admin` user and finish the configuration using the built-in configuration editor.
|
|
||||||
|
|
||||||
## Configuring Frigate
|
## Configuring Frigate
|
||||||
|
|
||||||
@@ -274,13 +265,11 @@ cameras:
|
|||||||
- 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432
|
- 0,461,3,0,1919,0,1919,843,1699,492,1344,458,1346,336,973,317,869,375,866,432
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 6: Enable recording and/or snapshots
|
### Step 6: Enable recordings
|
||||||
|
|
||||||
In order to see Events in the Frigate UI, either snapshots or record will need to be enabled.
|
In order to review activity in the Frigate UI, recordings need to be enabled.
|
||||||
|
|
||||||
#### Record
|
To enable recording video, add the `record` role to a stream and enable it in the config. If record is disabled in the config, it won't be possible to enable it in the UI.
|
||||||
|
|
||||||
To enable recording video, add the `record` role to a stream and enable it in the config. If record is disabled in the config, turning it on via the UI will not have any effect.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
mqtt: ...
|
mqtt: ...
|
||||||
@@ -305,37 +294,28 @@ cameras:
|
|||||||
|
|
||||||
If you don't have separate streams for detect and record, you would just add the record role to the list on the first input.
|
If you don't have separate streams for detect and record, you would just add the record role to the list on the first input.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
If you only define one stream in your `inputs` and do not assign a `detect` role to it, Frigate will automatically assign it the `detect` role. Frigate will always decode a stream to support motion detection, Birdseye, the API image endpoints, and other features, even if you have disabled object detection with `enabled: False` in your config's `detect` section.
|
||||||
|
|
||||||
|
If you plan to use Frigate for recording only, it is still recommended to define a `detect` role for a low resolution stream to minimize resource usage from the required stream decoding.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
By default, Frigate will retain video of all events for 10 days. The full set of options for recording can be found [here](../configuration/reference.md).
|
By default, Frigate will retain video of all events for 10 days. The full set of options for recording can be found [here](../configuration/reference.md).
|
||||||
|
|
||||||
#### Snapshots
|
|
||||||
|
|
||||||
To enable snapshots of your events, just enable it in the config. Snapshots are taken from the detect stream because it is the only stream decoded.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
mqtt: ...
|
|
||||||
|
|
||||||
detectors: ...
|
|
||||||
|
|
||||||
cameras:
|
|
||||||
name_of_your_camera: ...
|
|
||||||
detect: ...
|
|
||||||
record: ...
|
|
||||||
snapshots: # <----- Enable snapshots
|
|
||||||
enabled: True
|
|
||||||
motion: ...
|
|
||||||
```
|
|
||||||
|
|
||||||
By default, Frigate will retain snapshots of all events for 10 days. The full set of options for snapshots can be found [here](../configuration/reference.md).
|
|
||||||
|
|
||||||
### Step 7: Complete config
|
### Step 7: Complete config
|
||||||
|
|
||||||
At this point you have a complete config with basic functionality. You can see the [full config reference](../configuration/reference.md) for a complete list of configuration options.
|
At this point you have a complete config with basic functionality.
|
||||||
|
- View [common configuration examples](../configuration/index.md#common-configuration-examples) for a list of common configuration examples.
|
||||||
|
- View [full config reference](../configuration/reference.md) for a complete list of configuration options.
|
||||||
|
|
||||||
### Follow up
|
### Follow up
|
||||||
|
|
||||||
Now that you have a working install, you can use the following documentation for additional features:
|
Now that you have a working install, you can use the following documentation for additional features:
|
||||||
|
|
||||||
1. [Configuring go2rtc](configuring_go2rtc.md) - Additional live view options and RTSP relay
|
1. [Configuring go2rtc](configuring_go2rtc.md) - Additional live view options and RTSP relay
|
||||||
2. [Home Assistant Integration](../integrations/home-assistant.md) - Integrate with Home Assistant
|
2. [Zones](../configuration/zones.md)
|
||||||
3. [Masks](../configuration/masks.md)
|
3. [Review](../configuration/review.md)
|
||||||
4. [Zones](../configuration/zones.md)
|
4. [Masks](../configuration/masks.md)
|
||||||
|
5. [Home Assistant Integration](../integrations/home-assistant.md) - Integrate with Home Assistant
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ title: Home Assistant notifications
|
|||||||
|
|
||||||
The best way to get started with notifications for Frigate is to use the [Blueprint](https://community.home-assistant.io/t/frigate-mobile-app-notifications-2-0/559732). You can use the yaml generated from the Blueprint as a starting point and customize from there.
|
The best way to get started with notifications for Frigate is to use the [Blueprint](https://community.home-assistant.io/t/frigate-mobile-app-notifications-2-0/559732). You can use the yaml generated from the Blueprint as a starting point and customize from there.
|
||||||
|
|
||||||
It is generally recommended to trigger notifications based on the `frigate/events` mqtt topic. This provides the event_id needed to fetch [thumbnails/snapshots/clips](../integrations/home-assistant.md#notification-api) and other useful information to customize when and where you want to receive alerts. The data is published in the form of a change feed, which means you can reference the "previous state" of the object in the `before` section and the "current state" of the object in the `after` section. You can see an example [here](../integrations/mqtt.md#frigateevents).
|
It is generally recommended to trigger notifications based on the `frigate/reviews` mqtt topic. This provides the event_id(s) needed to fetch [thumbnails/snapshots/clips](../integrations/home-assistant.md#notification-api) and other useful information to customize when and where you want to receive alerts. The data is published in the form of a change feed, which means you can reference the "previous state" of the object in the `before` section and the "current state" of the object in the `after` section. You can see an example [here](../integrations/mqtt.md#frigateevents).
|
||||||
|
|
||||||
Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as Frigate finds a "better" image.
|
Here is a simple example of a notification automation of events which will update the existing notification for each change. This means the image you see in the notification will update as Frigate finds a "better" image.
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ automation:
|
|||||||
topic: frigate/events
|
topic: frigate/events
|
||||||
action:
|
action:
|
||||||
- service: notify.mobile_app_pixel_3
|
- service: notify.mobile_app_pixel_3
|
||||||
data_template:
|
data:
|
||||||
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
|
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
|
||||||
data:
|
data:
|
||||||
image: 'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
|
image: 'https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg?format=android'
|
||||||
@@ -33,48 +33,18 @@ automation:
|
|||||||
description: ""
|
description: ""
|
||||||
trigger:
|
trigger:
|
||||||
- platform: mqtt
|
- platform: mqtt
|
||||||
topic: frigate/events
|
topic: frigate/reviews
|
||||||
payload: new
|
payload: alert
|
||||||
value_template: "{{ value_json.type }}"
|
value_template: "{{ value_json['after']['severity'] }}"
|
||||||
action:
|
action:
|
||||||
- service: notify.mobile_app_iphone
|
- service: notify.mobile_app_iphone
|
||||||
data:
|
data:
|
||||||
message: 'A {{trigger.payload_json["after"]["label"]}} was detected.'
|
message: 'A {{trigger.payload_json["after"]["data"]["objects"] | sort | join(", ") | title}} was detected.'
|
||||||
data:
|
data:
|
||||||
image: >-
|
image: >-
|
||||||
https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["id"]}}/thumbnail.jpg
|
https://your.public.hass.address.com/api/frigate/notifications/{{trigger.payload_json["after"]["data"]["detections"][0]}}/thumbnail.jpg
|
||||||
tag: '{{trigger.payload_json["after"]["id"]}}'
|
tag: '{{trigger.payload_json["after"]["id"]}}'
|
||||||
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
|
when: '{{trigger.payload_json["after"]["start_time"]|int}}'
|
||||||
entity_id: camera.{{trigger.payload_json["after"]["camera"] | replace("-","_") | lower}}
|
entity_id: camera.{{trigger.payload_json["after"]["camera"] | replace("-","_") | lower}}
|
||||||
mode: single
|
mode: single
|
||||||
```
|
```
|
||||||
|
|
||||||
## Conditions
|
|
||||||
|
|
||||||
Conditions with the `before` and `after` values allow a high degree of customization for automations.
|
|
||||||
|
|
||||||
When a person enters a zone named yard
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
condition:
|
|
||||||
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
|
||||||
- "{{ 'yard' in trigger.payload_json['after']['entered_zones'] }}"
|
|
||||||
```
|
|
||||||
|
|
||||||
When a person leaves a zone named yard
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
condition:
|
|
||||||
- "{{ trigger.payload_json['after']['label'] == 'person' }}"
|
|
||||||
- "{{ 'yard' in trigger.payload_json['before']['current_zones'] }}"
|
|
||||||
- "{{ not 'yard' in trigger.payload_json['after']['current_zones'] }}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Notify for dogs in the front with a high top score
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
condition:
|
|
||||||
- "{{ trigger.payload_json['after']['label'] == 'dog' }}"
|
|
||||||
- "{{ trigger.payload_json['after']['camera'] == 'front' }}"
|
|
||||||
- "{{ trigger.payload_json['after']['top_score'] > 0.98 }}"
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -3,25 +3,38 @@ id: reverse_proxy
|
|||||||
title: Setting up a reverse proxy
|
title: Setting up a reverse proxy
|
||||||
---
|
---
|
||||||
|
|
||||||
This guide outlines the basic configuration steps needed to expose your Frigate UI to the internet.
|
This guide outlines the basic configuration steps needed to set up a reverse proxy in front of your Frigate instance.
|
||||||
A common way of accomplishing this is to use a reverse proxy webserver between your router and your Frigate instance.
|
|
||||||
A reverse proxy accepts HTTP requests from the public internet and redirects them transparently to internal webserver(s) on your network.
|
|
||||||
|
|
||||||
The suggested steps are:
|
A reverse proxy is typically needed if you want to set up Frigate on a custom URL, on a subdomain, or on a host serving multiple sites. It could also be used to set up your own authentication provider or for more advanced HTTP routing.
|
||||||
|
|
||||||
- **Configure** a 'proxy' HTTP webserver (such as [Apache2](https://httpd.apache.org/docs/current/) or [NPM](https://github.com/NginxProxyManager/nginx-proxy-manager)) and only expose ports 80/443 from this webserver to the internet
|
Before setting up a reverse proxy, check if any of the built-in functionality in Frigate suits your needs:
|
||||||
- **Encrypt** content from the proxy webserver by installing SSL (such as with [Let's Encrypt](https://letsencrypt.org/)). Note that SSL is then not required on your Frigate webserver as the proxy encrypts all requests for you
|
|Topic|Docs|
|
||||||
- **Restrict** access to your Frigate instance at the proxy using, for example, password authentication
|
|-|-|
|
||||||
|
|TLS|Please see the `tls` [configuration option](../configuration/tls.md)|
|
||||||
|
|Authentication|Please see the [authentication](../configuration/authentication.md) documentation|
|
||||||
|
|IPv6|[Enabling IPv6](../configuration/advanced.md#enabling-ipv6)
|
||||||
|
|
||||||
|
**Note about TLS**
|
||||||
|
When using a reverse proxy, the TLS session is usually terminated at the proxy, sending the internal request over plain HTTP. If this is the desired behavior, TLS must first be disabled in Frigate, or you will encounter an HTTP 400 error: "The plain HTTP request was sent to HTTPS port."
|
||||||
|
To disable TLS, set the following in your Frigate configuration:
|
||||||
|
```yml
|
||||||
|
tls:
|
||||||
|
enabled: false
|
||||||
|
```
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
A reverse proxy can be used to secure access to an internal webserver but the user will be entirely reliant
|
A reverse proxy can be used to secure access to an internal web server, but the user will be entirely reliant on the steps they have taken. You must ensure you are following security best practices.
|
||||||
on the steps they have taken. You must ensure you are following security best practices.
|
This page does not attempt to outline the specific steps needed to secure your internal website.
|
||||||
This page does not attempt to outline the specific steps needed to secure your internal website.
|
|
||||||
Please use your own knowledge to assess and vet the reverse proxy software before you install anything on your system.
|
Please use your own knowledge to assess and vet the reverse proxy software before you install anything on your system.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
There are several technologies available to implement reverse proxies. This document currently suggests one, using Apache2,
|
## Proxies
|
||||||
and the community is invited to document others through a contribution to this page.
|
|
||||||
|
There are many solutions available to implement reverse proxies and the community is invited to help out documenting others through a contribution to this page.
|
||||||
|
|
||||||
|
* [Apache2](#apache2-reverse-proxy)
|
||||||
|
* [Nginx](#nginx-reverse-proxy)
|
||||||
|
* [Traefik](#traefik-reverse-proxy)
|
||||||
|
|
||||||
## Apache2 Reverse Proxy
|
## Apache2 Reverse Proxy
|
||||||
|
|
||||||
@@ -38,20 +51,20 @@ Here we access Frigate via https://cctv.mydomain.co.uk
|
|||||||
ServerName cctv.mydomain.co.uk
|
ServerName cctv.mydomain.co.uk
|
||||||
|
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
ProxyPass "/" "http://frigatepi.local:8080/"
|
ProxyPass "/" "http://frigatepi.local:8971/"
|
||||||
ProxyPassReverse "/" "http://frigatepi.local:8080/"
|
ProxyPassReverse "/" "http://frigatepi.local:8971/"
|
||||||
|
|
||||||
ProxyPass /ws ws://frigatepi.local:8080/ws
|
ProxyPass /ws ws://frigatepi.local:8971/ws
|
||||||
ProxyPassReverse /ws ws://frigatepi.local:8080/ws
|
ProxyPassReverse /ws ws://frigatepi.local:8971/ws
|
||||||
|
|
||||||
ProxyPass /live/ ws://frigatepi.local:8080/live/
|
ProxyPass /live/ ws://frigatepi.local:8971/live/
|
||||||
ProxyPassReverse /live/ ws://frigatepi.local:8080/live/
|
ProxyPassReverse /live/ ws://frigatepi.local:8971/live/
|
||||||
|
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
RewriteCond %{HTTP:Upgrade} =websocket [NC]
|
||||||
RewriteRule /(.*) ws://frigatepi.local:8080/$1 [P,L]
|
RewriteRule /(.*) ws://frigatepi.local:8971/$1 [P,L]
|
||||||
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
|
RewriteCond %{HTTP:Upgrade} !=websocket [NC]
|
||||||
RewriteRule /(.*) http://frigatepi.local:8080/$1 [P,L]
|
RewriteRule /(.*) http://frigatepi.local:8971/$1 [P,L]
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -101,7 +114,7 @@ This is set in `$server` and `$port` this should match your ports you have expos
|
|||||||
server {
|
server {
|
||||||
set $forward_scheme http;
|
set $forward_scheme http;
|
||||||
set $server "192.168.100.2"; # FRIGATE SERVER LOCATION
|
set $server "192.168.100.2"; # FRIGATE SERVER LOCATION
|
||||||
set $port 8080;
|
set $port 8971;
|
||||||
|
|
||||||
listen 80;
|
listen 80;
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
@@ -141,3 +154,26 @@ The settings below enabled connection upgrade, sets up logging (optional) and pr
|
|||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Traefik Reverse Proxy
|
||||||
|
|
||||||
|
This example shows how to add a `label` to the Frigate Docker compose file, enabling Traefik to automatically discover your Frigate instance.
|
||||||
|
Before using the example below, you must first set up Traefik with the [Docker provider](https://doc.traefik.io/traefik/providers/docker/)
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
frigate:
|
||||||
|
container_name: frigate
|
||||||
|
image: ghcr.io/blakeblackshear/frigate:stable
|
||||||
|
...
|
||||||
|
...
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.services.frigate.loadbalancer.server.port=8971"
|
||||||
|
- "traefik.http.routers.frigate.rule=Host(`traefik.example.com`)"
|
||||||
|
```
|
||||||
|
|
||||||
|
The above configuration will create a "service" in Traefik, automatically adding your container's IP on port 8971 as a backend.
|
||||||
|
It will also add a router, routing requests to "traefik.example.com" to your local container.
|
||||||
|
|
||||||
|
Note that with this approach, you don't need to expose any ports for the Frigate instance since all traffic will be routed over the internal Docker network.
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ Accepts the following query string parameters:
|
|||||||
| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) |
|
| `motion` | int | Draw blue boxes for areas with detected motion (0 or 1) |
|
||||||
| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) |
|
| `regions` | int | Draw green boxes for areas where object detection was run (0 or 1) |
|
||||||
|
|
||||||
You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `http://localhost:8080/api/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `http://localhost:8080/api/back?fps=10` or both with `?fps=10&h=1000`.
|
You can access a higher resolution mjpeg stream by appending `h=height-in-pixels` to the endpoint. For example `/api/back?h=1080`. You can also increase the FPS by appending `fps=frame-rate` to the URL such as `/api/back?fps=10` or both with `?fps=10&h=1000`.
|
||||||
|
|
||||||
### `GET /api/<camera_name>/latest.jpg[?h=300]`
|
### `GET /api/<camera_name>/latest.jpg[?h=300]`
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ Metadata about previews for this time range.
|
|||||||
|
|
||||||
Metadata about previews for this hour
|
Metadata about previews for this hour
|
||||||
|
|
||||||
### `GET /api/preview/<camera>/start/<start-timestamp>/end/<end-timestamp>`
|
### `GET /api/preview/<camera>/start/<start-timestamp>/end/<end-timestamp>/frames`
|
||||||
|
|
||||||
List of frames in the preview cache for the time range. Previews are only kept in the cache until they are combined into an mp4 at the end of the hour.
|
List of frames in the preview cache for the time range. Previews are only kept in the cache until they are combined into an mp4 at the end of the hour.
|
||||||
|
|
||||||
@@ -381,9 +381,21 @@ List of frames in the preview cache for the time range. Previews are only kept i
|
|||||||
|
|
||||||
Specific preview frame from preview cache.
|
Specific preview frame from preview cache.
|
||||||
|
|
||||||
### `GET /<camera>/start/<start-timestamp>/end/<end-timestamp>/preview.gif`
|
### `GET /review/<review_id>/preview`
|
||||||
|
|
||||||
Gif made from preview video / frames during this time range
|
Looping image made from preview video / frames during this review item.
|
||||||
|
|
||||||
|
| param | Type | Description |
|
||||||
|
| --------- | ---- | -------------------------------- |
|
||||||
|
| `format` | str | Format of preview [`gif`, `mp4`] |
|
||||||
|
|
||||||
|
### `GET /<camera>/start/<start-timestamp>/end/<end-timestamp>/preview`
|
||||||
|
|
||||||
|
Looping image made from preview video / frames during this time range.
|
||||||
|
|
||||||
|
| param | Type | Description |
|
||||||
|
| --------- | ---- | -------------------------------- |
|
||||||
|
| `format` | str | Format of preview [`gif`, `mp4`] |
|
||||||
|
|
||||||
## Recordings
|
## Recordings
|
||||||
|
|
||||||
@@ -399,17 +411,37 @@ HTTP Live Streaming Video on Demand URL for the specified event. Can be viewed i
|
|||||||
|
|
||||||
HTTP Live Streaming Video on Demand URL for the camera with the specified time range. Can be viewed in an application like VLC.
|
HTTP Live Streaming Video on Demand URL for the camera with the specified time range. Can be viewed in an application like VLC.
|
||||||
|
|
||||||
|
### `GET /api/exports`
|
||||||
|
|
||||||
|
Fetch a list of all export recordings
|
||||||
|
|
||||||
|
Sample response:
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"camera": "doorbell",
|
||||||
|
"date": 12800057,
|
||||||
|
"id": "doorbell_pjis54",
|
||||||
|
"in_progress": false,
|
||||||
|
"name": "2024-10-04 fox visit",
|
||||||
|
"thumb_path": "/media/frigate/clips/export/doorbell_pjis54.webp",
|
||||||
|
"video_path": "/media/frigate/exports/doorbell_pjis54.mp4"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
### `POST /api/export/<camera>/start/<start-timestamp>/end/<end-timestamp>`
|
### `POST /api/export/<camera>/start/<start-timestamp>/end/<end-timestamp>`
|
||||||
|
|
||||||
Export recordings from `start-timestamp` to `end-timestamp` for `camera` as a single mp4 file. These recordings will be exported to the `/media/frigate/exports` folder.
|
Export recordings from `start-timestamp` to `end-timestamp` for `camera` as a single mp4 file. These recordings will be exported to the `/media/frigate/exports` folder.
|
||||||
|
|
||||||
It is also possible to export this recording as a time-lapse.
|
It is also possible to export this recording as a time-lapse using the "playback" key in the json body, or specify a custom export filename, using the "name" key.
|
||||||
|
|
||||||
**Optional Body:**
|
**Optional Body:**
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"playback": "realtime" // playback factor: realtime or timelapse_25x
|
"playback": "realtime", // playback factor: realtime or timelapse_25x
|
||||||
|
"name": "custom export name" // override the default export filename with a custom name
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -450,10 +482,15 @@ Reviews from the database. Accepts the following query string parameters:
|
|||||||
| `after` | int | Epoch time |
|
| `after` | int | Epoch time |
|
||||||
| `cameras` | str | , separated list of cameras |
|
| `cameras` | str | , separated list of cameras |
|
||||||
| `labels` | str | , separated list of labels |
|
| `labels` | str | , separated list of labels |
|
||||||
|
| `zones` | str | , separated list of zones |
|
||||||
| `reviewed` | int | Include items that have been reviewed (0 or 1) |
|
| `reviewed` | int | Include items that have been reviewed (0 or 1) |
|
||||||
| `limit` | int | Limit the number of events returned |
|
| `limit` | int | Limit the number of events returned |
|
||||||
| `severity` | str | Limit items to severity (alert, detection, significant_motion) |
|
| `severity` | str | Limit items to severity (alert, detection, significant_motion) |
|
||||||
|
|
||||||
|
### `GET /api/review/<id>`
|
||||||
|
|
||||||
|
Get review with `id` from the database.
|
||||||
|
|
||||||
### `GET /api/review/summary`
|
### `GET /api/review/summary`
|
||||||
|
|
||||||
Summary of reviews for the last 30 days. Accepts the following query string parameters:
|
Summary of reviews for the last 30 days. Accepts the following query string parameters:
|
||||||
@@ -496,21 +533,21 @@ Delete review items.
|
|||||||
|
|
||||||
Get the motion activity for camera(s) during a specified time period.
|
Get the motion activity for camera(s) during a specified time period.
|
||||||
|
|
||||||
| param | Type | Description |
|
| param | Type | Description |
|
||||||
| ---------- | ---- | -------------------------------------------------------------- |
|
| --------- | ---- | --------------------------- |
|
||||||
| `before` | int | Epoch time |
|
| `before` | int | Epoch time |
|
||||||
| `after` | int | Epoch time |
|
| `after` | int | Epoch time |
|
||||||
| `cameras` | str | , separated list of cameras |
|
| `cameras` | str | , separated list of cameras |
|
||||||
|
|
||||||
### `GET /review/activity/audio`
|
### `GET /review/activity/audio`
|
||||||
|
|
||||||
Get the audio activity for camera(s) during a specified time period.
|
Get the audio activity for camera(s) during a specified time period.
|
||||||
|
|
||||||
| param | Type | Description |
|
| param | Type | Description |
|
||||||
| ---------- | ---- | -------------------------------------------------------------- |
|
| --------- | ---- | --------------------------- |
|
||||||
| `before` | int | Epoch time |
|
| `before` | int | Epoch time |
|
||||||
| `after` | int | Epoch time |
|
| `after` | int | Epoch time |
|
||||||
| `cameras` | str | , separated list of cameras |
|
| `cameras` | str | , separated list of cameras |
|
||||||
|
|
||||||
## Timeline
|
## Timeline
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Available via HACS as a default repository. To install:
|
|||||||
- Use [HACS](https://hacs.xyz/) to install the integration:
|
- Use [HACS](https://hacs.xyz/) to install the integration:
|
||||||
|
|
||||||
```
|
```
|
||||||
Home Assistant > HACS > Integrations > "Explore & Add Integrations" > Frigate
|
Home Assistant > HACS > Click in the Search bar and type "Frigate" > Frigate
|
||||||
```
|
```
|
||||||
|
|
||||||
- Restart Home Assistant.
|
- Restart Home Assistant.
|
||||||
@@ -150,7 +150,8 @@ Home Assistant > Configuration > Integrations > Frigate > Options
|
|||||||
|
|
||||||
| Platform | Description |
|
| Platform | Description |
|
||||||
| --------------- | --------------------------------------------------------------------------------- |
|
| --------------- | --------------------------------------------------------------------------------- |
|
||||||
| `camera` | Live camera stream (requires RTSP), camera for image of the last detected object. |
|
| `camera` | Live camera stream (requires RTSP). |
|
||||||
|
| `image` | Image of the latest detected object for each camera. |
|
||||||
| `sensor` | States to monitor Frigate performance, object counts for all zones and cameras. |
|
| `sensor` | States to monitor Frigate performance, object counts for all zones and cameras. |
|
||||||
| `switch` | Switch entities to toggle detection, recordings and snapshots. |
|
| `switch` | Switch entities to toggle detection, recordings and snapshots. |
|
||||||
| `binary_sensor` | A "motion" binary sensor entity per camera/zone/object. |
|
| `binary_sensor` | A "motion" binary sensor entity per camera/zone/object. |
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ These are the MQTT messages generated by Frigate. The default topic_prefix is `f
|
|||||||
|
|
||||||
Designed to be used as an availability topic with Home Assistant. Possible message are:
|
Designed to be used as an availability topic with Home Assistant. Possible message are:
|
||||||
"online": published when Frigate is running (on startup)
|
"online": published when Frigate is running (on startup)
|
||||||
"offline": published right before Frigate stops
|
"offline": published after Frigate has stopped
|
||||||
|
|
||||||
### `frigate/restart`
|
### `frigate/restart`
|
||||||
|
|
||||||
@@ -92,6 +92,62 @@ Message published for each changed event. The first message is published when th
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `frigate/reviews`
|
||||||
|
|
||||||
|
Message published for each changed review item. The first message is published when the `detection` or `alert` is initiated. When additional objects are detected or when a zone change occurs, it will publish a, `update` message with the same id. When the review activity has ended a final `end` message is published.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"type": "update", // new, update, end
|
||||||
|
"before": {
|
||||||
|
"id": "1718987129.308396-fqk5ka", // review_id
|
||||||
|
"camera": "front_cam",
|
||||||
|
"start_time": 1718987129.308396,
|
||||||
|
"end_time": null,
|
||||||
|
"severity": "detection",
|
||||||
|
"thumb_path": "/media/frigate/clips/review/thumb-front_cam-1718987129.308396-fqk5ka.webp",
|
||||||
|
"data": {
|
||||||
|
"detections": [ // list of event IDs
|
||||||
|
"1718987128.947436-g92ztx",
|
||||||
|
"1718987148.879516-d7oq7r",
|
||||||
|
"1718987126.934663-q5ywpt"
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
"person",
|
||||||
|
"car"
|
||||||
|
],
|
||||||
|
"sub_labels": [],
|
||||||
|
"zones": [],
|
||||||
|
"audio": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"after": {
|
||||||
|
"id": "1718987129.308396-fqk5ka",
|
||||||
|
"camera": "front_cam",
|
||||||
|
"start_time": 1718987129.308396,
|
||||||
|
"end_time": null,
|
||||||
|
"severity": "alert",
|
||||||
|
"thumb_path": "/media/frigate/clips/review/thumb-front_cam-1718987129.308396-fqk5ka.webp",
|
||||||
|
"data": {
|
||||||
|
"detections": [
|
||||||
|
"1718987128.947436-g92ztx",
|
||||||
|
"1718987148.879516-d7oq7r",
|
||||||
|
"1718987126.934663-q5ywpt"
|
||||||
|
],
|
||||||
|
"objects": [
|
||||||
|
"person",
|
||||||
|
"car"
|
||||||
|
],
|
||||||
|
"sub_labels": ["Bob"],
|
||||||
|
"zones": [
|
||||||
|
"front_yard"
|
||||||
|
],
|
||||||
|
"audio": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### `frigate/stats`
|
### `frigate/stats`
|
||||||
|
|
||||||
Same data available at `/api/stats` published at a configurable interval.
|
Same data available at `/api/stats` published at a configurable interval.
|
||||||
|
|||||||
@@ -19,17 +19,17 @@ Once logged in, you can generate an API key for Frigate in Settings.
|
|||||||
|
|
||||||
### Set your API key
|
### Set your API key
|
||||||
|
|
||||||
In Frigate, you can use an environment variable or a docker secret named `PLUS_API_KEY` to enable the `SEND TO FRIGATE+` buttons on the events page. Home Assistant Addon users can set it under Settings > Addons > Frigate NVR > Configuration > Options (be sure to toggle the "Show unused optional configuration options" switch).
|
In Frigate, you can use an environment variable or a docker secret named `PLUS_API_KEY` to enable the Frigate+ page. Home Assistant Addon users can set it under Settings > Addons > Frigate NVR > Configuration > Options (be sure to toggle the "Show unused optional configuration options" switch).
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
You cannot use the `environment_vars` section of your configuration file to set this environment variable.
|
You cannot use the `environment_vars` section of your Frigate configuration file to set this environment variable. It must be defined as an environment variable in the docker config or HA addon config.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Submit examples
|
## Submit examples
|
||||||
|
|
||||||
Once your API key is configured, you can submit examples directly from the events page in Frigate using the `SEND TO FRIGATE+` button.
|
Once your API key is configured, you can submit examples directly from the Frigate+ page.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
@@ -49,20 +49,26 @@ You can view all of your submitted images at [https://plus.frigate.video](https:
|
|||||||
|
|
||||||
## Use Models
|
## Use Models
|
||||||
|
|
||||||
Models available in Frigate+ can be used with a special model path. No other information needs to be configured for Frigate+ models because it fetches the remaining config from Frigate+ automatically.
|
Once you have [requested your first model](../plus/first_model.md) and gotten your own model ID, it can be used with a special model path. No other information needs to be configured for Frigate+ models because it fetches the remaining config from Frigate+ automatically.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
model:
|
model:
|
||||||
path: plus://e63b7345cc83a84ed79dedfc99c16616
|
path: plus://<your_model_id>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
Model IDs are not secret values and can be shared freely. Access to your model is protected by your API key.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
Models are downloaded into the `/config/model_cache` folder and only downloaded if needed.
|
Models are downloaded into the `/config/model_cache` folder and only downloaded if needed.
|
||||||
|
|
||||||
If needed, you can override the labelmap for Frigate+ models. This is not recommended as renaming labels will break the Submit to Frigate+ feature if the labels are not available in Frigate+.
|
If needed, you can override the labelmap for Frigate+ models. This is not recommended as renaming labels will break the Submit to Frigate+ feature if the labels are not available in Frigate+.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
model:
|
model:
|
||||||
path: plus://e63b7345cc83a84ed79dedfc99c16616
|
path: plus://<your_model_id>
|
||||||
labelmap:
|
labelmap:
|
||||||
3: animal
|
3: animal
|
||||||
4: animal
|
4: animal
|
||||||
|
|||||||
@@ -18,3 +18,7 @@ Please use your own knowledge to assess and vet them before you install anything
|
|||||||
[Double Take](https://github.com/skrashevich/double-take) provides an unified UI and API for processing and training images for facial recognition.
|
[Double Take](https://github.com/skrashevich/double-take) provides an unified UI and API for processing and training images for facial recognition.
|
||||||
It supports automatically setting the sub labels in Frigate for person objects that are detected and recognized.
|
It supports automatically setting the sub labels in Frigate for person objects that are detected and recognized.
|
||||||
This is a fork (with fixed errors and new features) of [original Double Take](https://github.com/jakowenko/double-take) project which, unfortunately, isn't being maintained by author.
|
This is a fork (with fixed errors and new features) of [original Double Take](https://github.com/jakowenko/double-take) project which, unfortunately, isn't being maintained by author.
|
||||||
|
|
||||||
|
## [Frigate telegram](https://github.com/OldTyT/frigate-telegram)
|
||||||
|
|
||||||
|
[Frigate telegram](https://github.com/OldTyT/frigate-telegram) makes it possible to send events from Frigate to Telegram. Events are sent as a message with a text description, video, and thumbnail.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ title: Requesting your first model
|
|||||||
|
|
||||||
## Step 1: Upload and annotate your images
|
## Step 1: Upload and annotate your images
|
||||||
|
|
||||||
Before requesting your first model, you will need to upload at least 10 images to Frigate+. But for the best results, you should provide at least 100 verified images per camera. Keep in mind that varying conditions should be included. You will want images from cloudy days, sunny days, dawn, dusk, and night. Refer to the [integration docs](../integrations/plus.md#generate-an-api-key) for instructions on how to easily submit images to Frigate+ directly from Frigate.
|
Before requesting your first model, you will need to upload and verify at least 10 images to Frigate+. The more images you upload, annotate, and verify the better your results will be. Most users start to see very good results once they have at least 100 verified images per camera. Keep in mind that varying conditions should be included. You will want images from cloudy days, sunny days, dawn, dusk, and night. Refer to the [integration docs](../integrations/plus.md#generate-an-api-key) for instructions on how to easily submit images to Frigate+ directly from Frigate.
|
||||||
|
|
||||||
It is recommended to submit **both** true positives and false positives. This will help the model differentiate between what is and isn't correct. You should aim for a target of 80% true positive submissions and 20% false positives across all of your images. If you are experiencing false positives in a specific area, submitting true positives for any object type near that area in similar lighting conditions will help teach the model what that area looks like when no objects are present.
|
It is recommended to submit **both** true positives and false positives. This will help the model differentiate between what is and isn't correct. You should aim for a target of 80% true positive submissions and 20% false positives across all of your images. If you are experiencing false positives in a specific area, submitting true positives for any object type near that area in similar lighting conditions will help teach the model what that area looks like when no objects are present.
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ For more detailed recommendations, you can refer to the docs on [improving your
|
|||||||
|
|
||||||
## Step 2: Submit a model request
|
## Step 2: Submit a model request
|
||||||
|
|
||||||
Once you have an initial set of verified images, you can request a model on the Models page. Each model request requires 1 of the 12 trainings that you receive with your annual subscription. This model will support all [label types available](./index.md#available-label-types) even if you do not submit any examples for those labels. Model creation can take up to 36 hours.
|
Once you have an initial set of verified images, you can request a model on the Models page. For guidance on choosing a model type, refer to [this part of the documentation](./index.md#available-model-types). Each model request requires 1 of the 12 trainings that you receive with your annual subscription. This model will support all [label types available](./index.md#available-label-types) even if you do not submit any examples for those labels. Model creation can take up to 36 hours.
|
||||||

|

|
||||||
|
|
||||||
## Step 3: Set your model id in the config
|
## Step 3: Set your model id in the config
|
||||||
@@ -28,6 +28,12 @@ model:
|
|||||||
path: plus://<your_model_id>
|
path: plus://<your_model_id>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
Model IDs are not secret values and can be shared freely. Access to your model is protected by your API key.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
## Step 4: Adjust your object filters for higher scores
|
## Step 4: Adjust your object filters for higher scores
|
||||||
|
|
||||||
Frigate+ models generally have much higher scores than the default model provided in Frigate. You will likely need to increase your `threshold` and `min_score` values. Here is an example of how these values can be refined, but you should expect these to evolve as your model improves. For more information about how `threshold` and `min_score` are related, see the docs on [object filters](../configuration/object_filters.md#object-scores).
|
Frigate+ models generally have much higher scores than the default model provided in Frigate. You will likely need to increase your `threshold` and `min_score` values. Here is an example of how these values can be refined, but you should expect these to evolve as your model improves. For more information about how `threshold` and `min_score` are related, see the docs on [object filters](../configuration/object_filters.md#object-scores).
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ id: improving_model
|
|||||||
title: Improving your model
|
title: Improving your model
|
||||||
---
|
---
|
||||||
|
|
||||||
You may find that Frigate+ models result in more false positives initially, but by submitting true and false positives, the model will improve. Because a limited number of users submitted images to Frigate+ prior to this launch, you may need to submit several hundred images per camera to see good results. With all the new images now being submitted, future base models will improve as more and more users (including you) submit examples to Frigate+. Note that only verified images will be used when training your model. Submitting an image from Frigate as a true or false positive will not verify the image. You still must verify the image in Frigate+ in order for it to be used in training.
|
You may find that Frigate+ models result in more false positives initially, but by submitting true and false positives, the model will improve. With all the new images now being submitted by subscribers, future base models will improve as more and more examples are incorporated. Note that only images with at least one verified label will be used when training your model. Submitting an image from Frigate as a true or false positive will not verify the image. You still must verify the image in Frigate+ in order for it to be used in training.
|
||||||
|
|
||||||
- **Submit both true positives and false positives**. This will help the model differentiate between what is and isn't correct. You should aim for a target of 80% true positive submissions and 20% false positives across all of your images. If you are experiencing false positives in a specific area, submitting true positives for any object type near that area in similar lighting conditions will help teach the model what that area looks like when no objects are present.
|
- **Submit both true positives and false positives**. This will help the model differentiate between what is and isn't correct. You should aim for a target of 80% true positive submissions and 20% false positives across all of your images. If you are experiencing false positives in a specific area, submitting true positives for any object type near that area in similar lighting conditions will help teach the model what that area looks like when no objects are present.
|
||||||
- **Lower your thresholds a little in order to generate more false/true positives near the threshold value**. For example, if you have some false positives that are scoring at 68% and some true positives scoring at 72%, you can try lowering your threshold to 65% and submitting both true and false positives within that range. This will help the model learn and widen the gap between true and false positive scores.
|
- **Lower your thresholds a little in order to generate more false/true positives near the threshold value**. For example, if you have some false positives that are scoring at 68% and some true positives scoring at 72%, you can try lowering your threshold to 65% and submitting both true and false positives within that range. This will help the model learn and widen the gap between true and false positive scores.
|
||||||
@@ -13,7 +13,7 @@ You may find that Frigate+ models result in more false positives initially, but
|
|||||||
|
|
||||||
For the best results, follow the following guidelines.
|
For the best results, follow the following guidelines.
|
||||||
|
|
||||||
**Label every object in the image**: It is important that you label all objects in each image before verifying. If you don't label a car for example, the model will be taught that part of the image is _not_ a car and it will start to get confused.
|
**Label every object in the image**: It is important that you label all objects in each image before verifying. If you don't label a car for example, the model will be taught that part of the image is _not_ a car and it will start to get confused. You can exclude labels that you don't want detected on any of your cameras.
|
||||||
|
|
||||||
**Make tight bounding boxes**: Tighter bounding boxes improve the recognition and ensure that accurate bounding boxes are predicted at runtime.
|
**Make tight bounding boxes**: Tighter bounding boxes improve the recognition and ensure that accurate bounding boxes are predicted at runtime.
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ For the best results, follow the following guidelines.
|
|||||||
|
|
||||||
**Label objects hard to identify as difficult**: When objects are truly difficult to make out, such as a car barely visible through a bush, or a dog that is hard to distinguish from the background at night, flag it as 'difficult'. This is not used in the model training as of now, but will in the future.
|
**Label objects hard to identify as difficult**: When objects are truly difficult to make out, such as a car barely visible through a bush, or a dog that is hard to distinguish from the background at night, flag it as 'difficult'. This is not used in the model training as of now, but will in the future.
|
||||||
|
|
||||||
**`amazon`, `ups`, and `fedex` should label the logo**: For a Fedex truck, label the truck as a `car` and make a different bounding box just for the Fedex logo. If there are multiple logos, label each of them.
|
**Delivery logos such as `amazon`, `ups`, and `fedex` should label the logo**: For a Fedex truck, label the truck as a `car` and make a different bounding box just for the Fedex logo. If there are multiple logos, label each of them.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -36,18 +36,17 @@ Misidentified objects should have a correct label added. For example, if a perso
|
|||||||
|
|
||||||
## Shortcuts for a faster workflow
|
## Shortcuts for a faster workflow
|
||||||
|
|
||||||
|Shortcut Key|Description|
|
| Shortcut Key | Description |
|
||||||
|-----|--------|
|
| ----------------- | ----------------------------- |
|
||||||
|`?`|Show all keyboard shortcuts|
|
| `?` | Show all keyboard shortcuts |
|
||||||
|`w`|Add box|
|
| `w` | Add box |
|
||||||
|`d`|Toggle difficult|
|
| `d` | Toggle difficult |
|
||||||
|`s`|Switch to the next label|
|
| `s` | Switch to the next label |
|
||||||
|`tab`|Select next largest box|
|
| `tab` | Select next largest box |
|
||||||
|`del`|Delete current box|
|
| `del` | Delete current box |
|
||||||
|`esc`|Deselect/Cancel|
|
| `esc` | Deselect/Cancel |
|
||||||
|`← ↑ → ↓`|Move box|
|
| `← ↑ → ↓` | Move box |
|
||||||
|`Shift + ← ↑ → ↓`|Resize box|
|
| `Shift + ← ↑ → ↓` | Resize box |
|
||||||
|`-`|Zoom out|
|
| `scrollwheel` | Zoom in/out |
|
||||||
|`=`|Zoom in|
|
| `f` | Hide/show all but current box |
|
||||||
|`f`|Hide/show all but current box|
|
| `spacebar` | Verify and save |
|
||||||
|`spacebar`|Verify and save|
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ id: index
|
|||||||
title: Models
|
title: Models
|
||||||
---
|
---
|
||||||
|
|
||||||
<a href="https://plus.frigate.video" target="_blank" rel="nofollow">Frigate+</a> offers models trained on images submitted by Frigate+ users from their security cameras and is specifically designed for the way Frigate NVR analyzes video footage. These models offer higher accuracy with less resources. The images you upload are used to fine tune a baseline model trained from images uploaded by all Frigate+ users. This fine tuning process results in a model that is optimized for accuracy in your specific conditions.
|
<a href="https://frigate.video/plus" target="_blank" rel="nofollow">Frigate+</a> offers models trained on images submitted by Frigate+ users from their security cameras and is specifically designed for the way Frigate NVR analyzes video footage. These models offer higher accuracy with less resources. The images you upload are used to fine tune a baseline model trained from images uploaded by all Frigate+ users. This fine tuning process results in a model that is optimized for accuracy in your specific conditions.
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
|
|
||||||
@@ -15,25 +15,52 @@ With a subscription, 12 model trainings per year are included. If you cancel you
|
|||||||
|
|
||||||
Information on how to integrate Frigate+ with Frigate can be found in the [integration docs](../integrations/plus.md).
|
Information on how to integrate Frigate+ with Frigate can be found in the [integration docs](../integrations/plus.md).
|
||||||
|
|
||||||
|
## Available model types
|
||||||
|
|
||||||
|
There are two model types offered in Frigate+, `mobiledet` and `yolonas`. Both of these models are object detection models and are trained to detect the same set of labels [listed below](#available-label-types).
|
||||||
|
|
||||||
|
Not all model types are supported by all detectors, so it's important to choose a model type to match your detector as shown in the table under [supported detector types](#supported-detector-types).
|
||||||
|
|
||||||
|
| Model Type | Description |
|
||||||
|
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| `mobiledet` | Based on the same architecture as the default model included with Frigate. Runs on Google Coral devices and CPUs. |
|
||||||
|
| `yolonas` | A newer architecture that offers slightly higher accuracy and improved detection of small objects. Runs on Intel, NVidia GPUs, and AMD GPUs. |
|
||||||
|
|
||||||
## Supported detector types
|
## Supported detector types
|
||||||
|
|
||||||
|
Currently, Frigate+ models support CPU (`cpu`), Google Coral (`edgetpu`), OpenVino (`openvino`), ONNX (`onnx`), and ROCm (`rocm`) detectors.
|
||||||
|
|
||||||
:::warning
|
:::warning
|
||||||
|
|
||||||
Frigate+ models are not supported for TensorRT or OpenVino yet.
|
Using Frigate+ models with `onnx` and `rocm` is only available with Frigate 0.15, which is still under development.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Currently, Frigate+ models only support CPU (`cpu`) and Coral (`edgetpu`) models. OpenVino is next in line to gain support.
|
| Hardware | Recommended Detector Type | Recommended Model Type |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------- | ---------------------- |
|
||||||
|
| [CPU](/configuration/object_detectors.md#cpu-detector-not-recommended) | `cpu` | `mobiledet` |
|
||||||
|
| [Coral (all form factors)](/configuration/object_detectors.md#edge-tpu-detector) | `edgetpu` | `mobiledet` |
|
||||||
|
| [Intel](/configuration/object_detectors.md#openvino-detector) | `openvino` | `yolonas` |
|
||||||
|
| [NVidia GPU](https://deploy-preview-13787--frigate-docs.netlify.app/configuration/object_detectors#onnx)\* | `onnx` | `yolonas` |
|
||||||
|
| [AMD ROCm GPU](https://deploy-preview-13787--frigate-docs.netlify.app/configuration/object_detectors#amdrocm-gpu-detector)\* | `rocm` | `yolonas` |
|
||||||
|
|
||||||
The models are created using the same MobileDet architecture as the default model. Additional architectures will be added in future releases as needed.
|
_\* Requires Frigate 0.15_
|
||||||
|
|
||||||
## Available label types
|
## Available label types
|
||||||
|
|
||||||
Frigate+ models support a more relevant set of objects for security cameras. Currently, only the following objects are supported: `person`, `face`, `car`, `license_plate`, `amazon`, `ups`, `fedex`, `package`, `dog`, `cat`, `deer`. Other object types available in the default Frigate model are not available. Additional object types will be added in future releases.
|
Frigate+ models support a more relevant set of objects for security cameras. Currently, the following objects are supported:
|
||||||
|
|
||||||
|
- **People**: `person`, `face`
|
||||||
|
- **Vehicles**: `car`, `motorcycle`, `bicycle`, `boat`, `license_plate`
|
||||||
|
- **Delivery Logos**: `amazon`, `usps`, `ups`, `fedex`, `dhl`, `an_post`, `purolator`, `postnl`, `nzpost`, `postnord`, `gls`, `dpd`
|
||||||
|
- **Animals**: `dog`, `cat`, `deer`, `horse`, `bird`, `raccoon`, `fox`, `bear`, `cow`, `squirrel`, `goat`, `rabbit`
|
||||||
|
- **Other**: `package`, `waste_bin`, `bbq_grill`, `robot_lawnmower`, `umbrella`
|
||||||
|
|
||||||
|
Other object types available in the default Frigate model are not available. Additional object types will be added in future releases.
|
||||||
|
|
||||||
### Label attributes
|
### Label attributes
|
||||||
|
|
||||||
Frigate has special handling for some labels when using Frigate+ models. `face`, `license_plate`, `amazon`, `ups`, and `fedex` are considered attribute labels which are not tracked like regular objects and do not generate events. In addition, the `threshold` filter will have no effect on these labels. You should adjust the `min_score` and other filter values as needed.
|
Frigate has special handling for some labels when using Frigate+ models. `face`, `license_plate`, and delivery logos such as `amazon`, `ups`, and `fedex` are considered attribute labels which are not tracked like regular objects and do not generate events. In addition, the `threshold` filter will have no effect on these labels. You should adjust the `min_score` and other filter values as needed.
|
||||||
|
|
||||||
In order to have Frigate start using these attribute labels, you will need to add them to the list of objects to track:
|
In order to have Frigate start using these attribute labels, you will need to add them to the list of objects to track:
|
||||||
|
|
||||||
@@ -56,6 +83,6 @@ When using Frigate+ models, Frigate will choose the snapshot of a person object
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
`amazon`, `ups`, and `fedex` labels are used to automatically assign a sub label to car objects.
|
Delivery logos such as `amazon`, `ups`, and `fedex` labels are used to automatically assign a sub label to car objects.
|
||||||
|
|
||||||

|

|
||||||
|
|||||||
@@ -28,6 +28,18 @@ The USB coral has different IDs when it is uninitialized and initialized.
|
|||||||
- When running Frigate in a VM, Proxmox lxc, etc. you must ensure both device IDs are mapped.
|
- When running Frigate in a VM, Proxmox lxc, etc. you must ensure both device IDs are mapped.
|
||||||
- When running HA OS you may need to run the Full Access version of the Frigate addon with the `Protected Mode` switch disabled so that the coral can be accessed.
|
- When running HA OS you may need to run the Full Access version of the Frigate addon with the `Protected Mode` switch disabled so that the coral can be accessed.
|
||||||
|
|
||||||
|
### Synology 716+II running DSM 7.2.1-69057 Update 5
|
||||||
|
|
||||||
|
Some users have reported that this older device runs an older kernel causing issues with the coral not being detected. The following steps allowed it to be detected correctly:
|
||||||
|
|
||||||
|
1. Plug in the coral TPU in any of the USB ports on the NAS
|
||||||
|
2. Open the control panel - info screen. The coral TPU would be shown as a generic device.
|
||||||
|
3. Start the docker container with Coral TPU enabled in the config
|
||||||
|
4. The TPU would be detected but a few moments later it would disconnect.
|
||||||
|
5. While leaving the TPU device plugged in, restart the NAS using the reboot command in the UI. Do NOT unplug the NAS/power it off etc.
|
||||||
|
6. Open the control panel - info scree. The coral TPU will now be recognised as a USB Device - google inc
|
||||||
|
7. Start the frigate container. Everything should work now!
|
||||||
|
|
||||||
## USB Coral Detection Appears to be Stuck
|
## USB Coral Detection Appears to be Stuck
|
||||||
|
|
||||||
The USB Coral can become stuck and need to be restarted, this can happen for a number of reasons depending on hardware and software setup. Some common reasons are:
|
The USB Coral can become stuck and need to be restarted, this can happen for a number of reasons depending on hardware and software setup. Some common reasons are:
|
||||||
@@ -37,7 +49,21 @@ The USB Coral can become stuck and need to be restarted, this can happen for a n
|
|||||||
|
|
||||||
## PCIe Coral Not Detected
|
## PCIe Coral Not Detected
|
||||||
|
|
||||||
The most common reason for the PCIe coral not being detected is that the driver has not been installed. See [the coral docs(https://coral.ai/docs/m2/get-started/#2-install-the-pcie-driver-and-edge-tpu-runtime) for how to install the driver for the PCIe based coral.
|
The most common reason for the PCIe Coral not being detected is that the driver has not been installed. This process varies based on what OS and kernel that is being run.
|
||||||
|
|
||||||
|
- In most cases [the Coral docs](https://coral.ai/docs/m2/get-started/#2-install-the-pcie-driver-and-edge-tpu-runtime) show how to install the driver for the PCIe based Coral.
|
||||||
|
- For Ubuntu 22.04+ https://github.com/jnicolson/gasket-builder can be used to build and install the latest version of the driver.
|
||||||
|
|
||||||
|
### Not detected on Raspberry Pi5
|
||||||
|
|
||||||
|
A kernel update to the RPi5 means an upate to config.txt is required, see [the raspberry pi forum for more info](https://forums.raspberrypi.com/viewtopic.php?t=363682&sid=cb59b026a412f0dc041595951273a9ca&start=25)
|
||||||
|
|
||||||
|
Specifically, add the following to config.txt
|
||||||
|
|
||||||
|
```
|
||||||
|
dtoverlay=pciex1-compat-pi5,no-mip
|
||||||
|
dtoverlay=pcie-32bit-dma-pi5
|
||||||
|
```
|
||||||
|
|
||||||
## Only One PCIe Coral Is Detected With Coral Dual EdgeTPU
|
## Only One PCIe Coral Is Detected With Coral Dual EdgeTPU
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ You can open `chrome://media-internals/` in another tab and then try to playback
|
|||||||
Frigate generally [recommends cameras with configurable sub streams](/frigate/hardware.md). However, if your camera does not have a sub stream that a suitable resolution, the main stream can be resized.
|
Frigate generally [recommends cameras with configurable sub streams](/frigate/hardware.md). However, if your camera does not have a sub stream that a suitable resolution, the main stream can be resized.
|
||||||
|
|
||||||
To do this efficiently the following setup is required:
|
To do this efficiently the following setup is required:
|
||||||
|
|
||||||
1. A GPU or iGPU must be available to do the scaling.
|
1. A GPU or iGPU must be available to do the scaling.
|
||||||
2. [ffmpeg presets for hwaccel](/configuration/hardware_acceleration.md) must be used
|
2. [ffmpeg presets for hwaccel](/configuration/hardware_acceleration.md) must be used
|
||||||
3. Set the desired detection resolution for `detect -> width` and `detect -> height`.
|
3. Set the desired detection resolution for `detect -> width` and `detect -> height`.
|
||||||
@@ -56,4 +57,44 @@ SQLite does not work well on a network share, if the `/media` folder is mapped t
|
|||||||
|
|
||||||
If MQTT isn't working in docker try using the IP of the device hosting the MQTT server instead of `localhost`, `127.0.0.1`, or `mosquitto.ix-mosquitto.svc.cluster.local`.
|
If MQTT isn't working in docker try using the IP of the device hosting the MQTT server instead of `localhost`, `127.0.0.1`, or `mosquitto.ix-mosquitto.svc.cluster.local`.
|
||||||
|
|
||||||
This is because, by default, Frigate does not run in host mode so localhost points to the Frigate container and not the host device's network.
|
This is because Frigate does not run in host mode so localhost points to the Frigate container and not the host device's network.
|
||||||
|
|
||||||
|
### How do I know if my camera is offline
|
||||||
|
|
||||||
|
A camera being offline can be detected via MQTT or /api/stats, the camera_fps for any offline camera will be 0.
|
||||||
|
|
||||||
|
Also, Home Assistant will mark any offline camera as being unavailable when the camera is offline.
|
||||||
|
|
||||||
|
### How can I view the Frigate log files without using the Web UI?
|
||||||
|
|
||||||
|
Frigate manages logs internally as well as outputs directly to Docker via standard output. To view these logs using the CLI, follow these steps:
|
||||||
|
|
||||||
|
- Open a terminal or command prompt on the host running your Frigate container.
|
||||||
|
- Type the following command and press Enter:
|
||||||
|
```
|
||||||
|
docker logs -f frigate
|
||||||
|
```
|
||||||
|
This command tells Docker to show you the logs from the Frigate container.
|
||||||
|
Note: If you've given your Frigate container a different name, replace "frigate" in the command with your container's actual name. The "-f" option means the logs will continue to update in real-time as new entries are added. To stop viewing the logs, press `Ctrl+C`. If you'd like to learn more about using Docker logs, including additional options and features, you can explore Docker's [official documentation](https://docs.docker.com/engine/reference/commandline/logs/).
|
||||||
|
|
||||||
|
Alternatively, when you create the Frigate Docker container, you can bind a directory on the host to the mountpoint `/dev/shm/logs` to not only be able to persist the logs to disk, but also to be able to query them directly from the host using your favorite log parsing/query utility.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -d \
|
||||||
|
--name frigate \
|
||||||
|
--restart=unless-stopped \
|
||||||
|
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
|
||||||
|
--device /dev/bus/usb:/dev/bus/usb \
|
||||||
|
--device /dev/dri/renderD128 \
|
||||||
|
--shm-size=64m \
|
||||||
|
-v /path/to/your/storage:/media/frigate \
|
||||||
|
-v /path/to/your/config:/config \
|
||||||
|
-v /etc/localtime:/etc/localtime:ro \
|
||||||
|
-v /path/to/local/log/dir:/dev/shm/logs \
|
||||||
|
-e FRIGATE_RTSP_PASSWORD='password' \
|
||||||
|
-p 5000:5000 \
|
||||||
|
-p 8554:8554 \
|
||||||
|
-p 8555:8555/tcp \
|
||||||
|
-p 8555:8555/udp \
|
||||||
|
ghcr.io/blakeblackshear/frigate:stable
|
||||||
|
```
|
||||||
|
|||||||
665
docs/package-lock.json
generated
665
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -14,9 +14,9 @@
|
|||||||
"write-heading-ids": "docusaurus write-heading-ids"
|
"write-heading-ids": "docusaurus write-heading-ids"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "^3.3.2",
|
"@docusaurus/core": "^3.4.0",
|
||||||
"@docusaurus/preset-classic": "^3.3.2",
|
"@docusaurus/preset-classic": "^3.4.0",
|
||||||
"@docusaurus/theme-mermaid": "^3.3.2",
|
"@docusaurus/theme-mermaid": "^3.4.0",
|
||||||
"@mdx-js/react": "^3.0.0",
|
"@mdx-js/react": "^3.0.0",
|
||||||
"clsx": "^2.0.0",
|
"clsx": "^2.0.0",
|
||||||
"prism-react-renderer": "^2.1.0",
|
"prism-react-renderer": "^2.1.0",
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "^3.3.2",
|
"@docusaurus/module-type-aliases": "^3.4.0",
|
||||||
"@docusaurus/types": "^3.3.2",
|
"@docusaurus/types": "^3.4.0",
|
||||||
"@types/react": "^18.2.79"
|
"@types/react": "^18.2.79"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
type: "link",
|
type: "link",
|
||||||
label: "Go2RTC Configuration Reference",
|
label: "Go2RTC Configuration Reference",
|
||||||
href: "https://github.com/AlexxIT/go2rtc/tree/v1.9.2#configuration",
|
href: "https://github.com/AlexxIT/go2rtc/tree/v1.9.4#configuration",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
Detectors: [
|
Detectors: [
|
||||||
@@ -52,6 +52,8 @@ module.exports = {
|
|||||||
"configuration/authentication",
|
"configuration/authentication",
|
||||||
"configuration/hardware_acceleration",
|
"configuration/hardware_acceleration",
|
||||||
"configuration/ffmpeg_presets",
|
"configuration/ffmpeg_presets",
|
||||||
|
"configuration/pwa",
|
||||||
|
"configuration/tls",
|
||||||
"configuration/advanced",
|
"configuration/advanced",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
BIN
docs/static/img/plus/send-to-plus.jpg
vendored
BIN
docs/static/img/plus/send-to-plus.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 62 KiB |
BIN
docs/static/img/plus/submit-to-plus.jpg
vendored
BIN
docs/static/img/plus/submit-to-plus.jpg
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 49 KiB |
@@ -21,7 +21,7 @@ from frigate.api.export import ExportBp
|
|||||||
from frigate.api.media import MediaBp
|
from frigate.api.media import MediaBp
|
||||||
from frigate.api.preview import PreviewBp
|
from frigate.api.preview import PreviewBp
|
||||||
from frigate.api.review import ReviewBp
|
from frigate.api.review import ReviewBp
|
||||||
from frigate.config import AuthModeEnum, FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.const import CONFIG_DIR
|
from frigate.const import CONFIG_DIR
|
||||||
from frigate.events.external import ExternalEventProcessor
|
from frigate.events.external import ExternalEventProcessor
|
||||||
from frigate.models import Event, Timeline
|
from frigate.models import Event, Timeline
|
||||||
@@ -86,9 +86,7 @@ def create_app(
|
|||||||
app.plus_api = plus_api
|
app.plus_api = plus_api
|
||||||
app.camera_error_image = None
|
app.camera_error_image = None
|
||||||
app.stats_emitter = stats_emitter
|
app.stats_emitter = stats_emitter
|
||||||
app.jwt_token = (
|
app.jwt_token = get_jwt_secret() if frigate_config.auth.enabled else None
|
||||||
get_jwt_secret() if frigate_config.auth.mode == AuthModeEnum.native else None
|
|
||||||
)
|
|
||||||
# update the request_address with the x-forwarded-for header from nginx
|
# update the request_address with the x-forwarded-for header from nginx
|
||||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1)
|
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1)
|
||||||
# initialize the rate limiter for the login endpoint
|
# initialize the rate limiter for the login endpoint
|
||||||
@@ -176,6 +174,9 @@ def config():
|
|||||||
# remove the mqtt password
|
# remove the mqtt password
|
||||||
config["mqtt"].pop("password", None)
|
config["mqtt"].pop("password", None)
|
||||||
|
|
||||||
|
# remove the proxy secret
|
||||||
|
config["proxy"].pop("auth_secret", None)
|
||||||
|
|
||||||
for camera_name, camera in current_app.frigate_config.cameras.items():
|
for camera_name, camera in current_app.frigate_config.cameras.items():
|
||||||
camera_dict = config["cameras"][camera_name]
|
camera_dict = config["cameras"][camera_name]
|
||||||
|
|
||||||
@@ -483,6 +484,10 @@ def logs(service: str):
|
|||||||
if len(cleanLine) < 10:
|
if len(cleanLine) < 10:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# handle cases where S6 does not include date in log line
|
||||||
|
if " " not in cleanLine:
|
||||||
|
cleanLine = f"{datetime.now()} {cleanLine}"
|
||||||
|
|
||||||
if dateEnd == 0:
|
if dateEnd == 0:
|
||||||
dateEnd = cleanLine.index(" ")
|
dateEnd = cleanLine.index(" ")
|
||||||
keyLength = dateEnd - (6 if service_location == "frigate" else 0)
|
keyLength = dateEnd - (6 if service_location == "frigate" else 0)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ from flask_limiter import Limiter
|
|||||||
from joserfc import jwt
|
from joserfc import jwt
|
||||||
from peewee import DoesNotExist
|
from peewee import DoesNotExist
|
||||||
|
|
||||||
from frigate.config import AuthConfig, AuthModeEnum
|
from frigate.config import AuthConfig, ProxyConfig
|
||||||
from frigate.const import CONFIG_DIR, JWT_SECRET_ENV_VAR, PASSWORD_HASH_ALGORITHM
|
from frigate.const import CONFIG_DIR, JWT_SECRET_ENV_VAR, PASSWORD_HASH_ALGORITHM
|
||||||
from frigate.models import User
|
from frigate.models import User
|
||||||
|
|
||||||
@@ -87,13 +87,11 @@ def get_jwt_secret() -> str:
|
|||||||
)
|
)
|
||||||
jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR)
|
jwt_secret = os.environ.get(JWT_SECRET_ENV_VAR)
|
||||||
# check docker secrets
|
# check docker secrets
|
||||||
elif (
|
elif os.path.isfile(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)):
|
||||||
os.path.isdir("/run/secrets")
|
|
||||||
and os.access("/run/secrets", os.R_OK)
|
|
||||||
and JWT_SECRET_ENV_VAR in os.listdir("/run/secrets")
|
|
||||||
):
|
|
||||||
logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.")
|
logger.debug(f"Using jwt secret from {JWT_SECRET_ENV_VAR} docker secret file.")
|
||||||
jwt_secret = Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text()
|
jwt_secret = (
|
||||||
|
Path(os.path.join("/run/secrets", JWT_SECRET_ENV_VAR)).read_text().strip()
|
||||||
|
)
|
||||||
# check for the addon options file
|
# check for the addon options file
|
||||||
elif os.path.isfile("/data/options.json"):
|
elif os.path.isfile("/data/options.json"):
|
||||||
with open("/data/options.json") as f:
|
with open("/data/options.json") as f:
|
||||||
@@ -170,6 +168,9 @@ def set_jwt_cookie(response, cookie_name, encoded_jwt, expiration, secure):
|
|||||||
# Endpoint for use with nginx auth_request
|
# Endpoint for use with nginx auth_request
|
||||||
@AuthBp.route("/auth")
|
@AuthBp.route("/auth")
|
||||||
def auth():
|
def auth():
|
||||||
|
auth_config: AuthConfig = current_app.frigate_config.auth
|
||||||
|
proxy_config: ProxyConfig = current_app.frigate_config.proxy
|
||||||
|
|
||||||
success_response = make_response({}, 202)
|
success_response = make_response({}, 202)
|
||||||
|
|
||||||
# dont require auth if the request is on the internal port
|
# dont require auth if the request is on the internal port
|
||||||
@@ -177,13 +178,24 @@ def auth():
|
|||||||
if request.headers.get("x-server-port", 0, type=int) == 5000:
|
if request.headers.get("x-server-port", 0, type=int) == 5000:
|
||||||
return success_response
|
return success_response
|
||||||
|
|
||||||
# if proxy auth mode
|
fail_response = make_response({}, 401)
|
||||||
if current_app.frigate_config.auth.mode == AuthModeEnum.proxy:
|
|
||||||
|
# ensure the proxy secret matches if configured
|
||||||
|
if (
|
||||||
|
proxy_config.auth_secret is not None
|
||||||
|
and request.headers.get("x-proxy-secret", "", type=str)
|
||||||
|
!= proxy_config.auth_secret
|
||||||
|
):
|
||||||
|
logger.debug("X-Proxy-Secret header does not match configured secret value")
|
||||||
|
return fail_response
|
||||||
|
|
||||||
|
# if auth is disabled, just apply the proxy header map and return success
|
||||||
|
if not auth_config.enabled:
|
||||||
# pass the user header value from the upstream proxy if a mapping is specified
|
# pass the user header value from the upstream proxy if a mapping is specified
|
||||||
# or use anonymous if none are specified
|
# or use anonymous if none are specified
|
||||||
if current_app.frigate_config.auth.header_map.user is not None:
|
if proxy_config.header_map.user is not None:
|
||||||
upstream_user_header_value = request.headers.get(
|
upstream_user_header_value = request.headers.get(
|
||||||
current_app.frigate_config.auth.header_map.user,
|
proxy_config.header_map.user,
|
||||||
type=str,
|
type=str,
|
||||||
default="anonymous",
|
default="anonymous",
|
||||||
)
|
)
|
||||||
@@ -192,7 +204,7 @@ def auth():
|
|||||||
success_response.headers["remote-user"] = "anonymous"
|
success_response.headers["remote-user"] = "anonymous"
|
||||||
return success_response
|
return success_response
|
||||||
|
|
||||||
fail_response = make_response({}, 401)
|
# now apply authentication
|
||||||
fail_response.headers["location"] = "/login"
|
fail_response.headers["location"] = "/login"
|
||||||
|
|
||||||
JWT_COOKIE_NAME = current_app.frigate_config.auth.cookie_name
|
JWT_COOKIE_NAME = current_app.frigate_config.auth.cookie_name
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
import psutil
|
||||||
from flask import (
|
from flask import (
|
||||||
Blueprint,
|
Blueprint,
|
||||||
current_app,
|
current_app,
|
||||||
@@ -12,8 +13,8 @@ from flask import (
|
|||||||
request,
|
request,
|
||||||
)
|
)
|
||||||
from peewee import DoesNotExist
|
from peewee import DoesNotExist
|
||||||
from werkzeug.utils import secure_filename
|
|
||||||
|
|
||||||
|
from frigate.const import EXPORT_DIR
|
||||||
from frigate.models import Export, Recordings
|
from frigate.models import Export, Recordings
|
||||||
from frigate.record.export import PlaybackFactorEnum, RecordingExporter
|
from frigate.record.export import PlaybackFactorEnum, RecordingExporter
|
||||||
|
|
||||||
@@ -46,9 +47,9 @@ def export_recording(camera_name: str, start_time, end_time):
|
|||||||
|
|
||||||
json: dict[str, any] = request.get_json(silent=True) or {}
|
json: dict[str, any] = request.get_json(silent=True) or {}
|
||||||
playback_factor = json.get("playback", "realtime")
|
playback_factor = json.get("playback", "realtime")
|
||||||
name: Optional[str] = json.get("name")
|
friendly_name: Optional[str] = json.get("name")
|
||||||
|
|
||||||
if len(name or "") > 256:
|
if len(friendly_name or "") > 256:
|
||||||
return make_response(
|
return make_response(
|
||||||
jsonify({"success": False, "message": "File name is too long."}),
|
jsonify({"success": False, "message": "File name is too long."}),
|
||||||
401,
|
401,
|
||||||
@@ -76,7 +77,7 @@ def export_recording(camera_name: str, start_time, end_time):
|
|||||||
exporter = RecordingExporter(
|
exporter = RecordingExporter(
|
||||||
current_app.frigate_config,
|
current_app.frigate_config,
|
||||||
camera_name,
|
camera_name,
|
||||||
secure_filename(name) if name else None,
|
friendly_name,
|
||||||
int(start_time),
|
int(start_time),
|
||||||
int(end_time),
|
int(end_time),
|
||||||
(
|
(
|
||||||
@@ -140,6 +141,27 @@ def export_delete(id: str):
|
|||||||
404,
|
404,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
files_in_use = []
|
||||||
|
for process in psutil.process_iter():
|
||||||
|
try:
|
||||||
|
if process.name() != "ffmpeg":
|
||||||
|
continue
|
||||||
|
flist = process.open_files()
|
||||||
|
if flist:
|
||||||
|
for nt in flist:
|
||||||
|
if nt.path.startswith(EXPORT_DIR):
|
||||||
|
files_in_use.append(nt.path.split("/")[-1])
|
||||||
|
except psutil.Error:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if export.video_path.split("/")[-1] in files_in_use:
|
||||||
|
return make_response(
|
||||||
|
jsonify(
|
||||||
|
{"success": False, "message": "Can not delete in progress export."}
|
||||||
|
),
|
||||||
|
400,
|
||||||
|
)
|
||||||
|
|
||||||
Path(export.video_path).unlink(missing_ok=True)
|
Path(export.video_path).unlink(missing_ok=True)
|
||||||
|
|
||||||
if export.thumb_path:
|
if export.thumb_path:
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ def latest_frame(camera_name):
|
|||||||
"regions": request.args.get("regions", type=int),
|
"regions": request.args.get("regions", type=int),
|
||||||
}
|
}
|
||||||
resize_quality = request.args.get("quality", default=70, type=int)
|
resize_quality = request.args.get("quality", default=70, type=int)
|
||||||
|
extension = os.path.splitext(request.path)[1][1:]
|
||||||
|
|
||||||
if camera_name in current_app.frigate_config.cameras:
|
if camera_name in current_app.frigate_config.cameras:
|
||||||
frame = current_app.detected_frames_processor.get_current_frame(
|
frame = current_app.detected_frames_processor.get_current_frame(
|
||||||
@@ -147,10 +148,10 @@ def latest_frame(camera_name):
|
|||||||
frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
|
frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
|
||||||
|
|
||||||
ret, img = cv2.imencode(
|
ret, img = cv2.imencode(
|
||||||
".webp", frame, [int(cv2.IMWRITE_WEBP_QUALITY), resize_quality]
|
f".{extension}", frame, [int(cv2.IMWRITE_WEBP_QUALITY), resize_quality]
|
||||||
)
|
)
|
||||||
response = make_response(img.tobytes())
|
response = make_response(img.tobytes())
|
||||||
response.headers["Content-Type"] = "image/webp"
|
response.headers["Content-Type"] = f"image/{extension}"
|
||||||
response.headers["Cache-Control"] = "no-store"
|
response.headers["Cache-Control"] = "no-store"
|
||||||
return response
|
return response
|
||||||
elif camera_name == "birdseye" and current_app.frigate_config.birdseye.restream:
|
elif camera_name == "birdseye" and current_app.frigate_config.birdseye.restream:
|
||||||
@@ -165,10 +166,10 @@ def latest_frame(camera_name):
|
|||||||
frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
|
frame = cv2.resize(frame, dsize=(width, height), interpolation=cv2.INTER_AREA)
|
||||||
|
|
||||||
ret, img = cv2.imencode(
|
ret, img = cv2.imencode(
|
||||||
".webp", frame, [int(cv2.IMWRITE_WEBP_QUALITY), resize_quality]
|
f".{extension}", frame, [int(cv2.IMWRITE_WEBP_QUALITY), resize_quality]
|
||||||
)
|
)
|
||||||
response = make_response(img.tobytes())
|
response = make_response(img.tobytes())
|
||||||
response.headers["Content-Type"] = "image/webp"
|
response.headers["Content-Type"] = f"image/{extension}"
|
||||||
response.headers["Cache-Control"] = "no-store"
|
response.headers["Cache-Control"] = "no-store"
|
||||||
return response
|
return response
|
||||||
else:
|
else:
|
||||||
@@ -459,7 +460,7 @@ def recording_clip(camera_name, start_ts, end_ts):
|
|||||||
)
|
)
|
||||||
|
|
||||||
file_name = secure_filename(file_name)
|
file_name = secure_filename(file_name)
|
||||||
path = os.path.join(CACHE_DIR, file_name)
|
path = os.path.join(CLIPS_DIR, f"cache/{file_name}")
|
||||||
|
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
ffmpeg_cmd = [
|
ffmpeg_cmd = [
|
||||||
@@ -511,7 +512,7 @@ def recording_clip(camera_name, start_ts, end_ts):
|
|||||||
response.headers["Content-Disposition"] = "attachment; filename=%s" % file_name
|
response.headers["Content-Disposition"] = "attachment; filename=%s" % file_name
|
||||||
response.headers["Content-Length"] = os.path.getsize(path)
|
response.headers["Content-Length"] = os.path.getsize(path)
|
||||||
response.headers["X-Accel-Redirect"] = (
|
response.headers["X-Accel-Redirect"] = (
|
||||||
f"/cache/{file_name}" # nginx: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers
|
f"/clips/cache/{file_name}" # nginx: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_headers
|
||||||
)
|
)
|
||||||
|
|
||||||
return response
|
return response
|
||||||
@@ -545,6 +546,11 @@ def vod_ts(camera_name, start_ts, end_ts):
|
|||||||
if recording.end_time > end_ts:
|
if recording.end_time > end_ts:
|
||||||
duration -= int((recording.end_time - end_ts) * 1000)
|
duration -= int((recording.end_time - end_ts) * 1000)
|
||||||
|
|
||||||
|
if duration == 0:
|
||||||
|
# this means the segment starts right at the end of the requested time range
|
||||||
|
# and it does not need to be included
|
||||||
|
continue
|
||||||
|
|
||||||
if 0 < duration < max_duration_ms:
|
if 0 < duration < max_duration_ms:
|
||||||
clip["keyFrameDurations"] = [duration]
|
clip["keyFrameDurations"] = [duration]
|
||||||
clips.append(clip)
|
clips.append(clip)
|
||||||
@@ -553,7 +559,9 @@ def vod_ts(camera_name, start_ts, end_ts):
|
|||||||
logger.warning(f"Recording clip is missing or empty: {recording.path}")
|
logger.warning(f"Recording clip is missing or empty: {recording.path}")
|
||||||
|
|
||||||
if not clips:
|
if not clips:
|
||||||
logger.error("No recordings found for the requested time range")
|
logger.error(
|
||||||
|
f"No recordings found for {camera_name} during the requested time range"
|
||||||
|
)
|
||||||
return make_response(
|
return make_response(
|
||||||
jsonify(
|
jsonify(
|
||||||
{
|
{
|
||||||
@@ -636,7 +644,7 @@ def vod_event(id):
|
|||||||
# If the recordings are not found and the event started more than 5 minutes ago, set has_clip to false
|
# If the recordings are not found and the event started more than 5 minutes ago, set has_clip to false
|
||||||
if (
|
if (
|
||||||
event.start_time < datetime.now().timestamp() - 300
|
event.start_time < datetime.now().timestamp() - 300
|
||||||
and type(vod_response) == tuple
|
and type(vod_response) is tuple
|
||||||
and len(vod_response) == 2
|
and len(vod_response) == 2
|
||||||
and vod_response[1] == 404
|
and vod_response[1] == 404
|
||||||
):
|
):
|
||||||
@@ -1232,8 +1240,8 @@ def preview_gif(camera_name: str, start_ts, end_ts, max_cache_age=2592000):
|
|||||||
|
|
||||||
@MediaBp.route("/<camera_name>/start/<int:start_ts>/end/<int:end_ts>/preview.mp4")
|
@MediaBp.route("/<camera_name>/start/<int:start_ts>/end/<int:end_ts>/preview.mp4")
|
||||||
@MediaBp.route("/<camera_name>/start/<float:start_ts>/end/<float:end_ts>/preview.mp4")
|
@MediaBp.route("/<camera_name>/start/<float:start_ts>/end/<float:end_ts>/preview.mp4")
|
||||||
def preview_mp4(camera_name: str, start_ts, end_ts):
|
def preview_mp4(camera_name: str, start_ts, end_ts, max_cache_age=604800):
|
||||||
file_name = f"clip_{camera_name}_{start_ts}-{end_ts}.mp4"
|
file_name = f"preview_{camera_name}_{start_ts}-{end_ts}.mp4"
|
||||||
|
|
||||||
if len(file_name) > 1000:
|
if len(file_name) > 1000:
|
||||||
return make_response(
|
return make_response(
|
||||||
@@ -1380,7 +1388,7 @@ def preview_mp4(camera_name: str, start_ts, end_ts):
|
|||||||
|
|
||||||
response = make_response()
|
response = make_response()
|
||||||
response.headers["Content-Description"] = "File Transfer"
|
response.headers["Content-Description"] = "File Transfer"
|
||||||
response.headers["Cache-Control"] = "no-cache"
|
response.headers["Cache-Control"] = f"private, max-age={max_cache_age}"
|
||||||
response.headers["Content-Type"] = "video/mp4"
|
response.headers["Content-Type"] = "video/mp4"
|
||||||
response.headers["Content-Length"] = os.path.getsize(path)
|
response.headers["Content-Length"] = os.path.getsize(path)
|
||||||
response.headers["X-Accel-Redirect"] = (
|
response.headers["X-Accel-Redirect"] = (
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ ReviewBp = Blueprint("reviews", __name__)
|
|||||||
def review():
|
def review():
|
||||||
cameras = request.args.get("cameras", "all")
|
cameras = request.args.get("cameras", "all")
|
||||||
labels = request.args.get("labels", "all")
|
labels = request.args.get("labels", "all")
|
||||||
|
zones = request.args.get("zones", "all")
|
||||||
reviewed = request.args.get("reviewed", type=int, default=0)
|
reviewed = request.args.get("reviewed", type=int, default=0)
|
||||||
limit = request.args.get("limit", type=int, default=None)
|
limit = request.args.get("limit", type=int, default=None)
|
||||||
severity = request.args.get("severity", None)
|
severity = request.args.get("severity", None)
|
||||||
@@ -60,6 +61,20 @@ def review():
|
|||||||
label_clause = reduce(operator.or_, label_clauses)
|
label_clause = reduce(operator.or_, label_clauses)
|
||||||
clauses.append((label_clause))
|
clauses.append((label_clause))
|
||||||
|
|
||||||
|
if zones != "all":
|
||||||
|
# use matching so segments with multiple zones
|
||||||
|
# still match on a search where any zone matches
|
||||||
|
zone_clauses = []
|
||||||
|
filtered_zones = zones.split(",")
|
||||||
|
|
||||||
|
for zone in filtered_zones:
|
||||||
|
zone_clauses.append(
|
||||||
|
(ReviewSegment.data["zones"].cast("text") % f'*"{zone}"*')
|
||||||
|
)
|
||||||
|
|
||||||
|
zone_clause = reduce(operator.or_, zone_clauses)
|
||||||
|
clauses.append((zone_clause))
|
||||||
|
|
||||||
if reviewed == 0:
|
if reviewed == 0:
|
||||||
clauses.append((ReviewSegment.has_been_reviewed == False))
|
clauses.append((ReviewSegment.has_been_reviewed == False))
|
||||||
|
|
||||||
@@ -96,6 +111,7 @@ def review_summary():
|
|||||||
|
|
||||||
cameras = request.args.get("cameras", "all")
|
cameras = request.args.get("cameras", "all")
|
||||||
labels = request.args.get("labels", "all")
|
labels = request.args.get("labels", "all")
|
||||||
|
zones = request.args.get("zones", "all")
|
||||||
|
|
||||||
clauses = [(ReviewSegment.start_time > day_ago)]
|
clauses = [(ReviewSegment.start_time > day_ago)]
|
||||||
|
|
||||||
@@ -118,6 +134,20 @@ def review_summary():
|
|||||||
label_clause = reduce(operator.or_, label_clauses)
|
label_clause = reduce(operator.or_, label_clauses)
|
||||||
clauses.append((label_clause))
|
clauses.append((label_clause))
|
||||||
|
|
||||||
|
if zones != "all":
|
||||||
|
# use matching so segments with multiple zones
|
||||||
|
# still match on a search where any zone matches
|
||||||
|
zone_clauses = []
|
||||||
|
filtered_zones = zones.split(",")
|
||||||
|
|
||||||
|
for zone in filtered_zones:
|
||||||
|
zone_clauses.append(
|
||||||
|
(ReviewSegment.data["zones"].cast("text") % f'*"{zone}"*')
|
||||||
|
)
|
||||||
|
|
||||||
|
zone_clause = reduce(operator.or_, zone_clauses)
|
||||||
|
clauses.append((zone_clause))
|
||||||
|
|
||||||
last_24 = (
|
last_24 = (
|
||||||
ReviewSegment.select(
|
ReviewSegment.select(
|
||||||
fn.SUM(
|
fn.SUM(
|
||||||
@@ -440,7 +470,12 @@ def motion_activity():
|
|||||||
|
|
||||||
# resample data using pandas to get activity on scaled basis
|
# resample data using pandas to get activity on scaled basis
|
||||||
df = pd.DataFrame(data, columns=["start_time", "motion", "camera"])
|
df = pd.DataFrame(data, columns=["start_time", "motion", "camera"])
|
||||||
df = df.astype(dtype={"motion": "float16"})
|
|
||||||
|
if df.empty:
|
||||||
|
logger.warning("No motion data found for the requested time range")
|
||||||
|
return jsonify([])
|
||||||
|
|
||||||
|
df = df.astype(dtype={"motion": "float32"})
|
||||||
|
|
||||||
# set date as datetime index
|
# set date as datetime index
|
||||||
df["start_time"] = pd.to_datetime(df["start_time"], unit="s")
|
df["start_time"] = pd.to_datetime(df["start_time"], unit="s")
|
||||||
@@ -462,11 +497,13 @@ def motion_activity():
|
|||||||
|
|
||||||
for i in range(0, length, chunk):
|
for i in range(0, length, chunk):
|
||||||
part = df.iloc[i : i + chunk]
|
part = df.iloc[i : i + chunk]
|
||||||
df.iloc[i : i + chunk, 0] = (
|
min_val, max_val = part["motion"].min(), part["motion"].max()
|
||||||
(part["motion"] - part["motion"].min())
|
if min_val != max_val:
|
||||||
/ (part["motion"].max() - part["motion"].min())
|
df.iloc[i : i + chunk, 0] = (
|
||||||
* 100
|
part["motion"].sub(min_val).div(max_val - min_val).mul(100).fillna(0)
|
||||||
).fillna(0.0)
|
)
|
||||||
|
else:
|
||||||
|
df.iloc[i : i + chunk, 0] = 0.0
|
||||||
|
|
||||||
# change types for output
|
# change types for output
|
||||||
df.index = df.index.astype(int) // (10**9)
|
df.index = df.index.astype(int) // (10**9)
|
||||||
|
|||||||
101
frigate/app.py
101
frigate/app.py
@@ -27,7 +27,7 @@ from frigate.comms.dispatcher import Communicator, Dispatcher
|
|||||||
from frigate.comms.inter_process import InterProcessCommunicator
|
from frigate.comms.inter_process import InterProcessCommunicator
|
||||||
from frigate.comms.mqtt import MqttClient
|
from frigate.comms.mqtt import MqttClient
|
||||||
from frigate.comms.ws import WebSocketClient
|
from frigate.comms.ws import WebSocketClient
|
||||||
from frigate.config import AuthModeEnum, FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.const import (
|
from frigate.const import (
|
||||||
CACHE_DIR,
|
CACHE_DIR,
|
||||||
CLIPS_DIR,
|
CLIPS_DIR,
|
||||||
@@ -68,7 +68,7 @@ from frigate.stats.util import stats_init
|
|||||||
from frigate.storage import StorageMaintainer
|
from frigate.storage import StorageMaintainer
|
||||||
from frigate.timeline import TimelineProcessor
|
from frigate.timeline import TimelineProcessor
|
||||||
from frigate.types import CameraMetricsTypes, PTZMetricsTypes
|
from frigate.types import CameraMetricsTypes, PTZMetricsTypes
|
||||||
from frigate.util.builtin import save_default_config
|
from frigate.util.builtin import empty_and_close_queue, save_default_config
|
||||||
from frigate.util.config import migrate_frigate_config
|
from frigate.util.config import migrate_frigate_config
|
||||||
from frigate.util.object import get_camera_regions_grid
|
from frigate.util.object import get_camera_regions_grid
|
||||||
from frigate.version import VERSION
|
from frigate.version import VERSION
|
||||||
@@ -100,7 +100,7 @@ class FrigateApp:
|
|||||||
for d in [
|
for d in [
|
||||||
CONFIG_DIR,
|
CONFIG_DIR,
|
||||||
RECORD_DIR,
|
RECORD_DIR,
|
||||||
CLIPS_DIR,
|
f"{CLIPS_DIR}/cache",
|
||||||
CACHE_DIR,
|
CACHE_DIR,
|
||||||
MODEL_CACHE_DIR,
|
MODEL_CACHE_DIR,
|
||||||
EXPORT_DIR,
|
EXPORT_DIR,
|
||||||
@@ -521,8 +521,9 @@ class FrigateApp:
|
|||||||
logger.info(f"Capture process started for {name}: {capture_process.pid}")
|
logger.info(f"Capture process started for {name}: {capture_process.pid}")
|
||||||
|
|
||||||
def start_audio_processors(self) -> None:
|
def start_audio_processors(self) -> None:
|
||||||
|
self.audio_process = None
|
||||||
if len([c for c in self.config.cameras.values() if c.audio.enabled]) > 0:
|
if len([c for c in self.config.cameras.values() if c.audio.enabled]) > 0:
|
||||||
audio_process = mp.Process(
|
self.audio_process = mp.Process(
|
||||||
target=listen_to_audio,
|
target=listen_to_audio,
|
||||||
name="audio_capture",
|
name="audio_capture",
|
||||||
args=(
|
args=(
|
||||||
@@ -530,10 +531,10 @@ class FrigateApp:
|
|||||||
self.camera_metrics,
|
self.camera_metrics,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
audio_process.daemon = True
|
self.audio_process.daemon = True
|
||||||
audio_process.start()
|
self.audio_process.start()
|
||||||
self.processes["audio_detector"] = audio_process.pid or 0
|
self.processes["audio_detector"] = self.audio_process.pid or 0
|
||||||
logger.info(f"Audio process started: {audio_process.pid}")
|
logger.info(f"Audio process started: {self.audio_process.pid}")
|
||||||
|
|
||||||
def start_timeline_processor(self) -> None:
|
def start_timeline_processor(self) -> None:
|
||||||
self.timeline_processor = TimelineProcessor(
|
self.timeline_processor = TimelineProcessor(
|
||||||
@@ -592,7 +593,7 @@ class FrigateApp:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def init_auth(self) -> None:
|
def init_auth(self) -> None:
|
||||||
if self.config.auth.mode == AuthModeEnum.native:
|
if self.config.auth.enabled:
|
||||||
if User.select().count() == 0:
|
if User.select().count() == 0:
|
||||||
password = secrets.token_hex(16)
|
password = secrets.token_hex(16)
|
||||||
password_hash = hash_password(
|
password_hash = hash_password(
|
||||||
@@ -706,9 +707,9 @@ class FrigateApp:
|
|||||||
self.check_shm()
|
self.check_shm()
|
||||||
self.init_auth()
|
self.init_auth()
|
||||||
|
|
||||||
|
# Flask only listens for SIGINT, so we need to catch SIGTERM and send SIGINT
|
||||||
def receiveSignal(signalNumber: int, frame: Optional[FrameType]) -> None:
|
def receiveSignal(signalNumber: int, frame: Optional[FrameType]) -> None:
|
||||||
self.stop()
|
os.kill(os.getpid(), signal.SIGINT)
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
signal.signal(signal.SIGTERM, receiveSignal)
|
signal.signal(signal.SIGTERM, receiveSignal)
|
||||||
|
|
||||||
@@ -717,10 +718,13 @@ class FrigateApp:
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
logger.info("Flask has exited...")
|
||||||
|
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
logger.info("Stopping...")
|
logger.info("Stopping...")
|
||||||
|
|
||||||
self.stop_event.set()
|
self.stop_event.set()
|
||||||
|
|
||||||
# set an end_time on entries without an end_time before exiting
|
# set an end_time on entries without an end_time before exiting
|
||||||
@@ -731,43 +735,76 @@ class FrigateApp:
|
|||||||
ReviewSegment.end_time == None
|
ReviewSegment.end_time == None
|
||||||
).execute()
|
).execute()
|
||||||
|
|
||||||
# Stop Communicators
|
# stop the audio process
|
||||||
self.inter_process_communicator.stop()
|
if self.audio_process is not None:
|
||||||
self.inter_config_updater.stop()
|
self.audio_process.terminate()
|
||||||
self.inter_detection_proxy.stop()
|
self.audio_process.join()
|
||||||
|
|
||||||
|
# ensure the capture processes are done
|
||||||
|
for camera in self.camera_metrics.keys():
|
||||||
|
capture_process = self.camera_metrics[camera]["capture_process"]
|
||||||
|
if capture_process is not None:
|
||||||
|
logger.info(f"Waiting for capture process for {camera} to stop")
|
||||||
|
capture_process.terminate()
|
||||||
|
capture_process.join()
|
||||||
|
|
||||||
|
# ensure the camera processors are done
|
||||||
|
for camera in self.camera_metrics.keys():
|
||||||
|
camera_process = self.camera_metrics[camera]["process"]
|
||||||
|
if camera_process is not None:
|
||||||
|
logger.info(f"Waiting for process for {camera} to stop")
|
||||||
|
camera_process.terminate()
|
||||||
|
camera_process.join()
|
||||||
|
logger.info(f"Closing frame queue for {camera}")
|
||||||
|
frame_queue = self.camera_metrics[camera]["frame_queue"]
|
||||||
|
empty_and_close_queue(frame_queue)
|
||||||
|
|
||||||
|
# ensure the detectors are done
|
||||||
for detector in self.detectors.values():
|
for detector in self.detectors.values():
|
||||||
detector.stop()
|
detector.stop()
|
||||||
|
|
||||||
# Empty the detection queue and set the events for all requests
|
empty_and_close_queue(self.detection_queue)
|
||||||
while not self.detection_queue.empty():
|
logger.info("Detection queue closed")
|
||||||
connection_id = self.detection_queue.get(timeout=1)
|
|
||||||
self.detection_out_events[connection_id].set()
|
self.detected_frames_processor.join()
|
||||||
self.detection_queue.close()
|
empty_and_close_queue(self.detected_frames_queue)
|
||||||
self.detection_queue.join_thread()
|
logger.info("Detected frames queue closed")
|
||||||
|
|
||||||
|
self.timeline_processor.join()
|
||||||
|
self.event_processor.join()
|
||||||
|
empty_and_close_queue(self.timeline_queue)
|
||||||
|
logger.info("Timeline queue closed")
|
||||||
|
|
||||||
|
self.output_processor.terminate()
|
||||||
|
self.output_processor.join()
|
||||||
|
|
||||||
|
self.recording_process.terminate()
|
||||||
|
self.recording_process.join()
|
||||||
|
|
||||||
|
self.review_segment_process.terminate()
|
||||||
|
self.review_segment_process.join()
|
||||||
|
|
||||||
self.external_event_processor.stop()
|
self.external_event_processor.stop()
|
||||||
self.dispatcher.stop()
|
self.dispatcher.stop()
|
||||||
self.detected_frames_processor.join()
|
|
||||||
self.ptz_autotracker_thread.join()
|
self.ptz_autotracker_thread.join()
|
||||||
self.event_processor.join()
|
|
||||||
self.event_cleanup.join()
|
self.event_cleanup.join()
|
||||||
self.record_cleanup.join()
|
self.record_cleanup.join()
|
||||||
self.stats_emitter.join()
|
self.stats_emitter.join()
|
||||||
self.frigate_watchdog.join()
|
self.frigate_watchdog.join()
|
||||||
self.db.stop()
|
self.db.stop()
|
||||||
|
|
||||||
|
# Stop Communicators
|
||||||
|
self.inter_process_communicator.stop()
|
||||||
|
self.inter_config_updater.stop()
|
||||||
|
self.inter_detection_proxy.stop()
|
||||||
|
|
||||||
while len(self.detection_shms) > 0:
|
while len(self.detection_shms) > 0:
|
||||||
shm = self.detection_shms.pop()
|
shm = self.detection_shms.pop()
|
||||||
shm.close()
|
shm.close()
|
||||||
shm.unlink()
|
shm.unlink()
|
||||||
|
|
||||||
for queue in [
|
self.log_process.terminate()
|
||||||
self.detected_frames_queue,
|
self.log_process.join()
|
||||||
self.log_queue,
|
|
||||||
]:
|
os._exit(os.EX_OK)
|
||||||
if queue is not None:
|
|
||||||
while not queue.empty():
|
|
||||||
queue.get_nowait()
|
|
||||||
queue.close()
|
|
||||||
queue.join_thread()
|
|
||||||
|
|||||||
@@ -26,9 +26,8 @@ class DetectionProxyRunner(threading.Thread):
|
|||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
"""Run the proxy."""
|
"""Run the proxy."""
|
||||||
control = self.context.socket(zmq.SUB)
|
control = self.context.socket(zmq.REP)
|
||||||
control.connect(SOCKET_CONTROL)
|
control.connect(SOCKET_CONTROL)
|
||||||
control.setsockopt_string(zmq.SUBSCRIBE, "")
|
|
||||||
incoming = self.context.socket(zmq.XSUB)
|
incoming = self.context.socket(zmq.XSUB)
|
||||||
incoming.bind(SOCKET_PUB)
|
incoming.bind(SOCKET_PUB)
|
||||||
outgoing = self.context.socket(zmq.XPUB)
|
outgoing = self.context.socket(zmq.XPUB)
|
||||||
@@ -46,13 +45,13 @@ class DetectionProxy:
|
|||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.context = zmq.Context()
|
self.context = zmq.Context()
|
||||||
self.control = self.context.socket(zmq.PUB)
|
self.control = self.context.socket(zmq.REQ)
|
||||||
self.control.bind(SOCKET_CONTROL)
|
self.control.bind(SOCKET_CONTROL)
|
||||||
self.runner = DetectionProxyRunner(self.context)
|
self.runner = DetectionProxyRunner(self.context)
|
||||||
self.runner.start()
|
self.runner.start()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
self.control.send_string("TERMINATE") # tell the proxy to stop
|
self.control.send("TERMINATE".encode()) # tell the proxy to stop
|
||||||
self.runner.join()
|
self.runner.join()
|
||||||
self.context.destroy()
|
self.context.destroy()
|
||||||
|
|
||||||
@@ -69,7 +68,7 @@ class DetectionPublisher:
|
|||||||
def send_data(self, payload: any) -> None:
|
def send_data(self, payload: any) -> None:
|
||||||
"""Publish detection."""
|
"""Publish detection."""
|
||||||
self.socket.send_string(self.topic.value, flags=zmq.SNDMORE)
|
self.socket.send_string(self.topic.value, flags=zmq.SNDMORE)
|
||||||
self.socket.send_pyobj(payload)
|
self.socket.send_json(payload)
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
@@ -92,7 +91,7 @@ class DetectionSubscriber:
|
|||||||
|
|
||||||
if has_update:
|
if has_update:
|
||||||
topic = DetectionTypeEnum[self.socket.recv_string(flags=zmq.NOBLOCK)]
|
topic = DetectionTypeEnum[self.socket.recv_string(flags=zmq.NOBLOCK)]
|
||||||
return (topic, self.socket.recv_pyobj())
|
return (topic, self.socket.recv_json())
|
||||||
except zmq.ZMQError:
|
except zmq.ZMQError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,20 @@ class Dispatcher:
|
|||||||
elif topic == UPDATE_CAMERA_ACTIVITY:
|
elif topic == UPDATE_CAMERA_ACTIVITY:
|
||||||
self.camera_activity = payload
|
self.camera_activity = payload
|
||||||
elif topic == "onConnect":
|
elif topic == "onConnect":
|
||||||
self.publish("camera_activity", json.dumps(self.camera_activity))
|
camera_status = self.camera_activity.copy()
|
||||||
|
|
||||||
|
for camera in camera_status.keys():
|
||||||
|
camera_status[camera]["config"] = {
|
||||||
|
"detect": self.config.cameras[camera].detect.enabled,
|
||||||
|
"snapshots": self.config.cameras[camera].snapshots.enabled,
|
||||||
|
"record": self.config.cameras[camera].record.enabled,
|
||||||
|
"audio": self.config.cameras[camera].audio.enabled,
|
||||||
|
"autotracking": self.config.cameras[
|
||||||
|
camera
|
||||||
|
].onvif.autotracking.enabled,
|
||||||
|
}
|
||||||
|
|
||||||
|
self.publish("camera_activity", json.dumps(camera_status))
|
||||||
else:
|
else:
|
||||||
self.publish(topic, payload, retain=False)
|
self.publish(topic, payload, retain=False)
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class EventUpdatePublisher:
|
|||||||
self, payload: tuple[EventTypeEnum, EventStateEnum, str, dict[str, any]]
|
self, payload: tuple[EventTypeEnum, EventStateEnum, str, dict[str, any]]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""There is no communication back to the processes."""
|
"""There is no communication back to the processes."""
|
||||||
self.socket.send_pyobj(payload)
|
self.socket.send_json(payload)
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
@@ -43,7 +43,7 @@ class EventUpdateSubscriber:
|
|||||||
has_update, _, _ = zmq.select([self.socket], [], [], timeout)
|
has_update, _, _ = zmq.select([self.socket], [], [], timeout)
|
||||||
|
|
||||||
if has_update:
|
if has_update:
|
||||||
return self.socket.recv_pyobj()
|
return self.socket.recv_json()
|
||||||
except zmq.ZMQError:
|
except zmq.ZMQError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ class EventEndPublisher:
|
|||||||
self, payload: tuple[EventTypeEnum, EventStateEnum, str, dict[str, any]]
|
self, payload: tuple[EventTypeEnum, EventStateEnum, str, dict[str, any]]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""There is no communication back to the processes."""
|
"""There is no communication back to the processes."""
|
||||||
self.socket.send_pyobj(payload)
|
self.socket.send_json(payload)
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
@@ -89,7 +89,7 @@ class EventEndSubscriber:
|
|||||||
has_update, _, _ = zmq.select([self.socket], [], [], timeout)
|
has_update, _, _ = zmq.select([self.socket], [], [], timeout)
|
||||||
|
|
||||||
if has_update:
|
if has_update:
|
||||||
return self.socket.recv_pyobj()
|
return self.socket.recv_json()
|
||||||
except zmq.ZMQError:
|
except zmq.ZMQError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -37,14 +37,14 @@ class InterProcessCommunicator(Communicator):
|
|||||||
break
|
break
|
||||||
|
|
||||||
try:
|
try:
|
||||||
(topic, value) = self.socket.recv_pyobj(flags=zmq.NOBLOCK)
|
(topic, value) = self.socket.recv_json(flags=zmq.NOBLOCK)
|
||||||
|
|
||||||
response = self._dispatcher(topic, value)
|
response = self._dispatcher(topic, value)
|
||||||
|
|
||||||
if response is not None:
|
if response is not None:
|
||||||
self.socket.send_pyobj(response)
|
self.socket.send_json(response)
|
||||||
else:
|
else:
|
||||||
self.socket.send_pyobj([])
|
self.socket.send_json([])
|
||||||
except zmq.ZMQError:
|
except zmq.ZMQError:
|
||||||
break
|
break
|
||||||
|
|
||||||
@@ -65,8 +65,8 @@ class InterProcessRequestor:
|
|||||||
|
|
||||||
def send_data(self, topic: str, data: any) -> any:
|
def send_data(self, topic: str, data: any) -> any:
|
||||||
"""Sends data and then waits for reply."""
|
"""Sends data and then waits for reply."""
|
||||||
self.socket.send_pyobj((topic, data))
|
self.socket.send_json((topic, data))
|
||||||
return self.socket.recv_pyobj()
|
return self.socket.recv_json()
|
||||||
|
|
||||||
def stop(self) -> None:
|
def stop(self) -> None:
|
||||||
self.socket.close()
|
self.socket.close()
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -8,7 +7,6 @@ from enum import Enum
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Union
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
||||||
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from pydantic import (
|
from pydantic import (
|
||||||
BaseModel,
|
BaseModel,
|
||||||
@@ -27,6 +25,7 @@ from frigate.const import (
|
|||||||
CACHE_DIR,
|
CACHE_DIR,
|
||||||
CACHE_SEGMENT_FORMAT,
|
CACHE_SEGMENT_FORMAT,
|
||||||
DEFAULT_DB_PATH,
|
DEFAULT_DB_PATH,
|
||||||
|
FREQUENCY_STATS_POINTS,
|
||||||
MAX_PRE_CAPTURE,
|
MAX_PRE_CAPTURE,
|
||||||
REGEX_CAMERA_NAME,
|
REGEX_CAMERA_NAME,
|
||||||
YAML_EXT,
|
YAML_EXT,
|
||||||
@@ -43,12 +42,13 @@ from frigate.plus import PlusApi
|
|||||||
from frigate.util.builtin import (
|
from frigate.util.builtin import (
|
||||||
deep_merge,
|
deep_merge,
|
||||||
escape_special_characters,
|
escape_special_characters,
|
||||||
|
generate_color_palette,
|
||||||
get_ffmpeg_arg_list,
|
get_ffmpeg_arg_list,
|
||||||
load_config_with_no_duplicates,
|
load_config_with_no_duplicates,
|
||||||
)
|
)
|
||||||
from frigate.util.config import get_relative_coordinates
|
from frigate.util.config import StreamInfoRetriever, get_relative_coordinates
|
||||||
from frigate.util.image import create_mask
|
from frigate.util.image import create_mask
|
||||||
from frigate.util.services import auto_detect_hwaccel, get_video_properties
|
from frigate.util.services import auto_detect_hwaccel
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -62,9 +62,9 @@ FRIGATE_ENV_VARS = {k: v for k, v in os.environ.items() if k.startswith("FRIGATE
|
|||||||
if os.path.isdir("/run/secrets") and os.access("/run/secrets", os.R_OK):
|
if os.path.isdir("/run/secrets") and os.access("/run/secrets", os.R_OK):
|
||||||
for secret_file in os.listdir("/run/secrets"):
|
for secret_file in os.listdir("/run/secrets"):
|
||||||
if secret_file.startswith("FRIGATE_"):
|
if secret_file.startswith("FRIGATE_"):
|
||||||
FRIGATE_ENV_VARS[secret_file] = Path(
|
FRIGATE_ENV_VARS[secret_file] = (
|
||||||
os.path.join("/run/secrets", secret_file)
|
Path(os.path.join("/run/secrets", secret_file)).read_text().strip()
|
||||||
).read_text()
|
)
|
||||||
|
|
||||||
DEFAULT_TRACKED_OBJECTS = ["person"]
|
DEFAULT_TRACKED_OBJECTS = ["person"]
|
||||||
DEFAULT_ALERT_OBJECTS = ["person", "car"]
|
DEFAULT_ALERT_OBJECTS = ["person", "car"]
|
||||||
@@ -73,6 +73,9 @@ DEFAULT_DETECTORS = {"cpu": {"type": "cpu"}}
|
|||||||
DEFAULT_DETECT_DIMENSIONS = {"width": 1280, "height": 720}
|
DEFAULT_DETECT_DIMENSIONS = {"width": 1280, "height": 720}
|
||||||
DEFAULT_TIME_LAPSE_FFMPEG_ARGS = "-vf setpts=0.04*PTS -r 30"
|
DEFAULT_TIME_LAPSE_FFMPEG_ARGS = "-vf setpts=0.04*PTS -r 30"
|
||||||
|
|
||||||
|
# stream info handler
|
||||||
|
stream_info_retriever = StreamInfoRetriever()
|
||||||
|
|
||||||
|
|
||||||
class FrigateBaseModel(BaseModel):
|
class FrigateBaseModel(BaseModel):
|
||||||
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
||||||
@@ -98,9 +101,6 @@ class DateTimeStyleEnum(str, Enum):
|
|||||||
|
|
||||||
|
|
||||||
class UIConfig(FrigateBaseModel):
|
class UIConfig(FrigateBaseModel):
|
||||||
live_mode: LiveModeEnum = Field(
|
|
||||||
default=LiveModeEnum.mse, title="Default Live Mode."
|
|
||||||
)
|
|
||||||
timezone: Optional[str] = Field(default=None, title="Override UI timezone.")
|
timezone: Optional[str] = Field(default=None, title="Override UI timezone.")
|
||||||
time_format: TimeFormatEnum = Field(
|
time_format: TimeFormatEnum = Field(
|
||||||
default=TimeFormatEnum.browser, title="Override UI time format."
|
default=TimeFormatEnum.browser, title="Override UI time format."
|
||||||
@@ -116,9 +116,8 @@ class UIConfig(FrigateBaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class AuthModeEnum(str, Enum):
|
class TlsConfig(FrigateBaseModel):
|
||||||
native = "native"
|
enabled: bool = Field(default=True, title="Enable TLS for port 8971")
|
||||||
proxy = "proxy"
|
|
||||||
|
|
||||||
|
|
||||||
class HeaderMappingConfig(FrigateBaseModel):
|
class HeaderMappingConfig(FrigateBaseModel):
|
||||||
@@ -127,8 +126,22 @@ class HeaderMappingConfig(FrigateBaseModel):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
class ProxyConfig(FrigateBaseModel):
|
||||||
|
header_map: HeaderMappingConfig = Field(
|
||||||
|
default_factory=HeaderMappingConfig,
|
||||||
|
title="Header mapping definitions for proxy user passing.",
|
||||||
|
)
|
||||||
|
logout_url: Optional[str] = Field(
|
||||||
|
default=None, title="Redirect url for logging out with proxy."
|
||||||
|
)
|
||||||
|
auth_secret: Optional[str] = Field(
|
||||||
|
default=None,
|
||||||
|
title="Secret value for proxy authentication.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class AuthConfig(FrigateBaseModel):
|
class AuthConfig(FrigateBaseModel):
|
||||||
mode: AuthModeEnum = Field(default=AuthModeEnum.native, title="Authentication mode")
|
enabled: bool = Field(default=True, title="Enable authentication")
|
||||||
reset_admin_password: bool = Field(
|
reset_admin_password: bool = Field(
|
||||||
default=False, title="Reset the admin password on startup"
|
default=False, title="Reset the admin password on startup"
|
||||||
)
|
)
|
||||||
@@ -144,10 +157,6 @@ class AuthConfig(FrigateBaseModel):
|
|||||||
title="Refresh the session if it is going to expire in this many seconds",
|
title="Refresh the session if it is going to expire in this many seconds",
|
||||||
ge=30,
|
ge=30,
|
||||||
)
|
)
|
||||||
header_map: HeaderMappingConfig = Field(
|
|
||||||
default_factory=HeaderMappingConfig,
|
|
||||||
title="Header mapping definitions for proxy auth mode.",
|
|
||||||
)
|
|
||||||
failed_login_rate_limit: Optional[str] = Field(
|
failed_login_rate_limit: Optional[str] = Field(
|
||||||
default=None,
|
default=None,
|
||||||
title="Rate limits for failed login attempts.",
|
title="Rate limits for failed login attempts.",
|
||||||
@@ -156,9 +165,6 @@ class AuthConfig(FrigateBaseModel):
|
|||||||
default=[],
|
default=[],
|
||||||
title="Trusted proxies for determining IP address to rate limit",
|
title="Trusted proxies for determining IP address to rate limit",
|
||||||
)
|
)
|
||||||
logout_url: Optional[str] = Field(
|
|
||||||
default=None, title="Redirect url for logging out in proxy mode."
|
|
||||||
)
|
|
||||||
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
|
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
|
||||||
hash_iterations: int = Field(default=600000, title="Password hash iterations")
|
hash_iterations: int = Field(default=600000, title="Password hash iterations")
|
||||||
|
|
||||||
@@ -188,7 +194,9 @@ class MqttConfig(FrigateBaseModel):
|
|||||||
port: int = Field(default=1883, title="MQTT Port")
|
port: int = Field(default=1883, title="MQTT Port")
|
||||||
topic_prefix: str = Field(default="frigate", title="MQTT Topic Prefix")
|
topic_prefix: str = Field(default="frigate", title="MQTT Topic Prefix")
|
||||||
client_id: str = Field(default="frigate", title="MQTT Client ID")
|
client_id: str = Field(default="frigate", title="MQTT Client ID")
|
||||||
stats_interval: int = Field(default=60, title="MQTT Camera Stats Interval")
|
stats_interval: int = Field(
|
||||||
|
default=60, ge=FREQUENCY_STATS_POINTS, title="MQTT Camera Stats Interval"
|
||||||
|
)
|
||||||
user: Optional[str] = Field(None, title="MQTT Username")
|
user: Optional[str] = Field(None, title="MQTT Username")
|
||||||
password: Optional[str] = Field(None, title="MQTT Password", validate_default=True)
|
password: Optional[str] = Field(None, title="MQTT Password", validate_default=True)
|
||||||
tls_ca_certs: Optional[str] = Field(None, title="MQTT TLS CA Certificates")
|
tls_ca_certs: Optional[str] = Field(None, title="MQTT TLS CA Certificates")
|
||||||
@@ -271,6 +279,10 @@ class OnvifConfig(FrigateBaseModel):
|
|||||||
default_factory=PtzAutotrackConfig,
|
default_factory=PtzAutotrackConfig,
|
||||||
title="PTZ auto tracking config.",
|
title="PTZ auto tracking config.",
|
||||||
)
|
)
|
||||||
|
ignore_time_mismatch: bool = Field(
|
||||||
|
default=False,
|
||||||
|
title="Onvif Ignore Time Synchronization Mismatch Between Camera and Server",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RetainModeEnum(str, Enum):
|
class RetainModeEnum(str, Enum):
|
||||||
@@ -1025,10 +1037,11 @@ class CameraConfig(FrigateBaseModel):
|
|||||||
def __init__(self, **config):
|
def __init__(self, **config):
|
||||||
# Set zone colors
|
# Set zone colors
|
||||||
if "zones" in config:
|
if "zones" in config:
|
||||||
colors = plt.cm.get_cmap("tab10", len(config["zones"]))
|
colors = generate_color_palette(len(config["zones"]))
|
||||||
|
|
||||||
config["zones"] = {
|
config["zones"] = {
|
||||||
name: {**z, "color": tuple(round(255 * c) for c in colors(idx)[:3])}
|
name: {**z, "color": color}
|
||||||
for idx, (name, z) in enumerate(config["zones"].items())
|
for (name, z), color in zip(config["zones"].items(), colors)
|
||||||
}
|
}
|
||||||
|
|
||||||
# add roles to the input if there is only one
|
# add roles to the input if there is only one
|
||||||
@@ -1169,12 +1182,20 @@ class LoggerConfig(FrigateBaseModel):
|
|||||||
class CameraGroupConfig(FrigateBaseModel):
|
class CameraGroupConfig(FrigateBaseModel):
|
||||||
"""Represents a group of cameras."""
|
"""Represents a group of cameras."""
|
||||||
|
|
||||||
cameras: list[str] = Field(
|
cameras: Union[str, List[str]] = Field(
|
||||||
default_factory=list, title="List of cameras in this group."
|
default_factory=list, title="List of cameras in this group."
|
||||||
)
|
)
|
||||||
icon: str = Field(default="generic", title="Icon that represents camera group.")
|
icon: str = Field(default="generic", title="Icon that represents camera group.")
|
||||||
order: int = Field(default=0, title="Sort order for group.")
|
order: int = Field(default=0, title="Sort order for group.")
|
||||||
|
|
||||||
|
@field_validator("cameras", mode="before")
|
||||||
|
@classmethod
|
||||||
|
def validate_cameras(cls, v):
|
||||||
|
if isinstance(v, str) and "," not in v:
|
||||||
|
return [v]
|
||||||
|
|
||||||
|
return v
|
||||||
|
|
||||||
|
|
||||||
def verify_config_roles(camera_config: CameraConfig) -> None:
|
def verify_config_roles(camera_config: CameraConfig) -> None:
|
||||||
"""Verify that roles are setup in the config correctly."""
|
"""Verify that roles are setup in the config correctly."""
|
||||||
@@ -1296,6 +1317,10 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
database: DatabaseConfig = Field(
|
database: DatabaseConfig = Field(
|
||||||
default_factory=DatabaseConfig, title="Database configuration."
|
default_factory=DatabaseConfig, title="Database configuration."
|
||||||
)
|
)
|
||||||
|
tls: TlsConfig = Field(default_factory=TlsConfig, title="TLS configuration.")
|
||||||
|
proxy: ProxyConfig = Field(
|
||||||
|
default_factory=ProxyConfig, title="Proxy configuration."
|
||||||
|
)
|
||||||
auth: AuthConfig = Field(default_factory=AuthConfig, title="Auth configuration.")
|
auth: AuthConfig = Field(default_factory=AuthConfig, title="Auth configuration.")
|
||||||
environment_vars: Dict[str, str] = Field(
|
environment_vars: Dict[str, str] = Field(
|
||||||
default_factory=dict, title="Frigate environment variables."
|
default_factory=dict, title="Frigate environment variables."
|
||||||
@@ -1355,11 +1380,18 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
default_factory=TimestampStyleConfig,
|
default_factory=TimestampStyleConfig,
|
||||||
title="Global timestamp style configuration.",
|
title="Global timestamp style configuration.",
|
||||||
)
|
)
|
||||||
|
version: Optional[float] = Field(default=None, title="Current config version.")
|
||||||
|
|
||||||
def runtime_config(self, plus_api: PlusApi = None) -> FrigateConfig:
|
def runtime_config(self, plus_api: PlusApi = None) -> FrigateConfig:
|
||||||
"""Merge camera config with globals."""
|
"""Merge camera config with globals."""
|
||||||
config = self.model_copy(deep=True)
|
config = self.model_copy(deep=True)
|
||||||
|
|
||||||
|
# Proxy secret substitution
|
||||||
|
if config.proxy.auth_secret:
|
||||||
|
config.proxy.auth_secret = config.proxy.auth_secret.format(
|
||||||
|
**FRIGATE_ENV_VARS
|
||||||
|
)
|
||||||
|
|
||||||
# MQTT user/password substitutions
|
# MQTT user/password substitutions
|
||||||
if config.mqtt.user or config.mqtt.password:
|
if config.mqtt.user or config.mqtt.password:
|
||||||
config.mqtt.user = config.mqtt.user.format(**FRIGATE_ENV_VARS)
|
config.mqtt.user = config.mqtt.user.format(**FRIGATE_ENV_VARS)
|
||||||
@@ -1415,7 +1447,7 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
if need_detect_dimensions or need_record_fourcc:
|
if need_detect_dimensions or need_record_fourcc:
|
||||||
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
stream_info = {"width": 0, "height": 0, "fourcc": None}
|
||||||
try:
|
try:
|
||||||
stream_info = asyncio.run(get_video_properties(input.path))
|
stream_info = stream_info_retriever.get_stream_info(input.path)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.warn(
|
logger.warn(
|
||||||
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
f"Error detecting stream parameters automatically for {input.path} Applying default values."
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ UPSERT_REVIEW_SEGMENT = "upsert_review_segment"
|
|||||||
CLEAR_ONGOING_REVIEW_SEGMENTS = "clear_ongoing_review_segments"
|
CLEAR_ONGOING_REVIEW_SEGMENTS = "clear_ongoing_review_segments"
|
||||||
UPDATE_CAMERA_ACTIVITY = "update_camera_activity"
|
UPDATE_CAMERA_ACTIVITY = "update_camera_activity"
|
||||||
|
|
||||||
|
# Stats Values
|
||||||
|
|
||||||
|
FREQUENCY_STATS_POINTS = 15
|
||||||
|
|
||||||
# Autotracking
|
# Autotracking
|
||||||
|
|
||||||
AUTOTRACKING_MAX_AREA_RATIO = 0.6
|
AUTOTRACKING_MAX_AREA_RATIO = 0.6
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user