Commit Graph

181 Commits

Author SHA1 Message Date
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
Nicolas Mowen
02caeb9f87
Update go2rtc to rc1 (#4252) 2022-11-05 09:13:03 -05:00
Nicolas Mowen
d8123d2497
Add go2rtc and add restream role / live source (#4082)
* Pull go2rtc dependency

* Add go2rtc to local services and add to s6

* Add relay controller for go2rtc

* Add restream role

* Add restream role

* Add restream to nginx

* Add camera live source config

* Disable RTMP by default and use restream

* Use go2rtc for camera config

* Fix go2rtc move

* Start restream on frigate start

* Send restream to camera level

* Fix restream

* Make sure jsmpeg works as expected

* Make view rspect live size config

* Tweak player options to fit live view

* Adjust VideoPlayer to accept live option which disables irrelevant controls

* Add multiple options from restream live view

* Add base for webrtc option

* Setup specific restream modules

* Make mp4 the default streaming for now

* Expose 8554 for rtsp relay from go2rtc

* Formatting

* Update docs to suggest new restream method.

* Update docs to reflect restream role

* Update docs to reflect restream role

* Add webrtc player

* Improvements to webRTC

* Support webrtc

* Cleanup

* Adjust rtmp test and add restream test

* Fix tests

* Add restream tests

* Add live view docs and show different options

* Small docs tweak

* Support all stream types

* Update to beta 9 of go2rtc

* Formatting

* Make jsmpeg the default

* Support wss if made from https

* Support wss if made from https

* Use onEffect

* Set url outside onEffect

* Fix passed deps

* Update docs about required host mode

* Try memo instead

* Close websocket on changing camera

* Formatting

* Close pc connection

* Set video source to null on cleanup

* Use full path since go2rtc can't see PATH var

* Adjust audio codec to enable browser audio by default

* Cleanup stream creation

* Add restream tests

* Format tests

* Mock requests

* Adjust paths

* Move stream configs to restream

* Remove live source

* Remove live config

* Use live persistence for which view to use on each camera

* Fix live sizes

* Only use jsmpeg sizes for jsmpeg live

* Set max live size

* Remove access of live config

* Add selector for live view source in web view

* Remove RTMP from default list of roles

* Update docs

* Fix tests

* Fix docs for live view modes

* make default undefined to avoid race condition

* Wait until camera source is loaded to avoid race condition

* Fix tests

* Add config to go2rtc

* Work with config

* Set full path for config

* Set to use stun

* Check for mounted file

* Look for frigate-go2rtc

* Update docs to reflect webRTC configuration.

* Add link to go2rtc config

* Update docs to be more clear

* Update docs to be more clear

* Update format

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

* Update live docs

* Improve bash startup script

* Add option to force audio compatibility

* Formatting

* Fix mapping

* Fix broken link

* Update go2rtc version

* Get go2rtc webui working

* Add support for mse

* Remove mp4 option

* Undo changes to video player

* Update docs for new live view options

* Make separate path for mse

* Remove unused

* Remove mp4 path

* Try to get go2rtc proxy working

* Try to get go2rtc proxy working

* Remove unused callback

* Allow websocket on restrea dashboard

* Make mse default stream option

* Fix mse sizing

* don't assume roles is defined

* Remove nginx mapping to go2rtc ui

Co-authored-by: Felipe Santos <felipecassiors@gmail.com>
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
2022-11-02 06:36:09 -05:00
uvjustin
c461c9e700
Set vod_ignore_edit_list option (#3710) 2022-08-26 06:33:16 -05:00
uvjustin
8c45dab9b8
Handle spaces in labels (#3679)
* Unquote label in flask routes
Encode label in Camera.jsx

* Don't use preprocessor

* Update nginx location for cacheable images
2022-08-25 07:32:30 -05:00
Nick Mowen
e649a1eb98 Use btbn build for ffmpeg since jellyfin has compatibility issues with rtsp-simple-server 2022-08-24 06:43:42 -05:00
Stéphane Graber
5577ef081f docker: Add VAAPI to arm64
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
2022-08-13 06:47:29 -05:00
Blake Blackshear
5d8c0e43c2 try ffmpeg5 again 2022-07-05 11:54:21 -05:00
Blake Blackshear
560ee0104d arm32 compat 2022-07-04 09:06:26 -05:00
Blake Blackshear
162c0147d2 use jellyfin for all arch 2022-07-03 10:12:00 -05:00
Blake Blackshear
5e82eaed88 switch back to ffmpeg 4.4.1 2022-06-28 06:50:19 -05:00
Blake Blackshear
ba119e4f96 revert back to ffmpeg 4.3.2 2022-06-10 07:38:26 -05:00
Blake Blackshear
75c2feb387 ffmpeg5 and intel va driver 2022-06-09 07:16:21 -05:00
Blake Blackshear
4b81c88794 use specific jellyfin-ffmpeg build 2022-05-26 10:02:43 -05:00
Blake Blackshear
ca7bad8909 get ingress to play nice with vite 2022-05-19 07:31:51 -05:00
Blake Blackshear
16057cdef7 only use jellyfin-ffmpeg for amd64 2022-05-14 06:36:38 -05:00
Blake Blackshear
b75929a846 add all jellyfin-ffmpeg binaries to path 2022-04-26 07:24:30 -05:00
Blake Blackshear
e33cd442cd ensure params get passed to api for jpg 2022-04-26 07:24:30 -05:00
Blake Blackshear
91539de3ff optimize caching of image data from api 2022-04-26 06:36:26 -05:00
Blake Blackshear
f536494a38
Multi arch image with nvidia decode support
* build working

* update makefile

* use jellyfin-ffmpeg for all arch

* just build web once for all arch

* update actions build

* update docs
2022-04-24 13:52:12 -05:00
Blake Blackshear
0044f73d7a armv7 compatibility 2022-04-16 09:08:10 -05:00
Sebastian Englbrecht
d995761419 Prepare mypy for typing checks 2022-04-15 07:01:43 -05:00
herostrat
164e9b7eb8
Use requirement file for pip installs (#3090)
Co-authored-by: Sebastian Englbrecht <sebastian.englbrecht@kabelmail.de>
2022-04-12 07:21:21 -05:00
Blake Blackshear
e724fe3da6 add endpoint to submit to plus 2022-04-10 09:11:16 -05:00
Blake Blackshear
1d8f1b24a9 update to node 16 2022-03-11 07:49:06 -06:00
Blake Blackshear
ffee9c8065 update makefile and docker dir 2022-03-11 07:49:06 -06:00
Blake Blackshear
1c9ba11e07 swr events refactor 2022-03-11 07:49:06 -06:00
Blake Blackshear
d03865d1a5 add amd64 specific packages to container 2022-03-11 07:49:06 -06:00
Blake Blackshear
20b4b503f0 refactor dockerbuild for multiarch 2022-02-21 06:51:33 -06:00
Blake Blackshear
0bef16bb17 upgrade npm in dev container 2022-02-18 21:18:26 -06:00
Blake Blackshear
a2ddb12eb3 limit vod response cache 2022-02-18 21:18:26 -06:00
Blake Blackshear
0f5dfea9de add support for rockchip hwaccel 2021-09-25 08:25:00 -05:00
Blake Blackshear
1049673413 run nginx as root
this addresses an issue many have had when using network shares
2021-09-20 19:02:59 -05:00
Blake Blackshear
46fe06e779 tweak vod settings for varying iframe intervals 2021-08-28 21:26:23 -05:00
Blake Blackshear
0d352f3d8a use model from frogfish release 2021-08-28 08:04:29 -05:00
Blake Blackshear
189b9c6648 use a nginx internal redirect 2021-08-11 06:22:26 -05:00
Jason Hunter
8fd12f001b add secure token module to NGINX in order to pass authSig down to segment files 2021-08-07 15:51:16 -05:00
Jason Hunter
1181620f33 bump VOD max clips 2021-08-07 15:51:16 -05:00
Blake Blackshear
dc759a3e56 use new pycoral libraries 2021-08-07 15:34:55 -05:00
Blake Blackshear
4818c08fe2 update for coral updates 2021-08-07 15:33:10 -05:00
Blake Blackshear
1a3567c5d0 arch specific s6-overlay 2021-07-10 06:40:50 -05:00
Blake Blackshear
3712a8ab80 use kisak-mesa repo 2021-07-03 12:38:37 -05:00
Blake Blackshear
2eddbe3d03 use intel repo for va drivers 2021-07-03 12:38:37 -05:00
Blake Blackshear
46dad7b58d use non-free va driver fixes #581 2021-07-03 12:38:37 -05:00
Blake Blackshear
eb5e6d19fa update to 4.3.2 2021-07-03 12:38:37 -05:00
Blake Blackshear
17944882f4 formatting 2021-07-03 12:38:37 -05:00
Jason Hunter
c664bd63f6 initial conversion to pydantic 2021-06-24 06:53:05 -05:00
Sebastian Englbrecht
9b3a649f17 Do apt update before upgrade 2021-06-19 06:34:20 -05:00
Blake Blackshear
cbdf2c2c71 remove gevent fixes #920 2021-06-14 07:48:35 -05:00
Blake Blackshear
700f25abc3 removing old node relay 2021-06-12 07:23:14 -05:00
Blake Blackshear
7aaf5bd29f remove node jsmpeg server 2021-06-12 07:23:14 -05:00
Blake Blackshear
fd51c7a955 development tweaks 2021-06-12 07:23:14 -05:00
Blake Blackshear
46e5a042ae adding s6-overlay and running jsmpeg 2021-06-12 07:23:14 -05:00
Blake Blackshear
7309c06be8 add jsmpeg relay 2021-06-12 07:23:14 -05:00
Jason Hunter
aab6a00e4c Add support for NGINX VOD Module 2021-05-22 07:48:44 -05:00
Mitch Ross
ebb6d348a3
feat(web): Delete events from Event page and API (#991)
Co-authored-by: Scott Roach <scott@thinkpivot.io>
Co-authored-by: Paul Armstrong <paul@spaceyak.com>
2021-05-12 08:19:02 -07:00
Jason Hunter
480970c799 remove mqtt-cli 2021-05-04 17:29:23 -05:00
Jason Hunter
1c0162c181 fix devcontainer setup 2021-05-04 17:29:23 -05:00
Blake Blackshear
b8f72a5bcb add devcontainer setup 2021-02-25 07:00:59 -06:00
Blake Blackshear
4a8d998afe unpin numpy 2021-02-20 08:20:17 -06:00
Blake Blackshear
50b42eb6fe add gevent to prebuilt wheels 2021-02-20 08:20:17 -06:00
Blake Blackshear
22461d1728 simple echo websocket working 2021-02-20 08:20:17 -06:00
Blake Blackshear
144aff9b4e pin numpy 2021-01-26 21:40:33 -06:00
Blake Blackshear
ccb668a1b6 no longer need special aarch64 wheels build 2021-01-26 21:40:33 -06:00
Blake Blackshear
0989c64eab versioning wheels image 2021-01-26 21:40:33 -06:00
Blake Blackshear
c082fc5cb2 move wheels to build container 2021-01-26 21:40:33 -06:00
Blake Blackshear
c709851888 move setproctitle to prebuilt wheel location 2021-01-26 21:40:33 -06:00
Blake Blackshear
b022bec1fa switch to docker based web builds 2021-01-26 21:40:33 -06:00
Patrick Decat
232fa1ffe8 Add missing migrations in docker images 2021-01-26 21:40:33 -06:00
Paul Armstrong
c618867941 feat!: web user interface 2021-01-26 21:40:33 -06:00
Blake Blackshear
c770470b58 add database migrations 2021-01-26 21:40:33 -06:00
Nat Morris
4619836122 Set titles for forked processes 2021-01-26 21:40:33 -06:00
Blake Blackshear
151f9fb2ee add qsv support to amd64 image 2021-01-26 21:40:33 -06:00