Compare commits

..

38 Commits

Author SHA1 Message Date
Blake Blackshear
1771b9f286 update sample config 2020-10-17 07:37:52 -05:00
Blake Blackshear
56a9a46625 move the timestamp to bottom 2020-10-16 19:23:08 -05:00
Blake Blackshear
5174fc539f tweak size 2020-10-16 18:31:15 -05:00
Blake Blackshear
95cb97cf42 use the actual original shape 2020-10-16 17:59:17 -05:00
Blake Blackshear
53adfe0b09 scale font of timestamp dynamically 2020-10-16 17:50:40 -05:00
Blake Blackshear
8d4e155ece add ability to draw bounding boxes/timestamps on snapshots 2020-10-16 16:11:08 -05:00
Blake Blackshear
6069709035 handle empty best frames 2020-10-13 20:57:57 -05:00
Blake Blackshear
c9d7fbbd12 fix detector cleanup 2020-10-13 08:01:06 -05:00
Blake Blackshear
0b51f58de0 reduce zone filter bouncing 2020-10-13 07:50:14 -05:00
Blake Blackshear
45e9f84f6c prevent the camera process from hanging 2020-10-11 21:28:58 -05:00
Blake Blackshear
20cff853e8 syntax error 2020-10-11 13:07:00 -05:00
Blake Blackshear
d28d5e04a9 update docs 2020-10-11 12:58:41 -05:00
Blake Blackshear
26f4e27df0 update default detectors 2020-10-11 12:52:50 -05:00
Blake Blackshear
106d513e0b use dictionary for detectors for sensors 2020-10-11 12:49:08 -05:00
Blake Blackshear
223ec76601 only draw during debug 2020-10-11 12:16:57 -05:00
Dejan Zelic
405837de22 Added Healthcheck to Docker Compose
Frigate provides an HTTP server that can be used to detect if frigate is running or not. Using the docker-compose "healthcheck" feature we can set automations to restart the service if it stops working.
2020-10-11 11:49:29 -05:00
Radegast
51bd107536 Fix error in the docker run command
I have very little experience with Docker, but it seems the command in the README has two mistakes in it:

- unknown shorthand flag: 'n' in -name
- docker: Error response from daemon: Invalid container name (blakeblackshear/frigate:stable), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed.

