Commit Graph

153 Commits

Author SHA1 Message Date
Sergey Krashevich
f52b1212cd
add go2rtc version (#6390)
Update System.jsx
2023-05-04 21:04:06 -05:00
Blake Blackshear
0d16bd0144
False positives (#6217)
* add false positive submission

* switch timeline events to x,y,w,h

* update docs

* fix type checks

* convert to upsert

* fix config test
2023-04-24 07:24:28 -05:00
Nicolas Mowen
ece7dc29e7
Fix substitution change (#6212) 2023-04-23 12:19:56 -05:00
Felipe Santos
cdd8e6fd4e
Migrate default database path from /media/frigate to /config (#5219)
* Migrate db path to /config

* Ensure oneshot runs

* Put logic inside of Frigate's run

* Use new db default path in code

* Fix missing config dir

* Upgrade yq to 4.33.3
2023-04-23 11:35:40 -05:00
Blake Blackshear
cefbed614f
Remove arm32 (#5935)
* remove references to 32bit arm

* scheduled build to maintain actions cache
2023-04-08 09:24:28 -06:00
Felipe Santos
bc16ad1f13
Fix small warning not appearing in go2rtc logs in UI (#5882)
I always forget that for the logs to appear there, they should not be sent to stderr but stdout.
2023-03-30 20:03:42 -05:00
Felipe Santos
1b8cd10142
Allow to override go2rtc binary in add-on (#5876) 2023-03-29 19:08:04 -05:00
Nicolas Mowen
42eaa13402
Enable CORS for go2rtc by default (#5610)
* Enable CORS for go2rtc by default

* Fix typo
2023-03-03 17:43:50 -06:00
Felipe Santos
fbf29667d4
Upgrade s6-overlay from 3.1.4.0 to 3.1.4.1 (#5558) 2023-02-21 06:30:32 -06:00
Felipe Santos
a8c567d877
Add healthcheck for go2rtc service (#5545)
* Upgrade s6-overlay from 3.1.3.0 to 3.1.4.0

* Add go2rtc healthcheck service

Also don't make go2rtc exits cause the container to fail.

* Reword healthcheck message

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Add timeout to go2rtc healthcheck

* Update healthcheck message

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Give additional time for go2rtc start/restart

* Fix typo

* Avoid creating go2rtc config multiple times

* Fix healthcheck not starting

* Fix sleep

* Fix more hidden logs

* Decrease time window and use curl's timeout flag

---------

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-02-19 13:11:12 -06:00
Nicolas Mowen
1715e2e09d
Init birdseye restream command in S6 (#5494)
* remove restream from frigate logic

* Migrate birdseye stream definition to S6

* Cleanup

* Use consts to import as well
2023-02-15 07:09:25 -06:00
Blake Blackshear
27a31e731f
install i965-va-driver-shaders (#5451) 2023-02-11 09:57:15 -06:00
Felipe Santos
748815b6ce
Fix logging IP instead of WebRTC port (#5417) 2023-02-08 21:28:20 -06:00
Nicolas Mowen
ad60f4894b
Update go2rtc to 1.1.1 (#5333)
* Update go2rtc to 1.1.1

* Remove redundant qualifiers

* Remove qualifiers

* Set default_query

* Update version
2023-02-01 18:09:56 -06:00
Felipe Santos
fd3688a9c7
Upgrade s6-overlay from 3.1.2.1 to 3.1.3.0 (#5239) 2023-01-25 21:33:47 -06:00
Nicolas Mowen
f54b223adf
Print webrtc info to stderr (#5227)
* Update create_config.py

* Print to stderr
2023-01-25 18:38:45 -06:00
Felipe Santos
2f3e046130
Fix HA IP address and WebRTC port inferring (#5209)
* Fix HA IP address and WebRTC port inferring

* Add note for when candidates aren't being injected
2023-01-24 07:26:16 -06:00
Nicolas Mowen
5fa1fbafed
Use frigate env var substitution (#5153) 2023-01-18 17:51:35 -06:00
Felipe Santos
d36ab05bf1
Do not wait forever for services to exit (#5149)
* Fix frigate service restarting inside devcontainer

* Add timeouts to services exit process

So s6 won't wait forever.
2023-01-18 17:50:51 -06:00
Felipe Santos
e2239d36c9
Auto discover internal WebRTC candidate for add-on (#5089)
* Auto discover internal WebRTC candidate for add-on

* Write logs to stderr

* Fix port number

* Integrate with newest changes

* Update docs

* Use local variable more

* Use Python to write file, fix JSON->YAML

* Store into variable

* Update docs/docs/configuration/live.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/live.md

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>

* Update docs/docs/configuration/live.md

* Update docs/docs/configuration/live.md

* Refator s6 scripts to the new format

* Remove unneeded workaround

* Update docker/rootfs/usr/local/go2rtc/create_config.py

* Migrate logging to new s6 format

* Remove more unnecessary s6 variables

* Fix prepare-log and when go2rtc is not present in config

* Restart the whole container if either Frigate or go2rtc fails

* D

* Fix service name in finish

* Fix nginx finish comment

* Restart improvements

* Fix devcontainer

* Fix format

* Update Dockerfile

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>

* Improve scripts logging

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-01-18 17:23:40 -06:00
Felipe Santos
02df2a8bbd
Refactor s6 scripts to the new format (#5135)
* Refator s6 scripts to the new format

* Remove unneeded workaround

* Migrate logging to new s6 format

* Remove more unnecessary s6 variables

* Fix prepare-log and when go2rtc is not present in config

* Restart the whole container if either Frigate or go2rtc fails

* D

* Fix service name in finish

* Fix nginx finish comment

* Restart improvements

* Fix devcontainer

* Fix format

* Update Dockerfile

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>

Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
2023-01-18 07:53:53 -06:00
Nicolas Mowen
f5466426df
Fix go2rtc error when not set (#5133) 2023-01-17 22:38:17 -06:00
Nicolas Mowen
19afb035ff
Rewrite restream (#5106)
* Tear out restream config

* Rework birdseye restream

* Create go2rtc config handler

* Fix bug

* Write start script

* Rework style

* Fix python run syntax

* Output as json instead of yaml

* Put old live config back and fix birdseye references

* Fix camera webUI

* Add frigate env var subsitutions

* Fix webui checks

* Check keys

* Remove unused prest

* Fix tests

* Update restream docs

* Update restream docs

* Update live docs

* Update camera specific recommendation

* Update more docs

* add links for the docs

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>

* Update note about supported audio codecs

* Move restream to go2rtc

* Docs fixes

* Add verification of stream name

* Ensure that webUI uses camera name

* Update docs to reflect new live stream name

* Fix check

* Formatting

* Remove audio from detect

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>

* Fix docs

* Don't handle env variable substitution

* Add go2rtc version

* Clarify docs

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
2023-01-16 17:50:35 -06:00
Ryan Mounce
30f520f6f0
Patch nginx-vod-module to ignore RBSP trailing bits (#5114)
Works around https://github.com/blakeblackshear/frigate/issues/4572
2023-01-16 07:01:04 -06:00
Felipe Santos
daadd206dd
Update live view documentation to match newest go2rtc (#5083)
* Remove host network suggestion from docs

* Mention alternative network modes

* Update docs/docs/configuration/live.md

* Update docs/docs/configuration/live.md

* Wording tweaks

* Update docs/docs/configuration/live.md

* Update docs/docs/configuration/live.md

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2023-01-15 09:35:21 -06:00
Nate Meyer
60b2315028
Update library loading for tensorrt (#5087)
* Update library loading for tensorrt

* Add symlink to libnvrtc
2023-01-14 13:14:27 -06:00
Nicolas Mowen
1643b4d108
Clean up go2rtc logs to not show color text unicode (#5027)
* Use color logs for go2rtc

* Update docs to show need for formatted logs

* Fix log selector
2023-01-11 17:21:13 -06:00
Blake Blackshear
3cb96091ec
update before install (#4966) 2023-01-08 14:39:39 -06:00
Nicolas Mowen
5f4c439f57
Fix btbn pulling wrong build (#4961) 2023-01-08 09:23:58 -06:00
Blake Blackshear
1f963ec5aa
Fix raspberry pi hwaccel (#4955)
* use ffmpeg from raspbian repo

* dynamically choose timeout param

* invert logic

* Add hwaccel presets for rpi

Co-authored-by: Nick Mowen <nickmowen213@gmail.com>
2023-01-08 07:04:58 -06:00
Nate Meyer
8ac3114f9a
Cleanup Detector labelmap (#4932)
* Add missing labels to default labelmap.  Fill any holes with "unknown".  Remove unique labelmap for tensorrt.

* Replace "truck" with "car" on Openvino labelmap
2023-01-06 07:03:16 -06:00
Blake Blackshear
12235acd75
Build nginx with tmpfs (#4933)
* Update Dockerfile

* Update Dockerfile

* refactor into script and to be consistent

Co-authored-by: Sergey Krashevich <svk@svk.su>
2023-01-06 06:48:41 -06:00
Nate Meyer
3f05f74ecb
Nvidia TensorRT detector (#4718)
* Initial WIP dockerfile and scripts to add tensorrt support

* Add tensorRT detector

* WIP attempt to install TensorRT 8.5

* Updates to detector for cuda python library

* TensorRT Cuda library rework WIP

Does not run

* Fixes from rebase to detector factory

* Fix parsing output memory pointer

* Handle TensorRT logs with the python logger

* Use non-async interface and convert input data to float32. Detection runs without error.

* Make TensorRT a separate build from the base Frigate image.

* Add script and documentation for generating TRT Models

* Add support for TensorRT devcontainer

* Add labelmap to trt model script and docs.  Cleanup of old scripts.

* Update detect to normalize input tensor using model input type

* Add config for selecting GPU. Fix Async inference. Update documentation.

* Update some CUDA libraries to clean up version warning

* Add CI stage to build TensorRT tag

* Add note in docs for image tag and model support
2022-12-30 10:53:17 -06:00
Nicolas Mowen
7953d131ae
Fix monaco editor issues (#4724)
* Add sub filter for monaco editor

* Don't include files for unused languages

* Move necessary files and cleanup build

* Update sub filter for new location

* Still need to include default editor worker

* Fix error when model already exists
2022-12-17 17:55:41 -06:00
Nicolas Mowen
369299315f
Optimize nginx & recordings (#4688)
* Add segment duration metadata

* Use faststart only for kept segments

* Add more options for performance

* Build nginx locally

* Build nginx in dockerfile and enable threaded vod handling

* Use DASH instead of hls

* Allow player to continue on error

* Undo DASH change

* Fix typo

* Correct log

* Fix bad comments

* Fix indentation

* Preload stream

* remove unused

* Fix spacing

* Fix tabs / sspaces

* Retab

* More cleanup
2022-12-17 17:53:34 -06:00
Nate Meyer
ba3fbc99ba
Update method of aquiring signing keys for packages (#4649) 2022-12-09 06:39:02 -06:00
Felipe Santos
2a5ab77637
Log all services to memory (#4587)
* Log all services to RAM

* Fix tests workdir

* Rotate logs when they reach 10MB and keep only 1 archive

* Gracefully handle shutdown

* Add note about gracetime not working

* Fix logs permission, create fake logs for devcontainer

* Remove empty line

* Update docker/rootfs/etc/services.d/frigate/run

* Fix fake Frigate shebang
2022-12-07 07:47:40 -06:00
Felipe Santos
94a2b6bb88
Upgrade s6-overlay from 2.2.0.3 to 3.1.2.1 (#4584)
Also remove the unnecessary xz-utils from the final image.
2022-12-03 10:23:19 -06:00
Nate Meyer
e5fe323aca
Add OpenVino Detector (#3768)
* Initial work for adding OpenVino detector.  Not functional

* Load model and submit for inference.

Sucessfully load model and initialize OpenVino engine with either CPU or GPU as device.
Does not parse results for objects.

* Detection working with ssdlite_mobilenetv2 FP16 model

* Add OpenVIno support and model to docker image

* Add documentation for OpenVino detector configuration

* Adds support for ARM32/ARM64 and the Myriad X hardware

-  Use custom-built openvino wheel for all platforms
-  Add libusb build without udev for NCS2 support

* Add documentation around Intel CPU requirements and NCS2 setup

* Print all available output tensors

* Update documentation for config parameters
2022-12-03 10:19:34 -06:00
Nicolas Mowen
aaedd24f37
Add GPU stats to the /stats API and debug screen (#3931)
* Add ffprobe endpoint

* Get ffprobe for multiple inputs

* Copy ffprobe in output

* Fix bad if statement

* Return full output of ffprobe process

* Return full output of ffprobe process

* Make ffprobe button show dialog with output and option to copy

* Add driver names to consts

* Add driver env var name

* Setup general tracking for GPU stats

* Catch RPi args as well

* Add util to get radeontop results

* Add real amd GPU stats

* Fix missed arg

* pass config

* Use only the values

* Fix vram

* Add nvidia gpu stats

* Use nvidia stats

* Add chart for gpu stats

* Format AMD with space between percent

* Get correct nvidia %

* Start to add support for intel GPU stats

* Block out RPi as util is not currently available

* Formatting

* Fix mypy

* Strip for float conversion

* Strip for float conversion

* Fix percent formatting

* Remove name from gpu map

* Add tests and fix AMD formatting

* Add nvidia gpu stats test

* Formatting

* Add intel_gpu_top for testing

* Formatting

* Handle case where hwaccel is not setup

* Formatting

* Check to remove none

* Don't use set

* Cleanup and fix types

* Handle case where args is list

* Fix mypy

* Cast to str

* Fix type checking

* Return none instead of empty

* Fix organization

* Make keys consistent

* Make gpu match style

* Get support for vainfo

* Add vainfo endpoint

* Set vainfo output in error correctly

* Remove duplicate function

* Fix errors

* Do cpu & gpu work asynchonously

* Fix async

* Fix event loop

* Fix crash

* Fix naming

* Send empty data for gpu if error occurs

* Show error if gpu stats could not be retrieved

* Fix mypy

* Fix test

* Don't use json for vainfo

* Fix cross references

* Strip unicode still

* await vainfo response

* Add gpu deps

* Formatting

* remove comments

* Use empty string

* Add vainfo back in
2022-11-28 19:24:20 -06:00
Blake Blackshear
370276a7b6
Faster image builds with caching (#4491)
* fix makefile variable

* add branch for testing

* fix arm32 build

* use amd64 for web build

* install wheels in a separate layer for better parallel builds

* try build-push-action

* try using gh context

* use short sha

* cleanup
2022-11-23 20:00:45 -06:00
Felipe Santos
f4187d6b83
Reduce amount layers of the docker image (#4448)
* Reduce amount layers of the docker image

* Fix models file name
2022-11-21 19:31:39 -06:00
Felipe Santos
65825040a3
Improve the devcontainer experience (#3492)
* Make it easier to run the devcontainer

* Some more improvements

* Tidy up few other things

* Better name stages

* Fix CI

* Setup everything with one click

* Allow to set IMAGE_OWNER

* Change IMAGE_OWNER to IMAGE_REPO

* Fix CI with IMAGE_REPO

* Fix nodejs installation

* Test devcontainer build as part of CI

* Build devcontainer in its own job

* Fix devcontainer cli installation

* Fix devcontainer build

* Fix devcontainer build in CI again

* Enable buildkit only

* Increase coverage of devcontainer test

* Fix devcontainer start in CI

* Ensure latest version of docker compose is used

* Fix install compose action

* Disable CI stuff which does not work until we fix them
2022-11-20 07:34:12 -06:00
Blake Blackshear
253061ee5f Merge remote-tracking branch 'origin/master' into dev 2022-11-19 07:29:39 -06:00
Nicolas Mowen
a46c37018f
Using testing repo for hwaccel dependencies (#4368) 2022-11-19 07:21:43 -06:00
Blake Blackshear
a9d95b89e1
Web updates and fixes (#4411)
* update dependencies

* Bump loader-utils from 2.0.3 to 2.0.4 in /docs

Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update BASE_PATH replacement

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-17 07:05:27 -06:00
Nicolas Mowen
4eb3e98076
Update go2rtc, simplify manual stream, and support audio for MSE & WebRTC (#4391)
* Update go2rtc to rc3

* Simplify ffmpeg / audio conversions

* Set ffmpeg bin location

* Manually set video as copied

* Run go2rtc with env vars

* Remove manual ffmpeg declaration

* Enable force_audio by default

* Fix test
2022-11-16 06:29:47 -06:00
Felipe Santos
664e04836d
Remove wheels from final container (#4395) 2022-11-16 06:27:37 -06:00
Nicolas Mowen
c97aac6c94
Revamped debug UI and add camera / process info, ffprobe copying (#4349)
* Move each camera to a separate card and show per process info

* Install top

* Add support for cpu usage stats

* Use cpu usage stats in debug

* Increase number of runs to ensure good results

* Add ffprobe endpoint

* Get ffprobe for multiple inputs

* Copy ffprobe in output

* Add fps to camera metrics

* Fix lint errors

* Update stats config

* Add ffmpeg pid

* Use grid display so more cameras can take less vertical space

* Fix hanging characters

* Only show the current detector

* Fix bad if statement

* Return full output of ffprobe process

* Return full output of ffprobe process

* Don't specify rtsp_transport

* Make ffprobe button show dialog with output and option to copy

* Adjust ffprobe api to take paths directly

* Add docs for ffprobe api
2022-11-13 12:48:14 -06:00
Nicolas Mowen
47c1985c26
Go2rtc update and MSE improvements (#4309)
* Update go2rtc to rc2

* Update MSE player

* Update mse player

* Update mse player

* Close stream when pausing
2022-11-08 19:48:36 -06:00