From 10db9faff9c31b875b3f46162d8d10c802fba13c Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 2 May 2022 09:22:37 -0600 Subject: [PATCH 01/77] Add docs about casting --- docs/docs/integrations/home-assistant.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/docs/integrations/home-assistant.md b/docs/docs/integrations/home-assistant.md index ae6d40344..847d3af02 100644 --- a/docs/docs/integrations/home-assistant.md +++ b/docs/docs/integrations/home-assistant.md @@ -85,6 +85,12 @@ The integration provides: This is accessible via "Media Browser" on the left menu panel in Home Assistant. +## Casting Clips To Media Devices + +The integration supports casting clips and cameras to supported media devices. + +**NOTE: For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings). + ## Notification API From 2dda7608bb0fdbf574545f17b9df2d4f484ca868 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 2 May 2022 09:24:31 -0600 Subject: [PATCH 02/77] Clarify camera streaming --- docs/docs/integrations/home-assistant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/home-assistant.md b/docs/docs/integrations/home-assistant.md index 847d3af02..c01262e34 100644 --- a/docs/docs/integrations/home-assistant.md +++ b/docs/docs/integrations/home-assistant.md @@ -87,7 +87,7 @@ This is accessible via "Media Browser" on the left menu panel in Home Assistant. ## Casting Clips To Media Devices -The integration supports casting clips and cameras to supported media devices. +The integration supports casting clips and camera streams to supported media devices. **NOTE: For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings). From f59871a189a218b6f6da35b85b8c9b38ef676ac1 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 2 May 2022 09:29:28 -0600 Subject: [PATCH 03/77] Fix bolding --- docs/docs/integrations/home-assistant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/integrations/home-assistant.md b/docs/docs/integrations/home-assistant.md index c01262e34..6aa9ccfc6 100644 --- a/docs/docs/integrations/home-assistant.md +++ b/docs/docs/integrations/home-assistant.md @@ -89,7 +89,7 @@ This is accessible via "Media Browser" on the left menu panel in Home Assistant. The integration supports casting clips and camera streams to supported media devices. -**NOTE: For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings). +**NOTE: For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings).** From 53bf3cd2e63e7a37efa017ee943a4cbf1b73fa8e Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 2 May 2022 09:39:57 -0600 Subject: [PATCH 04/77] Use tip for casting notes and specific note for no audio cameras --- docs/docs/integrations/home-assistant.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/docs/integrations/home-assistant.md b/docs/docs/integrations/home-assistant.md index 6aa9ccfc6..cab093b52 100644 --- a/docs/docs/integrations/home-assistant.md +++ b/docs/docs/integrations/home-assistant.md @@ -89,7 +89,12 @@ This is accessible via "Media Browser" on the left menu panel in Home Assistant. The integration supports casting clips and camera streams to supported media devices. -**NOTE: For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings).** +:::tip +For clips to be castable to media devices, audio is required and may need to be [enabled for recordings](../faqs.md#audio-in-recordings). + +**NOTE: Even if you camera does not support audio, audio will need to be enabled for Casting to be accepted.** + +::: From 93cd973e59ae854382841d1256a97d5b5be733b0 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 29 May 2022 08:48:55 -0600 Subject: [PATCH 05/77] Update index.md (#3267) --- docs/docs/configuration/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index c0d74085d..14fe556d6 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -25,6 +25,10 @@ cameras: height: 720 ``` +### VSCode Configuration Schema + +VSCode (and VSCode addon) supports the JSON schemas which will automatically validate the config. This can be added by adding `# yaml-language-server: $schema=http://frigate_host:5000/api/config/schema` to the top of the config file. `frigate_host` being the IP address of frigate or `ccab4aaf-frigate` if running in the addon. + ### Full configuration reference: :::caution From 653c2274e13872fec78184167510c5c68735ba9c Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 11 Jul 2022 10:05:47 -0600 Subject: [PATCH 06/77] Add FAQ about database locked error --- docs/docs/faqs.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/docs/faqs.md b/docs/docs/faqs.md index 34b040f01..61ed49cfd 100644 --- a/docs/docs/faqs.md +++ b/docs/docs/faqs.md @@ -47,3 +47,7 @@ These messages in the logs are expected in certain situations. Frigate checks th ### "On connect called" If you see repeated "On connect called" messages in your config, check for another instance of frigate. This happens when multiple frigate containers are trying to connect to mqtt with the same client_id. + +### Error: Database Is Locked + +sqlite does not work well on a network share, if the `/media` folder is mapped to a network share then [this guide](/configuration/advanced#database) should be used to move the database to a location on the internal drive. From e68f80b44a8e609e254ce11cdf0bc91b9ddfdbd8 Mon Sep 17 00:00:00 2001 From: Matthew Parlane Date: Tue, 19 Jul 2022 13:33:30 +1200 Subject: [PATCH 07/77] Use relative path without .. for rtmp documentation to fix #3481 ../faq was used in rtmp.md which leads to the wrong URL when the current URL ends in a slash due to 301 redirect of netlify --- docs/docs/configuration/rtmp.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/configuration/rtmp.md b/docs/docs/configuration/rtmp.md index 76f6f81a7..5c6b3b5a0 100644 --- a/docs/docs/configuration/rtmp.md +++ b/docs/docs/configuration/rtmp.md @@ -5,4 +5,4 @@ title: RTMP Frigate can re-stream your video feed as a RTMP feed for other applications such as Home Assistant to utilize it at `rtmp:///live/`. Port 1935 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. The video feed is copied from the original video feed directly to avoid re-encoding. This feed does not include any annotation by Frigate. -Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization. Some more information about it can be found [here](../faqs#audio-in-recordings). +Some video feeds are not compatible with RTMP. If you are experiencing issues, check to make sure your camera feed is h264 with AAC audio. If your camera doesn't support a compatible format for RTMP, you can use the ffmpeg args to re-encode it on the fly at the expense of increased CPU utilization. Some more information about it can be found [here](/faqs#audio-in-recordings). From 3c46a33992470f8b5e418f297d5011a692dd66ed Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Wed, 20 Jul 2022 06:55:06 -0500 Subject: [PATCH 08/77] revert false warning messages --- frigate/record.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/frigate/record.py b/frigate/record.py index 89576bdeb..5e3384ea4 100644 --- a/frigate/record.py +++ b/frigate/record.py @@ -101,13 +101,19 @@ class RecordingMaintainer(threading.Thread): for camera in grouped_recordings.keys(): segment_count = len(grouped_recordings[camera]) if segment_count > keep_count: - logger.warning( - f"Too many recording segments in cache for {camera}. Keeping the {keep_count} most recent segments out of {segment_count}, discarding the rest..." - ) + #### + # Need to find a way to tell if these are aging out based on retention settings or if the system is overloaded. + #### + # logger.warning( + # f"Too many recording segments in cache for {camera}. Keeping the {keep_count} most recent segments out of {segment_count}, discarding the rest..." + # ) to_remove = grouped_recordings[camera][:-keep_count] for f in to_remove: cache_path = f["cache_path"] - logger.warning(f"Discarding a recording segment: {cache_path}") + #### + # Need to find a way to tell if these are aging out based on retention settings or if the system is overloaded. + #### + # logger.warning(f"Discarding a recording segment: {cache_path}") Path(cache_path).unlink(missing_ok=True) self.end_time_cache.pop(cache_path, None) grouped_recordings[camera] = grouped_recordings[camera][-keep_count:] From 37325c70bad38b7b4db5846a43c293cca10ae5a5 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 22 Jul 2022 07:56:28 -0500 Subject: [PATCH 09/77] fix plus enabled for addons --- frigate/http.py | 4 ++-- frigate/test/test_http.py | 21 +++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/frigate/http.py b/frigate/http.py index 323e8b476..b7ed51783 100644 --- a/frigate/http.py +++ b/frigate/http.py @@ -25,7 +25,7 @@ from flask import ( from peewee import SqliteDatabase, operator, fn, DoesNotExist from playhouse.shortcuts import model_to_dict -from frigate.const import CLIPS_DIR, PLUS_ENV_VAR +from frigate.const import CLIPS_DIR from frigate.models import Event, Recordings from frigate.stats import stats_snapshot from frigate.version import VERSION @@ -571,7 +571,7 @@ def config(): for cmd in camera_dict["ffmpeg_cmds"]: cmd["cmd"] = " ".join(cmd["cmd"]) - config["plus"] = {"enabled": PLUS_ENV_VAR in os.environ} + config["plus"] = {"enabled": current_app.plus_api.is_active()} return jsonify(config) diff --git a/frigate/test/test_http.py b/frigate/test/test_http.py index ca8f578b1..04acdd681 100644 --- a/frigate/test/test_http.py +++ b/frigate/test/test_http.py @@ -13,6 +13,7 @@ from playhouse.shortcuts import model_to_dict from frigate.config import FrigateConfig from frigate.http import create_app from frigate.models import Event, Recordings +from frigate.plus import PlusApi from frigate.test.const import TEST_DB, TEST_DB_CLEANUPS @@ -113,7 +114,7 @@ class TestHttp(unittest.TestCase): def test_get_event_list(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" id2 = "7890.random" @@ -142,7 +143,7 @@ class TestHttp(unittest.TestCase): def test_get_good_event(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" @@ -156,7 +157,7 @@ class TestHttp(unittest.TestCase): def test_get_bad_event(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" bad_id = "654321.other" @@ -169,7 +170,7 @@ class TestHttp(unittest.TestCase): def test_delete_event(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" @@ -184,7 +185,7 @@ class TestHttp(unittest.TestCase): def test_event_retention(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" @@ -203,7 +204,7 @@ class TestHttp(unittest.TestCase): def test_set_delete_sub_label(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" sub_label = "sub" @@ -231,7 +232,7 @@ class TestHttp(unittest.TestCase): def test_sub_label_list(self): app = create_app( - FrigateConfig(**self.minimal_config), self.db, None, None, None + FrigateConfig(**self.minimal_config), self.db, None, None, PlusApi() ) id = "123456.random" sub_label = "sub" @@ -253,7 +254,7 @@ class TestHttp(unittest.TestCase): self.db, None, None, - None, + PlusApi(), ) with app.test_client() as client: @@ -267,7 +268,7 @@ class TestHttp(unittest.TestCase): self.db, None, None, - None, + PlusApi(), ) id = "123456.random" @@ -284,7 +285,7 @@ class TestHttp(unittest.TestCase): self.db, None, None, - None, + PlusApi(), ) mock_stats.return_value = self.test_stats From a94297ac93ac11db9c608bef508a2c9bc8aad787 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 5 Aug 2022 13:07:38 -0600 Subject: [PATCH 10/77] Add link to supported encoding for each GPU --- docs/docs/configuration/hardware_acceleration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/configuration/hardware_acceleration.md b/docs/docs/configuration/hardware_acceleration.md index 3f09f8e23..9d67f31d3 100644 --- a/docs/docs/configuration/hardware_acceleration.md +++ b/docs/docs/configuration/hardware_acceleration.md @@ -41,6 +41,8 @@ ffmpeg: ### NVIDIA GPU +[Supported Nvidia GPUs for Decoding](https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new) + These instructions are based on the [jellyfin documentation](https://jellyfin.org/docs/general/administration/hardware-acceleration.html#nvidia-hardware-acceleration-on-docker-linux) Add `--gpus all` to your docker run command or update your compose file. From 7a1215d581195d24990d443f6c5915e3081e7cb7 Mon Sep 17 00:00:00 2001 From: ZuluWhiskey <35011199+ZuluWhiskey@users.noreply.github.com> Date: Sat, 13 Aug 2022 12:42:25 +0100 Subject: [PATCH 11/77] Adding configuration example for retain modes (#3589) * Adding configuration example for retain modes Reading the documentation on its own didn't help me but when I found https://github.com/blakeblackshear/frigate/discussions/2447 I was able to understand how to add this to my configuration. I've added the example given in that discussion to help future readers of the page. * Update record.md Added suggested changes and have also added wording beneath the example mentioning the configuration can be added on a per camera basis. Have also built on the example to add object specific retentions timings - Not sure if it would be preferred to have it all within one example to not complicate things? Let me know your thoughts * Update record.md Created Object Specific Retention header * Typo Co-authored-by: Blake Blackshear --- docs/docs/configuration/record.md | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/docs/docs/configuration/record.md b/docs/docs/configuration/record.md index 9cb5878d5..7aeec9d0c 100644 --- a/docs/docs/configuration/record.md +++ b/docs/docs/configuration/record.md @@ -42,3 +42,35 @@ The same options are available with events. Let's consider a scenario where you - With the `all` option all segments for the duration of the event would be saved for the event. This event would have 4 hours of footage. - With the `motion` option all segments for the duration of the event with motion would be saved. This means any segment where a car drove by in the street, person walked by, lighting changed, etc. would be saved. - With the `active_objects` it would only keep segments where the object was active. In this case the only segments that would be saved would be the ones where the car was driving up, you going inside, you coming outside, and the car driving away. Essentially reducing the 4 hours to a minute or two of event footage. + +A configuration example of the above retain modes where all `motion` segments are stored for 7 days and `active objects` are stored for 14 days would be as follows: +```yaml +record: + enabled: True + retain: + days: 7 + mode: motion + events: + retain: + default: 14 + mode: active_objects +``` +The above configuration example can be added globally or on a per camera basis. + +### Object Specific Retention + +You can also set specific retention length for an object type. The below configuration example builds on from above but also specifies that recordings of dogs only need to be kept for 2 days and recordings of cars should be kept for 7 days. +```yaml +record: + enabled: True + retain: + days: 7 + mode: motion + events: + retain: + default: 14 + mode: active_objects + objects: + dog: 2 + car: 7 +``` From 3376e85be69bacc93a5eef5d28b3f5a9d66368b8 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 13 Aug 2022 05:45:32 -0600 Subject: [PATCH 12/77] Update docs to reflect new image multiarch tag (#3570) * Update docs to reflect new image multiarch * simplify Co-authored-by: Blake Blackshear --- docs/docs/installation.md | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index b2c1d65bf..5a6d02eb7 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -100,18 +100,7 @@ Additionally, the USB Coral draws a considerable amount of power. If using any o ## Docker -Running in Docker directly is the recommended install method. - -Make sure you choose the right image for your architecture: - -| Arch | Image Name | -| ----------- | ------------------------------------------ | -| amd64 | blakeblackshear/frigate:stable-amd64 | -| amd64nvidia | blakeblackshear/frigate:stable-amd64nvidia | -| armv7 | blakeblackshear/frigate:stable-armv7 | -| aarch64 | blakeblackshear/frigate:stable-aarch64 | - -It is recommended to run with docker-compose: +Running in Docker with compose is the recommended install method: ```yaml version: "3.9" @@ -120,7 +109,7 @@ services: container_name: frigate privileged: true # this may not be necessary for all setups restart: unless-stopped - image: blakeblackshear/frigate: + image: blakeblackshear/frigate:stable shm_size: "64mb" # update for your cameras based on calculation above devices: - /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions @@ -157,7 +146,7 @@ docker run -d \ -e FRIGATE_RTSP_PASSWORD='password' \ -p 5000:5000 \ -p 1935:1935 \ - blakeblackshear/frigate: + blakeblackshear/frigate:stable ``` ## Home Assistant Operating System (HassOS) From 2d5d3bdaf4c9846ace15ae5d14b471178810f5a5 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 13 Aug 2022 05:46:08 -0600 Subject: [PATCH 13/77] Wait for recordingSummary and recordings to be valid before playing (#3558) * Wait for recordingSummary and recordings to be valid before playing * Wait for recordingSummary and recordings to be valid before playing --- web/src/routes/Recording.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/routes/Recording.jsx b/web/src/routes/Recording.jsx index 1f592d469..8f81dde7d 100644 --- a/web/src/routes/Recording.jsx +++ b/web/src/routes/Recording.jsx @@ -103,7 +103,7 @@ export default function Recording({ camera, date, hour = '00', minute = '00', se } }, [seekSeconds, playlistIndex]); - if (!recordingsSummary) { + if (!recordingsSummary || !recordings) { return ; } From 5577ef081fcac85bd8a31cb67359380d6dbe5e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Wed, 20 Jul 2022 09:03:43 -0400 Subject: [PATCH 14/77] docker: Add VAAPI to arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- docker/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/Dockerfile b/docker/Dockerfile index 61658fd61..6cf5e62bd 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -89,6 +89,10 @@ RUN apt-get -qq update \ apt-get -qq install --no-install-recommends --no-install-suggests -y \ mesa-va-drivers intel-media-va-driver-non-free; \ fi \ + && if [ "${TARGETARCH}" = "arm64" ]; then \ + apt-get -qq install --no-install-recommends --no-install-suggests -y \ + libva-drm2 mesa-va-drivers; \ + fi \ # not sure why 32bit arm requires all these && if [ "${TARGETARCH}" = "arm" ]; then \ apt-get -qq install --no-install-recommends --no-install-suggests -y \ From 6e2e297aeb451598223a3beb6735eb5fc27b37b2 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Wed, 27 Jul 2022 10:01:32 -0600 Subject: [PATCH 15/77] Add clean copy to configuration docs --- docs/docs/configuration/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/configuration/index.md b/docs/docs/configuration/index.md index 14fe556d6..61ac9aa90 100644 --- a/docs/docs/configuration/index.md +++ b/docs/docs/configuration/index.md @@ -312,6 +312,8 @@ snapshots: # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below) # This value can be set via MQTT and will be updated in startup based on retained value enabled: False + # Optional: save a clean PNG copy of the snapshot image (default: shown below) + clean_copy: True # Optional: print a timestamp on the snapshots (default: shown below) timestamp: False # Optional: draw bounding box on the snapshots (default: shown below) From e649a1eb989f9b09848c7c94f76510c000203cf3 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Mon, 22 Aug 2022 11:51:15 -0600 Subject: [PATCH 16/77] 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 6cf5e62bd..37b639520 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 17/77] 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 74b289969..1ce35dbc2 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 18/77] 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 fabb97a3c..269a1c80d 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 19/77] 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 679a1e945..769e7b725 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 10416b888..0fa16c1f9 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 20/77] 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 6a513f29c..329dd3d79 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 b6c6fa77f..a35ca79d0 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 8f81dde7d..23a888a8f 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 21/77] 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 e6364268f..b8ca15600 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 22/77] 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 59a1649d1..0166d0c3a 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 a74a8c80b..62b040379 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 39f068568..97f80913e 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 6628112b3..7e75d1da7 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 0cc3e3e1e..b404c61a9 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 a35ca79d0..b93d661e4 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('_', ' ')}