I am running Docker version 19.03.13-ce, build 4484c46d9d on Arch linux.
2020-10-11 11:49:29 -05:00
Blake Blackshear
08c43e7918 cleanup frame queue 2020-10-11 11:49:29 -05:00
Blake Blackshear
6f070502b5 cleanup detection shms 2020-10-11 11:49:29 -05:00
Blake Blackshear
61081b91a3 only convert pix_fmt when necessary 2020-10-11 11:49:29 -05:00
Blake Blackshear
2a84d0afb9 use yuv420p pixel format for motion 2020-10-11 11:49:29 -05:00
Blake Blackshear
2c17f27ab4 support multiple coral devices (fixes #100) 2020-10-11 11:49:29 -05:00
Blake Blackshear
5bb9838c4f print stacktraceon segfaults 2020-10-11 11:49:29 -05:00
Blake Blackshear
d59018a14c prevent frame from being deleted while in use 2020-10-11 11:49:29 -05:00
Blake Blackshear
5f2b8bb6ad build ffmpeg in separate container 2020-10-11 11:49:29 -05:00
Blake Blackshear
6554640a61 arm64 ffmpeg cleanup 2020-10-11 11:49:29 -05:00
Blake Blackshear
5fbb092212 arm64 ffmpeg build 2020-10-11 11:49:29 -05:00
Blake Blackshear
dbb4ca7c87 ffmpeg 4.3.1 build for amd64 2020-10-11 11:49:29 -05:00
Blake Blackshear
e506931830 base image build cleanup 2020-10-11 11:49:29 -05:00
Blake Blackshear
feaf63c15f arm64 support 2020-10-11 11:49:29 -05:00
Blake Blackshear
a94179be4d add rpi dockerfile 2020-10-11 11:49:29 -05:00
Blake Blackshear
7837de8bc8 update dockerfiles for amd64 2020-10-11 11:49:29 -05:00
Blake Blackshear
0366781728 Base dockerfile for building wheels 2020-10-11 11:49:29 -05:00
Blake Blackshear
e898fca70a refactor dockerfile 2020-10-11 11:49:29 -05:00
Blake Blackshear
d788ceb1d3 fix shared memory store usage for events 2020-10-11 11:49:29 -05:00
Blake Blackshear
90a48fc761 cleanup 2020-10-11 11:49:29 -05:00
Blake Blackshear
de57c79bf9 update detection handoff to use shared memory 2020-10-11 11:49:29 -05:00
Blake Blackshear
af8c4e7eac upgrade to python3.8 and switch from plasma store to shared_memory 2020-10-11 11:49:29 -05:00
9 changed files with 22 additions and 39 deletions

View File

@@ -12,26 +12,26 @@ amd64_frigate:
amd64_all: amd64_wheels amd64_ffmpeg amd64_frigate
aarch64_wheels:
docker build --tag blakeblackshear/frigate-wheels:aarch64 --file docker/Dockerfile.wheels.aarch64 .
arm64_wheels:
docker build --tag blakeblackshear/frigate-wheels:arm64 --file docker/Dockerfile.wheels.arm64 .
aarch64_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:aarch64 --file docker/Dockerfile.ffmpeg.aarch64 .
arm64_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:arm64 --file docker/Dockerfile.ffmpeg.arm64 .
aarch64_frigate:
docker build --tag frigate-base --build-arg ARCH=aarch64 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.aarch64 .
arm64_frigate:
docker build --tag frigate-base --build-arg ARCH=arm64 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.arm64 .
armv7_all: armv7_wheels armv7_ffmpeg armv7_frigate
armv7hf_all: arm64_wheels arm64_ffmpeg arm64_frigate
armv7_wheels:
docker build --tag blakeblackshear/frigate-wheels:armv7 --file docker/Dockerfile.wheels .
armv7hf_wheels:
docker build --tag blakeblackshear/frigate-wheels:armv7hf --file docker/Dockerfile.wheels .
armv7_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:armv7 --file docker/Dockerfile.ffmpeg.armv7 .
armv7hf_ffmpeg:
docker build --tag blakeblackshear/frigate-ffmpeg:armv7hf --file docker/Dockerfile.ffmpeg.armv7hf .
armv7_frigate:
docker build --tag frigate-base --build-arg ARCH=armv7 --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.armv7 .
armv7hf_frigate:
docker build --tag frigate-base --build-arg ARCH=armv7hf --file docker/Dockerfile.base .
docker build --tag frigate --file docker/Dockerfile.armv7hf .
armv7_all: armv7_wheels armv7_ffmpeg armv7_frigate
armv7hf_all: armv7hf_wheels armv7hf_ffmpeg armv7hf_frigate

View File

@@ -31,7 +31,7 @@ docker run --rm \
-v /etc/localtime:/etc/localtime:ro \
-p 5000:5000 \
-e FRIGATE_RTSP_PASSWORD='password' \
blakeblackshear/frigate:0.7.0-amd64
blakeblackshear/frigate:stable
```
Example docker-compose:
@@ -41,7 +41,7 @@ Example docker-compose:
restart: unless-stopped
privileged: true
shm_size: '100m' # only needed with large numbers of high res cameras
image: blakeblackshear/frigate:0.7.0-amd64
image: blakeblackshear/frigate:stable
volumes:
- /dev/bus/usb:/dev/bus/usb
- /etc/localtime:/etc/localtime:ro

View File

@@ -31,8 +31,6 @@ save_clips:
# will begin to expire and the resulting clip will be the last x seconds of the event.
###########
max_seconds: 300
clips_dir: /clips
cache_dir: /cache
#################
# Default ffmpeg args. Optional and can be overwritten per camera.

View File

@@ -9,7 +9,6 @@ import time
import datetime
import queue
import yaml
import json
import threading
import multiprocessing as mp
import subprocess as sp
@@ -26,22 +25,8 @@ from frigate.edgetpu import EdgeTPUProcess
FRIGATE_VARS = {k: v for k, v in os.environ.items() if k.startswith('FRIGATE_')}
CONFIG_FILE = os.environ.get('CONFIG_FILE', '/config/config.yml')
if CONFIG_FILE.endswith(".yml"):
with open(CONFIG_FILE) as f:
CONFIG = yaml.safe_load(f)
elif CONFIG_FILE.endswith(".json"):
with open(CONFIG_FILE) as f:
CONFIG = json.load(f)
CACHE_DIR = CONFIG.get('save_clips', {}).get('cache_dir', '/cache')
CLIPS_DIR = CONFIG.get('save_clips', {}).get('clips_dir', '/clips')
if not os.path.exists(CACHE_DIR) and not os.path.islink(CACHE_DIR):
os.makedirs(CACHE_DIR)
if not os.path.exists(CLIPS_DIR) and not os.path.islink(CLIPS_DIR):
os.makedirs(CLIPS_DIR)
with open('/config/config.yml') as f:
CONFIG = yaml.safe_load(f)
MQTT_HOST = CONFIG['mqtt']['host']
MQTT_PORT = CONFIG.get('mqtt', {}).get('port', 1883)
@@ -238,7 +223,7 @@ def main():
"-an",
"-map",
"0",
f"{os.path.join(CACHE_DIR, name)}-%Y%m%d%H%M%S.mp4"
f"/cache/{name}-%Y%m%d%H%M%S.mp4"
] + ffmpeg_output_args
ffmpeg_cmd = (['ffmpeg'] +
ffmpeg_global_args +
@@ -304,7 +289,7 @@ def main():
camera_process['process'].start()
print(f"Camera_process started for {name}: {camera_process['process'].pid}")
event_processor = EventProcessor(CONFIG, camera_processes, CACHE_DIR, CLIPS_DIR, event_queue, stop_event)
event_processor = EventProcessor(CONFIG, camera_processes, '/cache', '/clips', event_queue, stop_event)
event_processor.start()
object_processor = TrackedObjectProcessor(CONFIG['cameras'], client, MQTT_TOPIC_PREFIX, tracked_objects_queue, event_queue, stop_event)