From e649a1eb989f9b09848c7c94f76510c000203cf3 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 22 Aug 2022 11:51:15 -0600 Subject: [PATCH 01/25] Use btbn build for ffmpeg since jellyfin has compatibility issues with rtsp-simple-server --- docker/Dockerfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6cf5e62bd5..37b6395205 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -46,7 +46,6 @@ RUN pip3 wheel --wheel-dir=/wheels -r requirements-wheels.txt FROM debian:11-slim ARG TARGETARCH -ARG JELLYFIN_FFMPEG_VERSION=5.0.1-7 # https://askubuntu.com/questions/972516/debian-frontend-environment-variable ARG DEBIAN_FRONTEND="noninteractive" # http://stackoverflow.com/questions/48162574/ddg#49462622 @@ -80,14 +79,21 @@ RUN apt-get -qq update \ # coral drivers libedgetpu1-max python3-tflite-runtime python3-pycoral \ && pip3 install -U /wheels/*.whl \ - # jellyfin-ffmpeg - && wget -O jellyfin.deb "https://repo.jellyfin.org/releases/server/debian/versions/jellyfin-ffmpeg/${JELLYFIN_FFMPEG_VERSION}/jellyfin-ffmpeg5_${JELLYFIN_FFMPEG_VERSION}-$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )_$( dpkg --print-architecture ).deb" \ - && apt-get -qq install --no-install-recommends --no-install-suggests -y ./jellyfin.deb \ - && rm jellyfin.deb \ + # btbn-ffmpeg -> amd64 / arm64 + && if [ "${TARGETARCH}" = "amd64" ] || [ "${TARGETARCH}" = "arm64" ]; then \ + mkdir -p /usr/lib/btbn-ffmpeg \ + && wget -O btbn-ffmpeg.tar.xz "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2022-07-31-12-37/ffmpeg-n5.1-2-g915ef932a3-linux$( [ "$TARGETARCH" = "amd64" ] && echo "64" || echo "arm64" )-gpl-5.1.tar.xz" \ + && tar -xf btbn-ffmpeg.tar.xz -C /usr/lib/btbn-ffmpeg --strip-components 1 \ + && rm btbn-ffmpeg.tar.xz; \ + fi \ + # ffmpeg -> arm32 + && if [ "${TARGETARCH}" = "arm" ]; then \ + apt-get -qq install --no-install-recommends --no-install-suggests -y ffmpeg; \ + fi \ # arch specific packages && if [ "${TARGETARCH}" = "amd64" ]; then \ apt-get -qq install --no-install-recommends --no-install-suggests -y \ - mesa-va-drivers intel-media-va-driver-non-free; \ + mesa-va-drivers libva-drm2 intel-media-va-driver-non-free i965-va-driver libmfx1; \ fi \ && if [ "${TARGETARCH}" = "arm64" ]; then \ apt-get -qq install --no-install-recommends --no-install-suggests -y \ @@ -109,7 +115,7 @@ RUN apt-get -qq update \ && apt-get autoremove -y \ && rm -rf /var/lib/apt/lists/* -ENV PATH=$PATH:/usr/lib/jellyfin-ffmpeg +ENV PATH=$PATH:/usr/lib/btbn-ffmpeg/bin COPY --from=nginx /usr/local/nginx/ /usr/local/nginx/ From 4682af81fb0b7e58eae0e686c2036cb788a456a5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Tue, 16 Aug 2022 06:48:09 -0500 Subject: [PATCH 02/25] update recommended hardware links --- docs/docs/hardware.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/docs/hardware.md b/docs/docs/hardware.md index 74b289969c..1ce35dbc26 100644 --- a/docs/docs/hardware.md +++ b/docs/docs/hardware.md @@ -23,15 +23,15 @@ I may earn a small commission for my endorsement, recommendation, testimonial, o My current favorite is the Minisforum GK41 because of the 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 | Inference Speed | Coral Compatibility | Notes | -| ------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| Odyssey X86 Blue J4125 (affiliate link) | 9-10ms | M.2 B+M | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | -| Minisforum GK41 (affiliate link) | 9-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | -| Beelink GK55 (affiliate link) | 9-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | -| Intel NUC (affiliate link) | 8-10ms | USB | Overkill for most, but great performance. Can handle many cameras at 5fps depending on typical amounts of motion. Requires extra parts. | -| BMAX B2 Plus (affiliate link) | 10-12ms | USB | Good balance of performance and cost. Also capable of running many other services at the same time as frigate. | -| Atomic Pi (affiliate link) | 16ms | USB | Good option for a dedicated low power board with a small number of cameras. Can leverage Intel QuickSync for stream decoding. | -| Raspberry Pi 4 (64bit) (affiliate link) | 10-15ms | USB | Can handle a small number of cameras. | +| Name | Inference Speed | Coral Compatibility | Notes | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| Odyssey X86 Blue J4125 (Amazon) (SeeedStudio) | 9-10ms | M.2 B+M | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | +| Minisforum GK41 (Amazon) | 9-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | +| Beelink GK55 (Amazon) | 9-10ms | USB | Dual gigabit NICs for easy isolated camera network. Easily handles several 1080p cameras. | +| Intel NUC (Amazon) | 8-10ms | USB | Overkill for most, but great performance. Can handle many cameras at 5fps depending on typical amounts of motion. Requires extra parts. | +| BMAX B2 Plus (Amazon) | 10-12ms | USB | Good balance of performance and cost. Also capable of running many other services at the same time as frigate. | +| Atomic Pi (Amazon) | 16ms | USB | Good option for a dedicated low power board with a small number of cameras. Can leverage Intel QuickSync for stream decoding. | +| Raspberry Pi 4 (64bit) (Amazon) | 10-15ms | USB | Can handle a small number of cameras. | ## Google Coral TPU From 05d5f13f0e1149dda2078a3debaa300f75afde02 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Tue, 23 Aug 2022 14:02:28 -0600 Subject: [PATCH 03/25] Remove outdated section on events --- docs/docs/guides/stationary_objects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/guides/stationary_objects.md b/docs/docs/guides/stationary_objects.md index fabb97a3c0..269a1c80df 100644 --- a/docs/docs/guides/stationary_objects.md +++ b/docs/docs/guides/stationary_objects.md @@ -3,7 +3,7 @@ id: stationary_objects title: Avoiding stationary objects --- -Many people use Frigate to detect cars entering their driveway, and they often run into an issue with repeated events of a parked car being repeatedly detected. This is because object tracking stops when motion ends and the event ends. Motion detection works by determining if a sufficient number of pixels have changed between frames. Shadows or other lighting changes will be detected as motion. This will often cause a new event for a parked car. +Many people use Frigate to detect cars entering their driveway, and they often run into an issue with repeated events of a parked car being repeatedly detected over the course of multiple days (for example if the car is lost at night and detected again the following morning. You can use zones to restrict events and notifications to objects that have entered specific areas. From 89c04acdffc708641b2508ab3bf79805eb0abafe Mon Sep 17 00:00:00 2001 From: Justin Wong <46082645+uvjustin@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:19:56 +0800 Subject: [PATCH 04/25] Bump videojs to 7.20.2 Bump videojs-seek-buttons to 2.2.1 Bump types/video.js to 7.3.44 --- web/package-lock.json | 176 +++++++++++++++++++++--------------------- web/package.json | 6 +- 2 files changed, 92 insertions(+), 90 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 679a1e9458..769e7b725a 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -17,9 +17,9 @@ "preact-async-route": "^2.2.1", "preact-router": "^4.0.1", "swr": "^1.2.2", - "video.js": "^7.17.0", + "video.js": "^7.20.2", "videojs-playlist": "^5.0.0", - "videojs-seek-buttons": "^2.2.0" + "videojs-seek-buttons": "^2.2.1" }, "devDependencies": { "@babel/preset-env": "^7.16.11", @@ -30,7 +30,7 @@ "@testing-library/preact": "^2.0.1", "@testing-library/preact-hooks": "^1.1.0", "@testing-library/user-event": "^13.5.0", - "@types/video.js": "^7.3.42", + "@types/video.js": "^7.3.44", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", "autoprefixer": "^10.4.2", @@ -3236,9 +3236,9 @@ } }, "node_modules/@types/video.js": { - "version": "7.3.42", - "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.42.tgz", - "integrity": "sha512-AD6AQNMgLTqrgoayC6SshKh8EDkDd9x5pmEuiY9YsniHlhn5jPXdkVqrzKLwviapaRhQF15TQYxo1JWpqXCUBg==", + "version": "7.3.44", + "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.44.tgz", + "integrity": "sha512-ov1HXNOjUkt38al/ybw8cj1181I5P3sOXdrqBR8AkDCqQX6GYwxOCzdmsGn/LDwKHTZ/3veNC9Ad6BjR5wSq4g==", "dev": true }, "node_modules/@types/yargs": { @@ -3874,17 +3874,17 @@ } }, "node_modules/@videojs/http-streaming": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.12.0.tgz", - "integrity": "sha512-vdQA0lDYBXGJqV2T02AGqg1w4dcgyRoN+bYG+G8uF4DpCEMhEtUI0BA4tRu4/Njar8w/9D5k0a1KX40pcvM3fA==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.14.2.tgz", + "integrity": "sha512-K1raSfO/pq5r8iUas3OSYni0kXOj91n8ealIpV02khghzGv9LQ6O3YUqYd/eAhJ1HIrmZWOnrYpK/P+mhUExXQ==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "3.0.4", - "aes-decrypter": "3.1.2", + "@videojs/vhs-utils": "3.0.5", + "aes-decrypter": "3.1.3", "global": "^4.4.0", - "m3u8-parser": "4.7.0", - "mpd-parser": "0.19.2", - "mux.js": "5.14.1", + "m3u8-parser": "4.7.1", + "mpd-parser": "0.21.1", + "mux.js": "6.0.1", "video.js": "^6 || ^7" }, "engines": { @@ -3896,9 +3896,9 @@ } }, "node_modules/@videojs/vhs-utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.4.tgz", - "integrity": "sha512-hui4zOj2I1kLzDgf8QDVxD3IzrwjS/43KiS8IHQO0OeeSsb4pB/lgNt1NG7Dv0wMQfCccUpMVLGcK618s890Yg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", "dependencies": { "@babel/runtime": "^7.12.5", "global": "^4.4.0", @@ -3985,12 +3985,12 @@ } }, "node_modules/aes-decrypter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.2.tgz", - "integrity": "sha512-42nRwfQuPRj9R1zqZBdoxnaAmnIFyDi0MNyTVhjdFOd8fifXKKRfwIHIZ6AMn1or4x5WONzjwRTbTWcsIQ0O4A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz", + "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.0", + "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0", "pkcs7": "^1.0.4" } @@ -9416,12 +9416,12 @@ } }, "node_modules/m3u8-parser": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.7.0.tgz", - "integrity": "sha512-48l/OwRyjBm+QhNNigEEcRcgbRvnUjL7rxs597HmW9QSNbyNvt+RcZ9T/d9vxi9A9z7EZrB1POtZYhdRlwYQkQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.7.1.tgz", + "integrity": "sha512-pbrQwiMiq+MmI9bl7UjtPT3AK603PV9bogNlr83uC+X9IoxqL5E4k7kU7fMQ0dpRgxgeSMygqUa0IMLQNXLBNA==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.0", + "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0" } }, @@ -9552,12 +9552,12 @@ "dev": true }, "node_modules/mpd-parser": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.19.2.tgz", - "integrity": "sha512-M5tAIdtBM2TN+OSTz/37T7V+h9ZLvhyNqq4TNIdtjAQ/Hg8UnMRf5nJQDjffcXag3POXi31yUJQEKOXdcAM/nw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.21.1.tgz", + "integrity": "sha512-BxlSXWbKE1n7eyEPBnTEkrzhS3PdmkkKdM1pgKbPnPOH0WFZIc0sPOWi7m0Uo3Wd2a4Or8Qf4ZbS7+ASqQ49fw==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.2", + "@videojs/vhs-utils": "^3.0.5", "@xmldom/xmldom": "^0.7.2", "global": "^4.4.0" }, @@ -9722,11 +9722,12 @@ "dev": true }, "node_modules/mux.js": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.14.1.tgz", - "integrity": "sha512-38kA/xjWRDzMbcpHQfhKbJAME8eTZVsb9U2Puk890oGvGqnyu8B/AkKdICKPHkigfqYX9MY20vje88TP14nhog==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz", + "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==", "dependencies": { - "@babel/runtime": "^7.11.2" + "@babel/runtime": "^7.11.2", + "global": "^4.4.0" }, "bin": { "muxjs-transmux": "bin/transmux.js" @@ -11762,20 +11763,20 @@ } }, "node_modules/video.js": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.17.0.tgz", - "integrity": "sha512-8RbLu9+Pdpep9OTPncUHIvZXFgn/7hKdPnSTE/lGSnlFSucXtTUBp41R7NDwncscMLQ0WgazUbmFlvr4MNWMbA==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.20.2.tgz", + "integrity": "sha512-hdvAHKAyaL6bCDkeu0pPtFYKi1EDaOUovm7FN1xqBDolUxgH8FKy1WIgTS+Ouuaw7R54SCTcSeXjZEizhy9ouQ==", "dependencies": { "@babel/runtime": "^7.12.5", - "@videojs/http-streaming": "2.12.0", - "@videojs/vhs-utils": "^3.0.3", + "@videojs/http-streaming": "2.14.2", + "@videojs/vhs-utils": "^3.0.4", "@videojs/xhr": "2.6.0", - "aes-decrypter": "3.1.2", + "aes-decrypter": "3.1.3", "global": "^4.4.0", "keycode": "^2.2.0", - "m3u8-parser": "4.7.0", - "mpd-parser": "0.19.2", - "mux.js": "5.14.1", + "m3u8-parser": "4.7.1", + "mpd-parser": "0.21.1", + "mux.js": "6.0.1", "safe-json-parse": "4.0.0", "videojs-font": "3.2.0", "videojs-vtt.js": "^0.15.3" @@ -11799,9 +11800,9 @@ } }, "node_modules/videojs-seek-buttons": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-2.2.0.tgz", - "integrity": "sha512-yjCA6ntq+8fRKgZi/H6QJlghQWgA1x9oSRl6wfLODAcujhynDXetwMgRKGgl4NlV5af2bKY6erNtJ0kOBko/nQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-2.2.1.tgz", + "integrity": "sha512-tXInD8ElUddyc1vxkGsVNhxlFtz8JC4VagPOSyL8mj7LI7oXjLGxni2pjx2wqzsV3PaIBMMH47MBtsNWf+wbtw==", "dependencies": { "global": "^4.4.0", "video.js": "^6 || ^7" @@ -14512,9 +14513,9 @@ } }, "@types/video.js": { - "version": "7.3.42", - "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.42.tgz", - "integrity": "sha512-AD6AQNMgLTqrgoayC6SshKh8EDkDd9x5pmEuiY9YsniHlhn5jPXdkVqrzKLwviapaRhQF15TQYxo1JWpqXCUBg==", + "version": "7.3.44", + "resolved": "https://registry.npmjs.org/@types/video.js/-/video.js-7.3.44.tgz", + "integrity": "sha512-ov1HXNOjUkt38al/ybw8cj1181I5P3sOXdrqBR8AkDCqQX6GYwxOCzdmsGn/LDwKHTZ/3veNC9Ad6BjR5wSq4g==", "dev": true }, "@types/yargs": { @@ -14894,24 +14895,24 @@ } }, "@videojs/http-streaming": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.12.0.tgz", - "integrity": "sha512-vdQA0lDYBXGJqV2T02AGqg1w4dcgyRoN+bYG+G8uF4DpCEMhEtUI0BA4tRu4/Njar8w/9D5k0a1KX40pcvM3fA==", + "version": "2.14.2", + "resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.14.2.tgz", + "integrity": "sha512-K1raSfO/pq5r8iUas3OSYni0kXOj91n8ealIpV02khghzGv9LQ6O3YUqYd/eAhJ1HIrmZWOnrYpK/P+mhUExXQ==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "3.0.4", - "aes-decrypter": "3.1.2", + "@videojs/vhs-utils": "3.0.5", + "aes-decrypter": "3.1.3", "global": "^4.4.0", - "m3u8-parser": "4.7.0", - "mpd-parser": "0.19.2", - "mux.js": "5.14.1", + "m3u8-parser": "4.7.1", + "mpd-parser": "0.21.1", + "mux.js": "6.0.1", "video.js": "^6 || ^7" } }, "@videojs/vhs-utils": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.4.tgz", - "integrity": "sha512-hui4zOj2I1kLzDgf8QDVxD3IzrwjS/43KiS8IHQO0OeeSsb4pB/lgNt1NG7Dv0wMQfCccUpMVLGcK618s890Yg==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@videojs/vhs-utils/-/vhs-utils-3.0.5.tgz", + "integrity": "sha512-PKVgdo8/GReqdx512F+ombhS+Bzogiofy1LgAj4tN8PfdBx3HSS7V5WfJotKTqtOWGwVfSWsrYN/t09/DSryrw==", "requires": { "@babel/runtime": "^7.12.5", "global": "^4.4.0", @@ -14980,12 +14981,12 @@ "dev": true }, "aes-decrypter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.2.tgz", - "integrity": "sha512-42nRwfQuPRj9R1zqZBdoxnaAmnIFyDi0MNyTVhjdFOd8fifXKKRfwIHIZ6AMn1or4x5WONzjwRTbTWcsIQ0O4A==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz", + "integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.0", + "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0", "pkcs7": "^1.0.4" } @@ -18886,12 +18887,12 @@ "dev": true }, "m3u8-parser": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.7.0.tgz", - "integrity": "sha512-48l/OwRyjBm+QhNNigEEcRcgbRvnUjL7rxs597HmW9QSNbyNvt+RcZ9T/d9vxi9A9z7EZrB1POtZYhdRlwYQkQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/m3u8-parser/-/m3u8-parser-4.7.1.tgz", + "integrity": "sha512-pbrQwiMiq+MmI9bl7UjtPT3AK603PV9bogNlr83uC+X9IoxqL5E4k7kU7fMQ0dpRgxgeSMygqUa0IMLQNXLBNA==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.0", + "@videojs/vhs-utils": "^3.0.5", "global": "^4.4.0" } }, @@ -18992,12 +18993,12 @@ "dev": true }, "mpd-parser": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.19.2.tgz", - "integrity": "sha512-M5tAIdtBM2TN+OSTz/37T7V+h9ZLvhyNqq4TNIdtjAQ/Hg8UnMRf5nJQDjffcXag3POXi31yUJQEKOXdcAM/nw==", + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.21.1.tgz", + "integrity": "sha512-BxlSXWbKE1n7eyEPBnTEkrzhS3PdmkkKdM1pgKbPnPOH0WFZIc0sPOWi7m0Uo3Wd2a4Or8Qf4ZbS7+ASqQ49fw==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/vhs-utils": "^3.0.2", + "@videojs/vhs-utils": "^3.0.5", "@xmldom/xmldom": "^0.7.2", "global": "^4.4.0" } @@ -19120,11 +19121,12 @@ "dev": true }, "mux.js": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-5.14.1.tgz", - "integrity": "sha512-38kA/xjWRDzMbcpHQfhKbJAME8eTZVsb9U2Puk890oGvGqnyu8B/AkKdICKPHkigfqYX9MY20vje88TP14nhog==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz", + "integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==", "requires": { - "@babel/runtime": "^7.11.2" + "@babel/runtime": "^7.11.2", + "global": "^4.4.0" } }, "nanoid": { @@ -20612,20 +20614,20 @@ } }, "video.js": { - "version": "7.17.0", - "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.17.0.tgz", - "integrity": "sha512-8RbLu9+Pdpep9OTPncUHIvZXFgn/7hKdPnSTE/lGSnlFSucXtTUBp41R7NDwncscMLQ0WgazUbmFlvr4MNWMbA==", + "version": "7.20.2", + "resolved": "https://registry.npmjs.org/video.js/-/video.js-7.20.2.tgz", + "integrity": "sha512-hdvAHKAyaL6bCDkeu0pPtFYKi1EDaOUovm7FN1xqBDolUxgH8FKy1WIgTS+Ouuaw7R54SCTcSeXjZEizhy9ouQ==", "requires": { "@babel/runtime": "^7.12.5", - "@videojs/http-streaming": "2.12.0", - "@videojs/vhs-utils": "^3.0.3", + "@videojs/http-streaming": "2.14.2", + "@videojs/vhs-utils": "^3.0.4", "@videojs/xhr": "2.6.0", - "aes-decrypter": "3.1.2", + "aes-decrypter": "3.1.3", "global": "^4.4.0", "keycode": "^2.2.0", - "m3u8-parser": "4.7.0", - "mpd-parser": "0.19.2", - "mux.js": "5.14.1", + "m3u8-parser": "4.7.1", + "mpd-parser": "0.21.1", + "mux.js": "6.0.1", "safe-json-parse": "4.0.0", "videojs-font": "3.2.0", "videojs-vtt.js": "^0.15.3" @@ -20646,9 +20648,9 @@ } }, "videojs-seek-buttons": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-2.2.0.tgz", - "integrity": "sha512-yjCA6ntq+8fRKgZi/H6QJlghQWgA1x9oSRl6wfLODAcujhynDXetwMgRKGgl4NlV5af2bKY6erNtJ0kOBko/nQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/videojs-seek-buttons/-/videojs-seek-buttons-2.2.1.tgz", + "integrity": "sha512-tXInD8ElUddyc1vxkGsVNhxlFtz8JC4VagPOSyL8mj7LI7oXjLGxni2pjx2wqzsV3PaIBMMH47MBtsNWf+wbtw==", "requires": { "global": "^4.4.0", "video.js": "^6 || ^7" diff --git a/web/package.json b/web/package.json index 10416b888b..0fa16c1f9c 100644 --- a/web/package.json +++ b/web/package.json @@ -19,9 +19,9 @@ "preact-async-route": "^2.2.1", "preact-router": "^4.0.1", "swr": "^1.2.2", - "video.js": "^7.17.0", + "video.js": "^7.20.2", "videojs-playlist": "^5.0.0", - "videojs-seek-buttons": "^2.2.0" + "videojs-seek-buttons": "^2.2.1" }, "devDependencies": { "@babel/preset-env": "^7.16.11", @@ -32,7 +32,7 @@ "@testing-library/preact": "^2.0.1", "@testing-library/preact-hooks": "^1.1.0", "@testing-library/user-event": "^13.5.0", - "@types/video.js": "^7.3.42", + "@types/video.js": "^7.3.44", "@typescript-eslint/eslint-plugin": "^5.18.0", "@typescript-eslint/parser": "^5.18.0", "autoprefixer": "^10.4.2", From 7c57c8c2dab0539d3b5154ca6d6b8da3ffe25ed8 Mon Sep 17 00:00:00 2001 From: Justin Wong <46082645+uvjustin@users.noreply.github.com> Date: Wed, 17 Aug 2022 23:28:32 +0800 Subject: [PATCH 05/25] Use master playlist for videojs --- web/src/components/HistoryViewer/HistoryVideo.tsx | 2 +- web/src/routes/Events.jsx | 2 +- web/src/routes/Recording.jsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/web/src/components/HistoryViewer/HistoryVideo.tsx b/web/src/components/HistoryViewer/HistoryVideo.tsx index 6a513f29c9..329dd3d791 100644 --- a/web/src/components/HistoryViewer/HistoryVideo.tsx +++ b/web/src/components/HistoryViewer/HistoryVideo.tsx @@ -57,7 +57,7 @@ export const HistoryVideo = ({ } video.src({ - src: `${apiHost}/vod/event/${id}/index.m3u8`, + src: `${apiHost}/vod/event/${id}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }); video.poster(`${apiHost}/api/events/${id}/snapshot.jpg`); diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index b6c6fa77f2..a35ca79d07 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -504,7 +504,7 @@ export default function Events({ path, ...props }) { autoplay: true, sources: [ { - src: `${apiHost}/vod/event/${event.id}/index.m3u8`, + src: `${apiHost}/vod/event/${event.id}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }, ], diff --git a/web/src/routes/Recording.jsx b/web/src/routes/Recording.jsx index 8f81dde7db..23a888a8ff 100644 --- a/web/src/routes/Recording.jsx +++ b/web/src/routes/Recording.jsx @@ -62,7 +62,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se description: `${camera} recording @ ${h.hour}:00.`, sources: [ { - src: `${apiHost}/vod/${year}-${month}/${day}/${h.hour}/${camera}/index.m3u8`, + src: `${apiHost}/vod/${year}-${month}/${day}/${h.hour}/${camera}/master.m3u8`, type: 'application/vnd.apple.mpegurl', }, ], From 911d6fdfa73870ab8781ebe7ba60dabbe43287aa Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 24 Aug 2022 06:39:47 -0600 Subject: [PATCH 06/25] Ensure bounding box is within camera frame (#3702) * Ensure bounding box is within camera frame * Account for 0 index --- frigate/video.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frigate/video.py b/frigate/video.py index e6364268f6..b8ca15600a 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -647,12 +647,13 @@ def process_frames( # apply non-maxima suppression to suppress weak, overlapping bounding boxes # o[2] is the box of the object: xmin, ymin, xmax, ymax + # apply max/min to ensure values do not exceed the known frame size boxes = [ ( - o[2][0], - o[2][1], - o[2][2] - o[2][0], - o[2][3] - o[2][1], + max(o[2][0], 0), + max(o[2][1], 0), + min(o[2][2] - o[2][0], detect_config.width - 1), + min(o[2][3] - o[2][1], detect_config.height - 1), ) for o in group ] From 0d6dd1ed0fa5a6d5dacd34100d6e2488eb16e432 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 25 Aug 2022 05:44:34 -0600 Subject: [PATCH 07/25] Cleanup names of cameras, zones, & labels in the UI (#3708) * Cleanup names of cameras, zones, & labels in the UI * Fix tests to include camera name --- web/config/handlers.js | 1 + web/src/Sidebar.jsx | 4 ++-- web/src/routes/Camera.jsx | 2 +- web/src/routes/Cameras.jsx | 6 +++++- web/src/routes/Debug.jsx | 2 +- web/src/routes/Events.jsx | 10 +++++----- web/src/routes/Recording.jsx | 2 +- 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/web/config/handlers.js b/web/config/handlers.js index 59a1649d13..0166d0c3a2 100644 --- a/web/config/handlers.js +++ b/web/config/handlers.js @@ -68,6 +68,7 @@ export const handlers = [ top_score: Math.random(), zones: ['front_patio'], thumbnail: '/9j/4aa...', + camera: 'camera_name', })) ) ); diff --git a/web/src/Sidebar.jsx b/web/src/Sidebar.jsx index a74a8c80b8..62b040379e 100644 --- a/web/src/Sidebar.jsx +++ b/web/src/Sidebar.jsx @@ -65,7 +65,7 @@ function CameraSection({ sortedCameras }) { {sortedCameras.map(([camera]) => ( - + ))} @@ -83,7 +83,7 @@ function RecordingSection({ sortedCameras }) { key={camera} path={`/recording/${camera}/:date?/:hour?/:seconds?`} href={`/recording/${camera}`} - text={camera} + text={camera.replaceAll('_', ' ')} /> ); })} diff --git a/web/src/routes/Camera.jsx b/web/src/routes/Camera.jsx index 39f0685684..97f80913ee 100644 --- a/web/src/routes/Camera.jsx +++ b/web/src/routes/Camera.jsx @@ -120,7 +120,7 @@ export default function Camera({ camera }) { return (
- {camera} + {camera.replaceAll('_', ' ')} {player} diff --git a/web/src/routes/Cameras.jsx b/web/src/routes/Cameras.jsx index 6628112b35..7e75d1da77 100644 --- a/web/src/routes/Cameras.jsx +++ b/web/src/routes/Cameras.jsx @@ -50,6 +50,10 @@ function Camera({ name }) { { name: 'Recordings', href: `/recording/${name}` }, ]; }, [name]); + const cleanName = useMemo( + () => { return `${name.replaceAll('_', ' ')}` }, + [name] + ); const icons = useMemo( () => [ { @@ -81,6 +85,6 @@ function Camera({ name }) { ); return ( - } /> + } /> ); } diff --git a/web/src/routes/Debug.jsx b/web/src/routes/Debug.jsx index 0cc3e3e1ea..b404c61a91 100644 --- a/web/src/routes/Debug.jsx +++ b/web/src/routes/Debug.jsx @@ -81,7 +81,7 @@ export default function Debug() { {cameraNames.map((camera, i) => ( - {camera} + {camera.replaceAll('_', ' ')} {cameraDataKeys.map((name) => ( {cameras[camera][name]} diff --git a/web/src/routes/Events.jsx b/web/src/routes/Events.jsx index a35ca79d07..b93d661e44 100644 --- a/web/src/routes/Events.jsx +++ b/web/src/routes/Events.jsx @@ -251,7 +251,7 @@ export default function Events({ path, ...props }) { {filterValues.cameras.map((item) => ( ))} @@ -262,7 +262,7 @@ export default function Events({ path, ...props }) { > {filterValues.labels.map((item) => ( - ))} @@ -275,7 +275,7 @@ export default function Events({ path, ...props }) { {filterValues.zones.map((item) => ( ))} @@ -457,11 +457,11 @@ export default function Events({ path, ...props }) {
- {event.camera} + {event.camera.replaceAll('_', ' ')}
- {event.zones.join(',')} + {event.zones.join(', ').replaceAll('_', ' ')}