* Display message in desktop events list when no events exist
* Add message for when no events are found on plus view
* validating check
* activity indicator check
* clarify error message
* Improve export handling when errors occur
* Fix mobile zooming
* Handle recordings buffering
* Cleanup
* Url encode export name
* Start with actual name in input
* Fix buffering
* Camera settings view for alerts/detections
* flxes, beautifying, zone renaming, clean up
* replace underscores with spaces in zone names
* replace underscores with spaces in labels
* adds adjust_time which allows users to fix an issue with onvif authentication where time is not syncrhonized
* updated adjust_time to ignore_time_mismatch to make it clearer what this option does
* adds ignore_time_mismatch to the reference.md and adds a line about the security risk this can introduce as well as the recommendation to setup NTP for both ends.
* fix format error
* happy now linter?
* white space
* Update docs/docs/configuration/reference.md
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
---------
Co-authored-by: Stephen Butler <stephen.butler@ni.com>
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Only keep 2x detect fps frames in SHM
* Don't delete previous shm frames in output
* Catch case where images do not exist
* Ensure files are closed
* Clear out all frames when shutting down
* Correct the number of frames saved
* Simplify empty shm error handling
* Improve frame safety
* Use full resolution aspect for main camera style in history view
* Only check for offline cameras after 60s of uptime
* only call onPlaying when loadeddata is fired or after timeout
* revert to inline funcs
* Portal frigate plus alert dialog
* remove duplicated logic
* increase onplaying timeout
* Use a ref instead of a state and clear timeout in AutoUpdatingCameraImage
* default to the selected month for selectedDay
* Use buffered time instead of timeout
* Use default cursor when not editing polygons
* Revert "Use latest 5.1 ffmpeg update (#12243)"
This reverts commit 93e08688be.
* Revert "Change qsv device arg to standard hwaccel arg (#12249)"
This reverts commit 56b4a551dc.
* Use different repo for build
* Manually set current time when selecting event
* Make it clear which camera has no preview
* Make it clear which camera has no preview
* Format camera name
* Show number of items instead of dot
* Don't call error when connection has been closed on purpose
* Use motion icon for motion
* Show text on tablets as well
* Update segment even when number of active objects is the same
* add score to frigate+ chip
* Add support for selecting zones
* Add api support for filtering on zones
* Adjust UI
* Update filtering logic
* Clean up
* Only set stalled error when player is visible
* Show activity indicator before live player starts playing
* remove comment
* keep gradients when still image is showing
* fix chips
* red dot and outline
* intentionally handle queues during shutdown and carefully manage shutdown order
* more carefully manage shutdown to avoid threadlocks
* use debug for signal logging
* ensure disabled cameras dont break shutdown
* typo
* Allow deleting failed in progress exports
* Fix comparison and preview retrieval
* Fix stretching of event cards
* Reset edit state when group changes
* Allow specifying group
* Update authentication.md to note port 8080 vs 5000
* Update docs/docs/configuration/authentication.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* implement self signed cert and monitor/reload
* move go2rtc upstream to separate file
* add directory for ACME challenges
* make certsync more resilient
* add TLS docs
* add jwt secret info to docs
When serving Frigate at a subpath, the paths that show in the URL bar
and that wind up in your browser history are anchored at the web root.
I.e. you go to `https://example.com/frigate/`, it changes to
`https://example.com/`, and clicking around works as expected, but the
`frigate/` prefix is gone.
It's confusing if you don't know that the URL's are entirely virtual.
Also, your browser history is useless, since the URL's point to e.g.
`https://example.com/#kitchen`, but visiting that URL will not hit
`/frigate/` at all.
Most of the work is already done. Nginx injects javascript to set
`window.baseURL` based on the X-Ingress-Path header. This change passes
that to BrowserRouter, so that it'll be part of the URL's it shows.
Fixes#4526
* Restrict nginx to 4 processes if more are available
* Fix bash
* Different sed structure
* Limit ffmpeg thread counts for secondary ffmpeg processes
* Add up / down keyboard shortcut
* Update config version to be stored inside of the config
* Don't remove items from list when navigating back
* Use video api instead of webps for live current hour filmstrip
* Check that the config file is writable
* Show camera name when camera is offline
* Show camera name when offline
* Cleanup
* Add support for TensorRT v10 (multiple api calls have changed)
* Remove unnecessary size check in TensorRT v10 block
* Refactor to reduce code duplication
* Fix wrong function name in new _get_binding_dtype function and only return input check (not assertion) in new _binding_is_input function
* Add space around TRT_VERSION variable assignment (=) to respect linting
* More linting fix
* Update frigate/detectors/plugins/tensorrt.py
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* More linting
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Minimal config in installation guide (#11339)
+ Adds a subsection to the installation guide that mentions the requirement for a minimal config to start Frigate successfully.
+ Adds a warning not to proceed any further into the guide without this valid config
* Add spacing between Markdown title and text
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Remove subsection in favour of exclusively adding a warning
* Adjust wording for the warning
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Respect classname when no preview is found
* Don't check for go2rtc info if camera is not restramed
* Show error banner when playback fails
* Add keyboard shortcut for fullscreen
* Set max width on the problems area in status bar and use unique keys so they do not duplicate
* Fix possibly missing media info
* Show full row of items on tablet
* remove debugging logic
* reload the window on 401
* backend apis for auth
* add login page
* re-enable web linter
* fix login page routing
* bypass csrf for internal auth endpoint
* disable healthcheck in devcontainer target
* include login page in vite build
* redirect to login page on 401
* implement config for users and settings
* implement JWT actual secret
* add brute force protection on login
* add support for redirecting from auth failures on api calls
* return location for redirect
* default cookie name should pass regex test
* set hash iterations to current OWASP recommendation
* move users to database instead of config
* config option to reset admin password on startup
* user management UI
* check for deleted user on refresh
* validate username and fixes
* remove password constraint
* cleanup
* fix user check on refresh
* web fixes
* implement auth via new external port
* use x-forwarded-for to rate limit login attempts by ip
* implement logout and profile
* fixes
* lint fixes
* add support for user passthru from upstream proxies
* add support for specifying a logout url
* add documentation
* Update docs/docs/configuration/authentication.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Update docs/docs/configuration/authentication.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Update to frigate+ documentation
Added shortcuts + advices for objects partly out of frame and the 'difficult' tag.
* Update docs/docs/plus/improving_model.md
* Update docs/docs/plus/improving_model.md
---------
Co-authored-by: Blake Blackshear <blake.blackshear@gmail.com>
* use prettier-plugin-tailwindcss to keep class names organized
* use prettierrc file to ensure formatting on save works with vscode
* classname reorder with prettier-plugin-tailwindcss
* Ensure camera activity is up to date
* Persist playback rate between cameras
* Add setting for default playback rate
* Fix audio events saving image
* Formatting
* Use select component
* Fix external events saving
* Only show relevant labels
* Set on recordings view too
* Fix video control width on motion page
* use overlay so player state is maintained between camera switches
* use overlay so player state is maintained between camera switches
* mobile only
* Formatting
* Use higher amount
* Only wrap when needed
* add scrollbar on ptz presets dropdown
* use cn function for class names throughout
* Revert "add scrollbar on ptz presets dropdown"
This reverts commit 2cee93dc3e.
* add ability to parse and upload image from recording to frigate+
* Show dialog with current frame to be uploaded
* Implement uploading image in frontend
* Cleanup
* Update title
* revamp object debug view
* fix vite
* remove console log
* don't display empty fields
* clarify masks as motion masks
* add descriptions
* color and spacing
* add sub_label to camera activity
* add sub_label to type
* rename to debug
* Better scaling for frigate+ dialog and thumbnails
* Always show live objects chip
* Handle sub labels
* Send sub label correctly
* Formatting
* Undo vite
* Update web/src/utils/iconUtil.tsx
* Send camera state to dispatcher
* Fix logic
* Cleanup
* Send camera activitiy in on connect
* Support reading initial camera state
* Fix key
* Formatting
* Sorting
* base recordings and live views off of actual video resolution
* don't set for jsmpeg
* reset when changing main cam
* rename
* Only use resolution for main camera
* fix lint
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Adjust number of ticks to have consistent X axes
* Revert "Adjust number of ticks to have consistent X axes"
This reverts commit 941e296750.
* set rotate instead
* Update docs for alerts and event review
* Add docs for camera groups
* Update reference config with new config values
* Remove env variable requirement
* Add to sidebar
* Update snapshot docs
* add zones example to detection docs too
* Generalize the zone docs
* Don't request preview for current hour and fix content type
* Send before / after on messages
* Send before / after for end
* Handle specific cases
* remove log
* Fix update type
* Make no thumb slider height dynamic
* Use existing switch component
* Use existing switch component for general filter content
* Show message when no reordings found for time
* Don't show while scrubbing
* Fix key error
* Fix background color for controls on motion page
* Save review thumbs in dedicated folder
* Create exports table
* Save exports to DB and save thumbnail for export
* Save full frame always
* Fix rounded corners
* Save exports that are in progress
* No need to remove spaces
* Reorganize apis to use IDs
* Use new apis for frontend
* Get video playback working
* Fix deleting and renaming
* Import existing exports to DB
* Implement downloading
* Formatting
* initial working konva
* working multi polygons
* multi zones
* clean up
* new zone dialog
* clean up
* relative coordinates and colors
* fix color order
* better motion tuner
* objects for zones
* progress
* merge dev
* edit pane
* motion and object masks
* filtering
* add objects and unsaved to type
* motion tuner, edit controls, tooltips
* object and motion edit panes
* polygon item component, switch color, object form, hover cards
* working zone edit pane
* working motion masks
* object masks and deletion of all types
* use FilterSwitch
* motion tuner fixes and tweaks
* clean up
* tweaks
* spaces in camera name
* tweaks
* allow dragging of points while drawing polygon
* turn off editing mode when switching camera
* limit interpolated coordinates and use crosshair cursor
* padding
* fix tooltip trigger for icons
* konva tweaks
* consolidate
* fix top menu items on mobile
* Add verification for required zone names
* Make global object masks use relative coordinates as well
* Ensure event image cleanup doesn't fail
* Return passed value
* Make buttons consistent and have hover state
* Use switch for camera to be consistent
* Use everywhere and remove unused
* Use green for normal stats color
* Fix logs copy icon
* Remove warnings from pydantic serialization
* Ignore warnings
* Fix wsdl resolution
* Fix loading on switch
* Update web deps
* Fix tooltip on storage page
* Always show video controls even when zooming
* Get video controls working when video is paused
* Fix control hovering
* Add loading indicator to logs tab
* Show metrics correctly when hovering graph
* Show loading indicators for previews on recordings page
* Remove vitest update
* remove unused
* Make volume props optional
Relying on importlib to resolve the path to the wsdl directory is more
robust, since it traverses all site-packages directories, that are part
of the PYTHONPATH.
* Update reference config to reflect new config
* Migrate 0.13 config to match 0.14 config style
* Overwrite existing config
* Adjust config schema to remove events required zones and include reviews
* Update object config to check correct required zones config
* Refactor reviews to remove motion and only create review segments in expected circumstances
* Cleanup
* Formatting
* Fix update ordering
* Update pydantic
* Remove rtmp references as part of migration
* Catch file not found for alert frame
* fix warning
* Improve event switching speed
* Fix icon colors
* Only show frigate+ page when frigate+ is enabled
* Add link from reecordings to live as well
* Update review maintainer to save events when ongoing
* Handle previews for in progress review items
* Reset DB items in app
* Handle in progress review items
* Scroll back down to selected event item
* Handle undefined end time
* Formatting
* remove unused
* Make export handles have full resolution
* reduce preview thumbnail props
* fix missing return
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Clarify Proxmox LXC instructions
There is a lot of confusing information online. This provides some
simple general guidelines to help people get started.
* Update docs/docs/frigate/installation.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Reference #5773 instead of #1111
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Cleanup live activity indicators for cameras
* Rename to reviews and redirect events to reviews
* Use reviews
* Remove plural
* Simplify recordings view
* Adjust icon
* Handle zones and masks as relative coords
* Ensure that zone coords are saved as relative
* Get motion mask working with relative coordinates
* Rewrite object mask to use relative coordinates as well
* Formatting
* Fix always trying to convert
* fix mask logic
* Adjust outline and structure to match designs
* More color changes to fit design
* Properly parse go2rtc severity
* Add ability to filter by clicking item
* Implement sheet / drawer for viewing full log
* Add toast and filtering
* Add links to docs when specific log items are selected
* Cleanup log seeking
* Use header in layout
* Fix mobile menus
* Fix safari theme
* Hide rings
* Theme adjustment
* Implement camera graphs
* Cleanup naming
* Cleanup rendering
* Cleanup spacing
* Fix audio name
* theme updates to match design corretly
* Mobile color fixes
* Mobile color fixes
* Rename graph
* Use separate view for general metrics
* Get storage graph formatted
* Show camera storage usage
* Cleanup ticks
* Remove storage link
* Add icons and frigate logo
* Undo
* Use optimistic state for metrics toggle
* Use optimistic state and skeletons for loading
* Reorganize stats and show graphs in system metrics
* Break apart all cpu / mem graphs
* Auto update stats
* Show camera graphs
* Get system graphs working for inference time
* Update stats every 10 seconds, keeping the last 10 minutes
* Use types for thresholds
* Use keys api
* Break system metrics into different pages
* Add dialog for viewing and copying vainfo
* remove unused for now
* Formatting
* Make tooltip match theme
* Make betters color in light mode
* Include gpu
* Make scaling consistent
* Fix name
* address feedback
* Redesign log page to have formatting
* Support other log types as well
* fix border
* Support log data format
* Only load necessary logs
* Load incrementally
* Cleanup
* Cleanup
* Render all items
* avoid flashing scroll to bottom
* Fix not listening at first
* Always ensure logLine is defined
* Group logs based on timestamp
* Formatting
* remove scrollbar
* Don't repull when there are no items to pull
* Add newline to end
* Fix log lines missing
* typo
* Add button to link to recordings from camera live view
* Change name and show text on both
* Use history button next to back button
* Match designs better
* Only update frame time if it is older
* Support manual detections as review items
* Don't handle api detections in recordings
* Store recordings for manual events
* Show frigate features in bottom sheet on mobile
* Use flex wrap on mobile so the ptz icons are not cutoff
* Support opening pip from live view
* Remove unused
* Separate settings items so layout is more consistent
* Convert settings on mobile to drawer
* Fix sizing on mobile and make scrollable
* remove padding
* Use dialog instead of popover
* Don't focus on first item
* Simpler tab fix
* fix wrong segments when changing filters in motion only mode
* pixel alignment, better outlines, and more figma matching
* fix stats from crashing the ui
* separate layout from aspect classes
* check for invalid value
* avoid undefined classnames
* Use timerange everywhere and ensure recordings has last 24 hours
* Pause recording when selecting timeline
* Fix loading layout
* Fix updating current time not always working
* Simplify dynamic video player
* Clean up desktop sizing
* Fix current hour
* Make padding consistent
* Improve spacing for extra cameras
* Make back button consistent
* Fix preview player not jumping to correct time
* Dont use useEffect due to preview changing
* Simplify
* Fix transition
* Fix drawer not being scrollable
* Fix margin
* Use 2 columns for large mobile devices
* Move padding
* Add review summary to mobile calendar
* Make header spacing consistent between pages
* remove red
* Only show back button text on desktop
* Add mobile camera drawer to separate component
* Use bottom sheet for export on mobile
* Add intermediary mobile bottom sheet
* fix filter
* Fix mobile layout jumping
* Fix desktop vertical camera view
* Fix horizontal camera list
* Add overlay instead of using same button for timeline exports
* Don't use native hls for now
* Fix export bottom sheet
* Fix scrolling
* Simplify checks
* Adjust hls compat approach
* Fix events shadow
* Make corners consistent
* Make corners consistent
* fix max drawer height
* Use separate buttons for export control
* Add icons
* Fix list views
* Fix new items to review
* bottom padding on bottom sheets
* bottom padding on bottom sheets
* Add dialog to export recordings
* Add export dialog functionality
* Add ability to name exports
* Add ability to choose custom time range on timeline
* Add ability to choose custom time range on timeline
* Add custom time selection
* Make hot keys optional for typing name of export
* Tweaks to dialog
* Tweaks to dialog
* round corners more
* Final tweaks
* Use full width top bar
* Make each item in review filter group optional
* Remove export creation from export page
* Consolidate packages and fix opening recording from event
* Use common type for time range
* Move timeline to separate component
* Add events list view to recordings view
* Fix loading of images
* Fix incorrect labels
* use overlay state for selected timeline type
* Fix up for mobile view for now
* replace overlay state
* fix comparison
* remove unused
* handle motion timestamps with ranges
* check for overlaps when checking segment for events
* rename motion color vars to significant_motion for consistency
* safelist significant_motion
* rename vars for clarity and use timeout instead of interval
* Use green chip instead of dimming to show that item has been reviewed
* Redesign log page to use similar style to events
* Use icon only in mobile
* Remove unused
* Move controls to separate component and make features configurable
* Allow playback on motion screen
* Simplify layout
* Fix seeking
* Fix playback
* fix preview scrubbing
* Fix player controls visibility
* Use opacity for both dark and light mode
* add function to get visible timeline duration
* Don't show minimap when minimap bounds exceed timeline area
* when minimap is hidden, only scroll timeline when needed
* observe only when not showing minimap
* no need to duplicate observer
* fix out of order param
* timeline utils hook props
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* implement summary timeline
* implement summary timeline
* merge dev
* conditionally attach listeners only when dragging
* set up listeners with a ref
* Fix selected items text
* Use action icons from design and fix spacing
* Fix icons for live grid
* Fix viewed select api
* Setup default theme as system
* Make conig editor respect system theme
* Fix plus submission dialog
* Different layout for portrait recordings
* Fix now preview found pulsing
* Fix bug with uneven milliseconds
* Improve consistency of video scaling
* Update previews on the hour
* Allow tap to toggle controls so zooming still works
* Use hash location insteaad of state for live camera view
* Add typing
* Show skeleton until video players finishes loading
* Clean up android logic
* Ensure mobile view video is consistent
* Cleanup
* Only show when not scrubbing
* Don't use loading
* Start preview at correct time too
* Fix react race condition
* Be wait for seek to show video player
* use a single source of truth for scrubbing
* simplify controller state
* Cleanup scrubbing logic
* Apply same logic to mobile
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Use dynamic imports to reduce initial load times
Remove videojs
* Convert to using hls.js instead of videojs
* Improve mobile controls experience
* Cleanup
* Ensure playback rate stays teh same when source changes
* Use webp for latest camera image
* Switch to hls.js on error
* Don't rerun error if hls already tried
* Fix error checking
* also check for media decode error to fallback to HLS
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Use skeleton for gif loading
* cache gifs as well
* Show skeleton when switching previews
* Fix touch controls for mobile
* Fix android mobile scrub logic
* Cleanup
* initial try
* add birdseye
* remove vite
* cleanup
* memoize
* remove console
* ensure birdseye is actually enabled in config
* birdseye first in select list and fix jsmpeg player size
* add minor ticks to timeline
* don't display motion events on veritcal bars on motion timeline
* color tweaks and spacing on config editor
* pad start and end of timeline to ensure handlebar is always visible
* Write preview frames as webp instead of jpg and ensure webp are cached in nginx
* Support preview player that shows current hour images
* Update to get preview player working
* Use timestamp based recordings check instead of calendar
* Start motion review from current time
* Adjust layout
* Use preview players for previews
* remove vite
* Cleanup
* Fix up the layout
* Cleanup review items
* Fix spacing
* Fix -1 text
* Cleanup scroll
* Show activity indicator when review items are null
* Show no preview text when not found
* Add padding to buttons
* Simplify comparisons
* rename docker image tags in configuration docs for jetson, add correct image in sample codeblocks, fix typo in 'come'
The image names/tags for Jetson instructions were incorrect. I have updated the docs to point to the correct images.
* revert jetson docs phrasing to properly refer to Jetpack docker images
* Increase duration of alerts and detections
* Add key
* Fix cancel button
* Fix motion review when switching days
* Add reset buttons and make calendar apply immediately
* Adjust apis for motion and audio activity
* Write review thumbs as webp and reduce size
* Cleanup to use new preview video player
* Make it so motion persists the selected time
* Don't jump when player first starts
* Get autoplay working right
* Break preview only video player out
* Simplify
* Load after current preview changes
* Clear out waiting for seek state
* Start at correct time of hour
* Fix layout for tall video
* Fix switching between different hours
* Simplify book keeping of different time ranges
* Rewrite player to handle changing of previews outside of video player
* Simplify switching between cameras
* Fix previews causing cameras to not load
* Simplify listeners
* Always clear existing listener
* Save numbers as int instead of string
* Fix hover logic
* Fix delay for new alerts
* Fixup dialog and marking item as uploaded
* Make preview progress larger and easier to grab
* Allow hovering to control preview on desktop
* Add dialog for creating new camera group
* Support adding of camera groups and dynamically updating the config
* Support deleting and edit existing camera groups
* Don't show separator if user has no groups
* Formatting
* fix background
* Use different cursor for dragging preview
* Improve filters UI and add audio labels
* Use switch and adjust colors
* Disable chromecast button and remove dimming
* Change marked reviewed text
* mark items as reviewed when they are opened
* Update api to use json and add button to mark all as reviewed
* fix api so last24 hours has its own review summary
* fix sidebar spacing
* formatting
* Bug fixes
* Make motion activity respect filters
* dynamically manage aspect ratio
* full size
* always use camera aspect ratio for mobile
* no need for different handling for pano cams
* don't set aspect ratio on fullscreen
* Refactor activity api to send motion and audio data
* Prepare for using motion data timeline
* Get working
* reduce to 0
* fix
* Formatting
* fix typing
* add motion data to timelines and allow motion cameas to be selectable
* Fix tests
* cleanup
* Fix not loading preview when changing hours
* Split recording view for mobile and desktop and get desktop working
* Get stuff working well
* Handle onclick for video
* Fix camera grid
* set onclick
* Adjust remaining summary items when items are marked as reviewed
* Add api for filtering and show correct number when filtering
* Fix default group config
* Update review summary when data is reloaded
* Fix quick items not getting reviewed
* Add camera group config
* Add saving of camera group selection
* Implement camera groups in config and live view
* Fix warnings
* Add tooltips to camera group items on desktop
* Add camera groups to the filters for events
* Fix tooltips and group selection
* Cleanup
* adjust segment math
* simplify interp and fix math
* fix math and update dependency
* push debug
* Revert "push debug"
This reverts commit 07c171b341.
* Break detection grid into separate function
* Implement backward preview jump and jump lockout
* ensure lockout is engaged when starting
* Add preview only mode to make loading more efficeint
* remove scrollbar and match gaps/margins with live view
* Rewrite dynamic player to use html video for preview and fix grid gaps
* consistent check for aspect ratio for tall cameras
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Get live camera view working
* Get ptz working
* Add button for ptz presets
* Add camera feature buttons
* Add button for camera audio
* Cleanup
* Cleanup mobile live
* Only use landscape check on mobile
* Implement context menu for batch operations and implement apis
* reduce preview calculations on rerenders
* Add button to mark above items as reviewed
* Use context menu for mark as reviewed
* Cleanup
* adapt timeline to mobile
* remove unused
* tweaks
* pointer cursor on segments
* make full recordings view look better on mobile
* explicitly set timeline width for md
* button positioning
* Simplify nav components
* Allow ability to choose live layout on mobile
* Combine event views
* Undo vite
* Fix autoplay
* Remove import
* Show filters on mobile view
* Spacing
* Don't separate properties
* make event bars clickable
* outline and scroll when segment is clicked
* match outline colors to event type
* hover thumbnails
* make event bars clickable
* outline and scroll when segment is clicked
* match outline colors to event type
* hover thumbnails
* fix merge from rebase
* remove minimap opacity classes
* live player outline colors
* safelist shadow classes
* Update installation.md
According to the v13 release the config.yml mapping needs to be the entire directory and not only the config.yml file
* Update docs/docs/frigate/installation.md
---------
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
Customizing only the detector model path results in the warning
"Customizing more than a detector model path is unsupported." because
`{} is not {}` evaluates to True
* don't load metadata until image has loaded
* correct class name and remove lazy loading pkg
* try refs
* hook
* don't load metadata until image has loaded
* correct class name and remove lazy loading pkg
* try refs
* hook
* don't show chips and date when image is loading
* add skeleton and change observer threshold
* remove debug
* use skeleton for live view too
* old activity indicator looks better on live
* fix gradients and lazy load with skeleton
* fading effects
* Use a rolling average of iou to determine if an object is no longer stationary
* Use different box variation to designate when an object is stationary on debug
* In progress
* Use average of boxes instead of average of iou
* Update frigate/track/norfair_tracker.py
Co-authored-by: Blake Blackshear <blake@frigate.video>
---------
Co-authored-by: Blake Blackshear <blake@frigate.video>
* Convert preview player to use html5
* Cleanup
* Increase padding and use constant
* Firefox doesn't support high fps either
* Cleanup
* no need to special case firefox
* Update cameras.md
Tapo C220 added to ONVIF PTZ camera recommendations
* Update docs/docs/configuration/cameras.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Use zoom space id in Onvif RelativeMove setup (#9859)
* use zoom space id in onvif relativemove setup
* better handle cases when zooming is disabled
* Fix birdseye camera comparison (#9887)
* Format (#9889)
* use first onvif profile with ptz config
* Use zoom space id in Onvif RelativeMove setup (#9859)
* use zoom space id in onvif relativemove setup
* better handle cases when zooming is disabled
* use first onvif profile with ptz config
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* scroll minimap to keep it in view
* remove console log
* change ref
* rebase to dev
* rebase to dev
* rebase to dev
* fix history flexbox and live extra scrollbar
* remove extra class
* Reduce redundant code and don't pull new items when marking as reviewed
* Chunk recording times and run playback
* fix overwriting existing data
* Implement scrubbing
* Show refresh button
* Remove old history
* Fix race condition
* Cleanup handling
* Remove console
* Cleanups and fix safari preview speed on iOS
* Clarifying comment
* Update paging when loading page with no items
* Use chip for detections and show all the time
* make time ago dense
* Be smarter about paging empty
* Fix elevation
* Add ui for events
* Display data for review items
* Use preview thumbnails
* Implement paging
* Show icons for what was detected
* Show progress bar on preview thumbnail
* Hide the overlays on hover and update reviewed status
* Dim previews that have been reviewed
* Show audio icons
* Cleanup preview thumb player
* initial implementation of review timeline
* Use timeout for hover playback
* Break apart mobile and desktop views
* Show icons for sub labels
* autoplay first video on mobile
* Only show the last 24 hours by default
* Rework scrolling to fix nested scrolling
* Final scroll cleanups
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
* Add review to database
* Create main manager for review segments
* Upsert and maintain review segments
* Update logic for adding new segments
* Add api
* Support deleting review segments on recording cleanup
* Add field for alert labels
* Formatting
* Logic fixes
* Save 16:9 thumbnail for review segment
* Ensure that crop is 16:9
* Fix non detected objects being added
* Only include true positives
* Add sub labels to data
* initial implementation of review timeline
* hooks
* clean up and comments
* reorganize components
* colors and tweaks
* remove touch events for now
* remove touch events for now
* fix vite config
* use unix timestamps everywhere
* fix corner rounding
* comparison
* use ReviewSegment type
* update mock review event generator
* severity type enum
* remove testing code
* Add config pub / sub pattern
* remove recording from feature metrics
* remove audio and feature metrics
* Check for updates from all cameras
* remove birdseye from camera metrics
* remove motion and detection camera metrics
* Ensure that all processes are stopped
* Stop communicators
* Detections
* Cleanup video output queue
* Use select for time sensitive polls
* Use ipc instead of tcp
Adds a direct dependency on markupsafe, instead of relying on the
implicit dependency via Flask.
This is in preparation of Flask 3.0 support, which will drop compat for
importing escape indirectly.
* Use zmq for inter process communication
* Use localhost for reply and request
* Use pyobj instead of json and Need to use separate requestors for each audio listener
* Cleanup port defining
* Move safari function
* Use webrtc for safari
* Use taller aspect ratio for tall thumbnails
* Simplify thumbnail sizing
* Use correct aspect ratio on all devices
* show images for troubleshooting
* more debug and try max space action
* fixes
* oops
* maximize first
* mount build volume for docker use
* moved to shared setup and cleanup
* remove temp branch
* remove rocm for master
* Don't show gif until event is over and fix aspect
* Be more efficient about updating events
* ensure previews are sorted
* Don't show live view when window is not visible
* Move debug camera to separate view
* Improve jpg loading
* Ensure still is updated on player live finish
* Don't reload when window not visible
* Only disconnect instead of full remove
* Use start time instead of event over to determine gif
* Docs: Fix and clarify which /dev/video devices to use with Raspberry Pi
* Update docs/docs/configuration/hardware_acceleration.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Update docs/docs/configuration/hardware_acceleration.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Revise VSCode hostname info in docs
* Fix misplaced backtick
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* ROCm AMD/GPU based build and detector, WIP
* detectors/rocm: separate yolov8 postprocessing into own function; fix box scaling; use cv2.dnn.blobForImage for preprocessing; assert on required model parameters
* AMD/ROCm: add couple of more ultralytics models; comments
* docker/rocm: make imported model files readable by all
* docker/rocm: readme about running on AMD GPUs
* docker/rocm: updated README
* docker/rocm: updated README
* docker/rocm: updated README
* detectors/rocm: separated preprocessing functions into yolo_utils.py
* detector/plugins: added onnx cpu plugin
* docker/rocm: updated container with limite label sets
* example detectors view
* docker/rocm: updated README.md
* docker/rocm: update README.md
* docker/rocm: do not set HSA_OVERRIDE_GFX_VERSION at all for the general version as the empty value broke rocm
* detectors: simplified/optimized yolov8_postprocess
* detector/yolo_utils: indentation, remove unused variable
* detectors/rocm: default option to conserve cpu usage at the expense of latency
* detectors/yolo_utils: use nms to prefilter overlapping boxes if too many detected
* detectors/edgetpu_tfl: add support for yolov8
* util/download_models: script to download yolov8 model files
* docker/main: add download-models overlay into s6 startup
* detectors/rocm: assume models are in /config/model_cache/yolov8/
* docker/rocm: compile onnx files into mxr files at startup
* switch model download into bash script
* detectors/rocm: automatically override HSA_OVERRIDE_GFX_VERSION for couple of known chipsets
* docs: rocm detector first notes
* typos
* describe builds (harakas temporary)
* docker/rocm: also build a version for gfx1100
* docker/rocm: use cp instead of tar
* docker.rocm: remove README as it is now in detector config
* frigate/detectors: renamed yolov8_preprocess->preprocess, pass input tensor element type
* docker/main: use newer openvino (2023.3.0)
* detectors: implement class aggregation
* update yolov8 model
* add openvino/yolov8 support for label aggregation
* docker: remove pointless s6/timeout-up files
* Revert "detectors: implement class aggregation"
This reverts commit dcfe6bbf6f.
* detectors/openvino: remove class aggregation
* detectors: increase yolov8 postprocessing score trershold to 0.5
* docker/rocm: separate rocm distributed files into its own build stage
* Update object_detectors.md
* updated CODEOWNERS file for rocm
* updated build names for documentation
* Revert "docker/main: use newer openvino (2023.3.0)"
This reverts commit dee95de908.
* reverrted openvino detector
* reverted edgetpu detector
* scratched rocm docs from any mention of edgetpu or openvino
* Update docs/docs/configuration/object_detectors.md
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* renamed frigate.detectors.yolo_utils.py -> frigate.detectors.util.py
* clarified rocm example performance
* Improved wording and clarified text
* Mentioned rocm detector for AMD GPUs
* applied ruff formating
* applied ruff suggested fixes
* docker/rocm: fix missing argument resulting in larger docker image sizes
* docs/configuration/object_detectors: fix links to yolov8 release files
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Break out live page
* Improving layouts and add chip component
* Improve default camera player sizing
* Improve live updating
* Cleanup and fit figma
* Use fixed height
* Masonry layout
* Fix stuff
* Don't force heights
* Adjust scaling
* Cleanup
* remove sidebar (#9731)
* remove sidebar
* keep sidebar on mobile for now and add icons
* Fix revalidation
* Cleanup
* Cleanup width
* Add chips for activity on cameras
* Remove dashboard from header
* Use Inter font (#9735)
* Show still image when no activity is occurring
* remove unused search params
* add playing check for webrtc
* Don't use grid at all for single column
* Fix height on mobile
* a few style updates to better match figma (#9745)
* Remove active objects when they become stationary
* Move to sidebar only and make settings separate component
* Fix layout
* Animate visibility of chips
* Sidebar is full screen
* Fix tall aspect ratio cameras
* Fix complicated aspect logic
* remove
* Adjust thumbnail aspect and add text
* margin on single column layout
* Smaller event thumb text
* Simplify basic image view
* Only show the red dot when camera is recording
* Improve typing for camera toggles
* animate chips with react-transition-group (#9763)
* don't flash when going to still image
* revalidate
* tooltips and active tracking outline (#9766)
* tooltips
* fix tooltip provider and add active tracking outline
* remove unused icon
* remove figma comment
* Get live mode working for jsmpeg
* add small gradient below timeago on event thumbnails (#9767)
* Create live mode hook and make sure jsmpeg can be used
* Enforce env var
* Use print
* Remove unstable
* Add tooltips to thumbnails
* Put back vite
* Format
* Update web/src/components/player/JSMpegPlayer.tsx
---------
Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Co-authored-by: Blake Blackshear <blake@frigate.video>
* Show toast instead of text for success and errors
* Show correct times
* Start playing next hour when current hour ends
* Fix refreshing camera image
* Fix timeline
* Ensure viewport is always full screen
* Protect against hour with no cards and ensure data is consistent
* Reduce grouped up image refreshes
* Include current hour and fix scrubbing bugginess
* Scroll initially selected timeline in to view
* Expand timelne class type
* Use poster image for preview on video player instead of using separate image view
* Fix available streaming modes
* Incrase timing for grouping timline items
* Fix audio activity listener
* Fix player not switching views correctly
* Use player time to convert to timeline time
* Update sub labels for previous timeline items
* Show mini timeline bar for non selected items
* Rewrite desktop timeline to use separate dynamic video player component
* Extend improvements to mobile as well
* Improve time formatting
* Fix scroll
* Fix no preview case
* Mobile fixes
* Audio toggle fixes
* More fixes for mobile
* Improve scaling of graph motion activity
* Add keyboard shortcut hook and support shortcuts for playback page
* Fix sizing of dialog
* Improve height scaling of dialog
* simplify and fix layout system for timeline
* Fix timeilne items not working
* Implement basic Frigate+ submitting from timeline
* Add timeline graph component
* Add more custom colors and improve graph
* Add api and data
* Fix data sorting
* Add graph to timeline
* Only show timeline for selected hour
* Make data full range
* Break apart mobile and desktop timeline views
* Set aspect ratio for player correctly
* more modest default width
* Add timeline item card
* Get video player to fit
* get layout going
* More work on youtube view
* Get video scaling working
* Better dialog sizes
* Show all timelines for day
* Add full day of timelines
* Improve hooks
* Fix previews
* Separate mobile and desktop views and don't rerender
* cleanup
* Optimizations and improvements
* make preview dates more efficient
* Remove seekbar and use timeline as seekbar
* Improve background and scrubbing
* Move history card view to separate view and create timeline view
* Get custom time scrubber working
* Add back nav
* Show timeline bounding boxes
* Implement seeking limiter
* Use browser history to allow back button to close timeline viewer
* Fix mobile timeline and add more icons for detections
* Play when item is initially visible
* Add filter popover
* Add api filter hook and use UI with filtering
* Get history filtering working for cameras and labels
* Allow filtering on detail level
* Save timeline entries for api events
* reset
* fix width
* Fix mobile event timeago
* Reduce preview playback rate for safari browser
* Fix dashboard buttons
* Update recent events correctly
* Fix opening page on icon toggle
* Fix video player remote playback check
* fix history image
* Add sticky headers to history page
* Fix iOS empty frame
* reduce duplicate items and improve time format
* Organize data more effictively and ensure data is not overwritten
* Use icon to indicate preview
* Use constant aspect ratio for review grid
* Add infinite scrolling
* Don't have horizontal scrolling
* Handle autoplay for mobile
* Load more efficiently
* Add support for review grid
* Cleanup reloading on focus
* Adjust timeline api to include metadata and before
* Be more efficient about getting info
* Adjust to new data format
* Cleanup types
* Cleanup text
* Transition to history
* Cleanup
* remove old web implementations
* Cleanup
* Write a low resolution low fps stream from decoded frames (#8673)
* Generate low res low fps previews for recordings viewer
* Make sure previews end on the hour
* Fix durations and decrase keyframe interval to ensure smooth scrubbing
* Ensure minimized resolution is compatible with yuv
* Add ability to configure preview quality
* Fix
* Clean up previews more efficiently
* Use iterator
* Ensure final frame in preview is not duplicated
* initial react/ts framework
* fix gitignore glob excluding ts files
* ignore folders in web-new
* SWRConfig changes for swr 2.x
* use frigateConfig type in websocket handlers
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Generate low res low fps previews for recordings viewer
* Make sure previews end on the hour
* Fix durations and decrase keyframe interval to ensure smooth scrubbing
* Ensure minimized resolution is compatible with yuv
* Add ability to configure preview quality
* Fix
* Clean up previews more efficiently
* Use iterator
* revamp plus docs
* consolidate label guidance
* add some common complete config examples
* clarify zone presence
* bottom center example of mask
* update recommended hardware
* update nav
* update getting started
* add openvino example
* explain why we track stationary objects
* move false positive guide to config folder
* fix link
* update record and parked car guide
* tweaks
* Add glossary with commonly used terms for frigate
* Link back to full docs pages
* Add glossary to sidebar
* Clarifications and grammar fixes
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
---------
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
* update docs to clarify variable substitution in go2rtc
* update to complet
* cleanup spacing
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Included caution about Snapcraft docker issues.
* Accepted format suggestion from NickM-27
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* make go2rtc always rebuild config at startup
/dev/shm can be left mounted (in fact im pretty sure it's always left mounted) on the docker host after shutting down the frigate container.
If we only check that the file doesn't exist, stale data gets re-read every startup
This will make troubleshooting a nightmare for the average user.
I had given up troubleshooting go2rtc several times because of this.
* generate config after supervisor data is loaded
* Fix fi
* fix fi
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* support for other yolov models and config checks
* apply code formatting
* Information about core mask and inference speed
* update rknn postprocess and remove params
* update model selection
* Apply suggestions from code review
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* support rknn on all socs
* apply changes from review and fix post process bug
* apply code formatting
* update tip in object_detectors docs
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* support for other yolov models and config checks
* apply code formatting
* Information about core mask and inference speed
* update rknn postprocess and remove params
* update model selection
* Apply suggestions from code review
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
---------
Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
* Add endpoint to restart Frigate
The only means of restarting Frigate remotely is to issue
a restart topic on the server's websocket. It's
convenient to also expose this capability via HTTP endpoint.
* Add new section to API docs
* Remove extra line
* prevent estimate clipping when autotracking
* use unclipped estimate in distance function only
* remove autotracking velocity changes
* publish on init
* Initial draft for filtering Frigate+ submits in frontend
* Hide filter when Frigate+ is not enabled
* Update http.py
* Revert "Update http.py"
This reverts commit fa292682d6.
* optimize motion and velocity estimation
* change recommended fps and fix config validate
* remove unneeded var
* process at most 3 objects per second
* fix test
* implement nginx caching
* bypass cache from frigate frontend, reduce to 5s
* set cache time to 2s
* cache 200s for 5s
* exclude vod endpoints from cache
echo "[INFO] Removing stale config from last run..."
rm /dev/shm/go2rtc.yaml
fi
if [[ ! -f "/dev/shm/go2rtc.yaml" ]]; then
echo "[INFO] Preparing go2rtc config..."
echo "[INFO] Preparing new go2rtc config..."
if [[ -n "${SUPERVISOR_TOKEN:-}" ]]; then
# Running as a Home Assistant add-on, infer the IP address and port
@@ -54,6 +59,8 @@ if [[ ! -f "/dev/shm/go2rtc.yaml" ]]; then
fi
python3 /usr/local/go2rtc/create_config.py
else
echo "[WARNING] Unable to remove existing go2rtc config. Changes made to your frigate config file may not be recognized. Please remove the /dev/shm/go2rtc.yaml from your docker host manually."
If the labelmap is customized then the labels used for alerts will need to be adjusted as well. See [alert labels](../configuration/review.md#restricting-alerts-to-specific-labels) for more info.
:::
The labelmap can be customized to your needs. A common reason to do this is to combine multiple object types that are easily confused when you don't need to be as granular such as car/truck. By default, truck is renamed to car because they are often confused. You cannot add new object types, but you can change the names of existing objects in the model.
```yaml
@@ -96,7 +104,7 @@ model:
Note that if you rename objects in the labelmap, you will also need to update your `objects -> track` list as well.
:::caution
:::warning
Some labels have special handling and modifications can disable functionality.
@@ -106,7 +114,53 @@ Some labels have special handling and modifications can disable functionality.
:::
## Custom ffmpeg build
## Network Configuration
Changes to Frigate's internal network configuration can be made by bind mounting nginx.conf into the container. For example:
IPv6 is disabled by default, to enable IPv6 listen.gotmpl needs to be bind mounted with IPv6 enabled. For example:
```
{{ if not .enabled }}
# intended for external traffic, protected by auth
listen 8971;
{{ else }}
# intended for external traffic, protected by auth
listen 8971 ssl;
# intended for internal traffic, not protected by auth
listen 5000;
```
becomes
```
{{ if not .enabled }}
# intended for external traffic, protected by auth
listen [::]:8971 ipv6only=off;
{{ else }}
# intended for external traffic, protected by auth
listen [::]:8971 ipv6only=off ssl;
# intended for internal traffic, not protected by auth
listen [::]:5000 ipv6only=off;
```
## Custom Dependencies
### Custom ffmpeg build
Included with Frigate is a build of ffmpeg that works for the vast majority of users. However, there exists some hardware setups which have incompatibilities with the included build. In this case, a docker volume mapping can be used to overwrite the included ffmpeg build with an ffmpeg build that works for your specific hardware setup.
@@ -118,9 +172,9 @@ To do this:
NOTE: The folder that is mapped from the host needs to be the folder that contains `/bin`. So if the full structure is `/home/appdata/frigate/custom-ffmpeg/bin/ffmpeg` then `/home/appdata/frigate/custom-ffmpeg` needs to be mapped to `/usr/lib/btbn-ffmpeg`.
## Custom go2rtc version
### Custom go2rtc version
Frigate currently includes go2rtc v1.8.1, there may be certain cases where you want to run a different version of go2rtc.
Frigate currently includes go2rtc v1.9.4, there may be certain cases where you want to run a different version of go2rtc.
Frigate stores user information in its database. Password hashes are generated using industry standard PBKDF2-SHA256 with 600,000 iterations. Upon successful login, a JWT token is issued with an expiration date and set as a cookie. The cookie is refreshed as needed automatically. This JWT token can also be passed in the Authorization header as a bearer token.
Users are managed in the UI under Settings > Users.
The following ports are available to access the Frigate web UI.
| `8971` | Authenticated UI and API. Reverse proxies should use this port. |
| `5000` | Internal unauthenticated UI and API access. Access to this port should be limited. Intended to be used within the docker network for services that integrate with Frigate and do not support authentication. |
## Onboarding
On startup, an admin user and password are generated and printed in the logs. It is recommended to set a new password for the admin account after logging in for the first time under Settings > Users.
## Resetting admin password
In the event that you are locked out of your instance, you can tell Frigate to reset the admin password and print it in the logs on next startup using the `reset_admin_password` setting in your config file.
## Login failure rate limiting
In order to limit the risk of brute force attacks, rate limiting is available for login failures. This is implemented with Flask-Limiter, and the string notation for valid values is available in [the documentation](https://flask-limiter.readthedocs.io/en/stable/configuration.html#rate-limit-string-notation).
For example, `1/second;5/minute;20/hour` will rate limit the login endpoint when failures occur more than:
- 1 time per second
- 5 times per minute
- 20 times per hour
Restarting Frigate will reset the rate limits.
If you are running Frigate behind a proxy, you will want to set `trusted_proxies` or these rate limits will apply to the upstream proxy IP address. This means that a brute force attack will rate limit login attempts from other devices and could temporarily lock you out of your instance. In order to ensure rate limits only apply to the actual IP address where the requests are coming from, you will need to list the upstream networks that you want to trust. These trusted proxies are checked against the `X-Forwarded-For` header when looking for the IP address where the request originated.
If you are running a reverse proxy in the same docker compose file as Frigate, here is an example of how your auth config might look:
- 172.18.0.0/16# <---- this is the subnet for the internal docker compose network
```
## JWT Token Secret
The JWT token secret needs to be kept secure. Anyone with this secret can generate valid JWT tokens to authenticate with Frigate. This should be a cryptographically random string of at least 64 characters.
You can generate a token using the Python secret library with the following command:
Frigate looks for a JWT token secret in the following order:
1. An environment variable named `FRIGATE_JWT_SECRET`
2. A docker secret named `FRIGATE_JWT_SECRET` in `/run/secrets/`
3. A `jwt_secret` option from the Home Assistant Addon options
4. A `.jwt_secret` file in the config directory
If no secret is found on startup, Frigate generates one and stores it in a `.jwt_secret` file in the config directory.
Changing the secret will invalidate current tokens.
## Proxy configuration
Frigate can be configured to leverage features of common upstream authentication proxies such as Authelia, Authentik, oauth2_proxy, or traefik-forward-auth.
If you are leveraging the authentication of an upstream proxy, you likely want to disable Frigate's authentication. Optionally, if communication between the reverse proxy and Frigate is over an untrusted network, you should set an `auth_secret` in the `proxy` config and configure the proxy to send the secret value as a header named `X-Proxy-Secret`. Assuming this is an untrusted network, you will also want to [configure a real TLS certificate](tls.md) to ensure the traffic can't simply be sniffed to steal the secret.
Here is an example of how to disable Frigate's authentication and also ensure the requests come only from your known proxy.
```yaml
auth:
enabled:False
proxy:
auth_secret:<some random long string>
```
You can use the following code to generate a random secret.
If you have disabled Frigate's authentication and your proxy supports passing a header with the authenticated username, you can use the `header_map` config to specify the header name so it is passed to Frigate. For example, the following will map the `X-Forwarded-User` value. Header names are not case sensitive.
```yaml
proxy:
...
header_map:
user:x-forwarded-user
```
Note that only the following list of headers are permitted by default:
```
Remote-User
Remote-Groups
Remote-Email
Remote-Name
X-Forwarded-User
X-Forwarded-Groups
X-Forwarded-Email
X-Forwarded-Preferred-Username
X-authentik-username
X-authentik-groups
X-authentik-email
X-authentik-name
X-authentik-uid
```
If you would like to add more options, you can overwrite the default file with a docker bind mount at `/usr/local/nginx/conf/proxy_trusted_headers.conf`. Reference the source code for the default file formatting.
Future versions of Frigate may leverage group and role headers for authorization in Frigate as well.
### Login page redirection
Frigate gracefully performs login page redirection that should work with most authentication proxies. If your reverse proxy returns a `Location` header on `401`, `302`, or `307` unauthorized responses, Frigate's frontend will automatically detect it and redirect to that URL.
### Custom logout url
If your reverse proxy has a dedicated logout url, you can specify using the `logout_url` config option. This will update the link for the `Logout` link in the UI.
@@ -31,7 +31,7 @@ First, set up a PTZ preset in your camera's firmware and give it a name. If you'
Edit your Frigate configuration file and enter the ONVIF parameters for your camera. Specify the object types to track, a required zone the object must enter to begin autotracking, and the camera preset name you configured in your camera's firmware to return to when tracking has ended. Optionally, specify a delay in seconds before Frigate returns the camera to the preset.
An [ONVIF connection](cameras.md) is required for autotracking to function.
An [ONVIF connection](cameras.md) is required for autotracking to function. Also, a [motion mask](masks.md) over your camera's timestamp and any overlay text is recommended to ensure they are completely excluded from scene change calculations when the camera is moving.
Note that `autotracking` is disabled by default but can be enabled in the configuration or by MQTT.
@@ -113,7 +113,7 @@ If you initially calibrate with zooming disabled and then enable zooming at a la
Every PTZ camera is different, so autotracking may not perform ideally in every situation. This experimental feature was initially developed using an EmpireTech/Dahua SD1A404XB-GNR.
The object tracker in Frigate estimates the motion of the PTZ so that tracked objects are preserved when the camera moves. In most cases (especially for faster moving objects), the default 5 fps is insufficient for the motion estimator to perform accurately. 10 fps is the current recommendation. Higher frame rates will likely not be more performant and will only slow down Frigate and the motion estimator. Adjust your camera to output at least 10 frames per second and change the `fps` parameter in the [detect configuration](index.md) of your configuration file.
The object tracker in Frigate estimates the motion of the PTZ so that tracked objects are preserved when the camera moves. In most cases 5 fps is sufficient, but if you plan to track faster moving objects, you may want to increase this slightly. Higher frame rates (> 10fps) will only slow down Frigate and the motion estimator and may lead to dropped frames, especially if you are using experimental zooming.
A fast [detector](object_detectors.md) is recommended. CPU detectors will not perform well or won't work at all. You can watch Frigate's debug viewer for your camera to see a thicker colored box around the object currently being autotracked.
@@ -159,7 +159,7 @@ This is often caused by the same reason as above - the `MoveStatus` ONVIF parame
### I'm seeing this error in the logs: "Autotracker: motion estimator couldn't get transformations". What does this mean?
To maintain object tracking during PTZ moves, Frigate tracks the motion of your camera based on the details of the frame. If you are seeing this message, it could mean that your `zoom_factor` may be set too high, the scene around your detected object does not have enough details (like hard edges or color variatons), or your camera's shutter speed is too slow and motion blur is occurring. Try reducing `zoom_factor`, finding a way to alter the scene around your object, or changing your camera's shutter speed.
To maintain object tracking during PTZ moves, Frigate tracks the motion of your camera based on the details of the frame. If you are seeing this message, it could mean that your `zoom_factor` may be set too high, the scene around your detected object does not have enough details (like hard edges or color variations), or your camera's shutter speed is too slow and motion blur is occurring. Try reducing `zoom_factor`, finding a way to alter the scene around your object, or changing your camera's shutter speed.
### Calibration seems to have completed, but the camera is not actually moving to track my object. Why?
Birdseye allows a heads-up view of your cameras to see what is going on around your property / space without having to watch all cameras that may have nothing happening. Birdseye allows specific modes that intelligently show and disappear based on what you care about.
In addition to Frigate's Live camera dashboard, Birdseye allows a portable heads-up view of your cameras to see what is going on around your property / space without having to watch all cameras that may have nothing happening. Birdseye allows specific modes that intelligently show and disappear based on what you care about.
Birdseye can be viewed by adding the "Birdseye" camera to a Camera Group in the Web UI. Add a Camera Group by pressing the "+" icon on the Live page, and choose "Birdseye" as one of the cameras.
Birdseye can also be used in HomeAssistant dashboards, cast to media devices, etc.
## Birdseye Behavior
### Birdseye Modes
Birdseye offers different modes to customize which cameras show under which circumstances.
- **continuous:** All cameras are always included
- **motion:** Cameras that have detected motion within the last 30 seconds are included
- **objects:** Cameras that have tracked an active object within the last 30 seconds are included
- **continuous:** All cameras are always included
- **motion:** Cameras that have detected motion within the last 30 seconds are included
- **objects:** Cameras that have tracked an active object within the last 30 seconds are included
### Custom Birdseye Icon
@@ -34,6 +41,29 @@ cameras:
enabled:False
```
### Birdseye Inactivity
By default birdseye shows all cameras that have had the configured activity in the last 30 seconds, this can be configured:
```yaml
birdseye:
enabled:True
inactivity_threshold:15
```
## Birdseye Layout
### Birdseye Dimensions
The resolution and aspect ratio of birdseye can be configured. Resolution will increase the quality but does not affect the layout. Changing the aspect ratio of birdseye does affect how cameras are laid out.
```yaml
birdseye:
enabled:True
width:1280
height:720
```
### Sorting cameras in the Birdseye view
It is possible to override the order of cameras that are being shown in the Birdseye view.
@@ -54,4 +84,28 @@ cameras:
order:2
```
*Note*: Cameras are sorted by default using their name to ensure a constant view inside Birdseye.
_Note_: Cameras are sorted by default using their name to ensure a constant view inside Birdseye.
### Birdseye Cameras
It is possible to limit the number of cameras shown on birdseye at one time. When this is enabled, birdseye will show the cameras with most recent activity. There is a cooldown to ensure that cameras do not switch too frequently.
For example, this can be configured to only show the most recently active camera.
```yaml
birdseye:
enabled:True
layout:
max_cameras:1
```
### Birdseye Scaling
By default birdseye tries to fit 2 cameras in each row and then double in size until a suitable layout is found. The scaling can be configured with a value between 1.0 and 5.0 depending on use case.
- path:rtsp://user:password@camera-ip:554/H264/ch1/main/av_stream# <----- Update for your camera
roles:
- detect
- record
- rtmp
rtmp:
enabled:False# <-- RTMP should be disabled if your stream is not H264
detect:
width:# <- optional, by default Frigate tries to automatically detect resolution
height:# <- optional, by default Frigate tries to automatically detect resolution
@@ -105,6 +101,15 @@ If available, recommended settings are:
According to [this discussion](https://github.com/blakeblackshear/frigate/issues/3235#issuecomment-1135876973), the http video streams seem to be the most reliable for Reolink.
Cameras connected via a Reolink NVR can be connected with the http stream, use `channel[0..15]` in the stream url for the additional channels.
The setup of main stream can be also done via RTSP, but isn't always reliable on all hardware versions. The example configuration is working with the oldest HW version RLN16-410 device with multiple types of cameras.
:::warning
The below configuration only works for reolink cameras with stream resolution of 5MP or lower, 8MP+ cameras need to use RTSP as http-flv is not supported in this case.
The reolink doorbell supports 2-way audio via go2rtc and other applications. It is important that the http-flv stream is still used for stability, a secondary rtsp stream can be added that will be using for the two way audio only.
[See the go2rtc docs for more information](https://github.com/AlexxIT/go2rtc/tree/v1.8.1#source-rtsp)
[See the go2rtc docs for more information](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-rtsp)
In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record and rtmp if used directly with unifi protect.
In the Unifi 2.0 update Unifi Protect Cameras had a change in audio sample rate which causes issues for ffmpeg. The input rate needs to be set for record if used directly with unifi protect.
```yaml
ffmpeg:
output_args:
record:preset-record-ubiquiti
rtmp:preset-rtmp-ubiquiti# recommend using go2rtc instead
@@ -52,7 +50,7 @@ For camera model specific settings check the [camera specific](camera_specific.m
## Setting up camera PTZ controls
:::caution
:::warning
Not every PTZ supports ONVIF, which is the standard protocol Frigate uses to communicate with your camera. Check the [official list of ONVIF conformant products](https://www.onvif.org/conformant-products/), your camera documentation, or camera manufacturer's website to ensure your PTZ supports ONVIF. Also, ensure your camera is running the latest firmware.
@@ -86,12 +84,33 @@ This list of working and non-working PTZ cameras is based on user feedback.
| Ctronics PTZ | ✅ | ❌ | |
| Dahua | ✅ | ✅ | |
| Foscam R5 | ✅ | ❌ | |
| Hanwha XNP-6550RH | ✅ | ❌ | |
| Hikvision | ✅ | ❌ | Incomplete ONVIF support (MoveStatus won't update even on latest firmware) - reported with HWP-N4215IH-DE and DS-2DE3304W-DE, but likely others |
| Reolink 511WA | ✅ | ❌ | Zoom only |
| Reolink E1 Pro | ✅ | ❌ | |
| Reolink E1 Zoom | ✅ | ❌ | |
| Reolink RLC-823A 16x | ✅ | ❌ | |
| Sunba 405-D20X | ✅ | ❌ | |
| Tapo C200 | ✅ | ❌ | Incomplete ONVIF support |
| Tapo C210 | ❌ | ❌ | Incomplete ONVIF support |
| Tapo | ✅ | ❌ | Many models supported, ONVIF Service Port: 2020 |
| Uniview IPC672LR-AX4DUPK | ✅ | ❌ | Firmware says FOV relative movement is supported, but camera doesn't actually move when sending ONVIF commands |
It is recommended to set up camera groups using the UI.
:::
Cameras can be grouped together and assigned a name and icon, this allows them to be reviewed and filtered together. There will always be the default group for all cameras.
| preset-rpi-32-h264 | 32 bit Rpi with h264 stream | |
| preset-rpi-64-h264 | 64 bit Rpi with h264 stream | |
| preset-rpi-64-h265 | 64 bit Rpi with h265 stream | |
| preset-vaapi | Intel & AMD VAAPI | Check hwaccel docs to ensure correct driver is chosen |
| preset-intel-qsv-h264 | Intel QSV with h264 stream | If issues occur recommend using vaapi preset instead |
| preset-intel-qsv-h265 | Intel QSV with h265 stream | If issues occur recommend using vaapi preset instead |
| preset-nvidia-h264 | Nvidia GPU with h264 stream | |
| preset-nvidia-h265 | Nvidia GPU with h265 stream | |
| preset-nvidia-mjpeg | Nvidia GPU with mjpeg stream | Recommend restreaming mjpeg and using nvidia-h264 |
| preset-nvidia | Nvidia GPU | |
| preset-jetson-h264 | Nvidia Jetson with h264 stream | |
| preset-jetson-h265 | Nvidia Jetson with h265 stream | |
| preset-rk-h264 | Rockchip MPP with h264 stream | Use image with \*-rk suffix and privileged mode |
| preset-rk-h265 | Rockchip MPP with h265 stream | Use image with \*-rk suffix and privileged mode |
### Input Args Presets
@@ -42,7 +42,7 @@ See [the camera specific docs](/configuration/camera_specific.md) for more info
| preset-rtsp-udp | RTSP Stream via UDP | Use when camera is UDP only |
| preset-rtsp-blue-iris | Blue Iris RTSP Stream | Use when consuming a stream from Blue Iris |
:::caution
:::warning
It is important to be mindful of input args when using restream because you can have a mix of protocols. `http` and `rtmp` presets cannot be used with `rtsp` streams. For example, when using a reolink cam with the rtsp restream as a source for record the preset-http-reolink will cause a crash. In this case presets will need to be set at the stream level. See the example below.
@@ -71,11 +71,11 @@ cameras:
Output args presets help make the config more readable and handle use cases for different types of streams to ensure consistent recordings.
| preset-record-generic | Record WITHOUT audio | This is the default when nothing is specified |
| preset-record-generic-audio-copy | Record WITH original audio | Use this to enable audio in recordings |
| preset-record-generic-audio-aac | Record WITH transcoded aac audio | Use this to transcode to aac audio. If your source is already aac, use preset-record-generic-audio-copy instead to avoid re-encoding |
| preset-record-mjpeg | Record an mjpeg stream | Recommend restreaming mjpeg stream instead |
| preset-record-jpeg | Record live jpeg | Recommend restreaming live jpeg instead |
| preset-record-ubiquiti | Record ubiquiti stream with audio | Recordings with ubiquiti non-standard audio |
It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible. More information on hardware accelerated decoding for ffmpeg can be found here: https://trac.ffmpeg.org/wiki/HWAccelIntro
# Hardware Acceleration
It is highly recommended to use a GPU for hardware acceleration in Frigate. Some types of hardware acceleration are detected and used automatically, but you may need to update your configuration to enable hardware accelerated decoding in ffmpeg.
Depending on your system, these parameters may not be compatible. More information on hardware accelerated decoding for ffmpeg can be found here: https://trac.ffmpeg.org/wiki/HWAccelIntro
# Officially Supported
## Raspberry Pi 3/4
Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory).
**NOTICE**: If you are using the addon, you may need to turn off `Protection mode` for hardware acceleration.
Ensure you increase the allocated RAM for your GPU to at least 128 (`raspi-config` > Performance Options > GPU Memory).
If you are using the HA addon, you may need to use the full access variant and turn off `Protection mode` for hardware acceleration.
```yaml
# if you want to decode a h264 stream
ffmpeg:
hwaccel_args:preset-rpi-64-h264
# if you want to decode a h265 (hevc) stream
ffmpeg:
hwaccel_args:preset-rpi-64-h265
```
:::note
If running Frigate in docker, you either need to run in priviliged mode or be sure to map the /dev/video1x devices to Frigate
If running Frigate in Docker, you either need to run in privileged mode or
map the `/dev/video*` devices to Frigate. With Docker compose add:
```yaml
services:
frigate:
...
devices:
- /dev/video11:/dev/video11
```
Or with `docker run`:
```bash
docker run -d \
--name frigate \
...
--device /dev/video10 \
--device /dev/video11 \
ghcr.io/blakeblackshear/frigate:stable
```
`/dev/video11` is the correct device (on Raspberry Pi 4B). You can check
by running the following and looking for `H264`:
```bash
for d in /dev/video*;do
echo -e "---\n$d"
v4l2-ctl --list-formats-ext -d $d
done
```
Or map in all the `/dev/video*` devices.
:::
## Intel-based CPUs
### Via VAAPI
VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. VAAPI is recommended for all generations of Intel-based CPUs if QSV does not work.
VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams. VAAPI is recommended for all generations of Intel-based CPUs.
```yaml
ffmpeg:
hwaccel_args:preset-vaapi
```
**NOTICE**: With some of the processors, like the J4125, the default driver `iHD` doesn't seem to work correctly for hardware acceleration. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the `frigate.yaml` for HA OS users](advanced.md#environment_vars).
:::note
With some of the processors, like the J4125, the default driver `iHD` doesn't seem to work correctly for hardware acceleration. You may need to change the driver to `i965` by adding the following environment variable `LIBVA_DRIVER_NAME=i965` to your docker-compose file or [in the `frigate.yaml` for HA OS users](advanced.md#environment_vars).
:::
### Via Quicksync (>=10th Generation only)
QSV must be set specifically based on the video encoding of the stream.
If VAAPI does not work for you, you can try QSV if your processor supports it. QSV must be set specifically based on the video encoding of the stream.
#### H.264 streams
@@ -130,7 +166,11 @@ Depending on your OS and kernel configuration, you may need to change the `/proc
VAAPI supports automatic profile selection so it will work automatically with both H.264 and H.265 streams.
**Note:** You also need to set `LIBVA_DRIVER_NAME=radeonsi` as an environment variable on the container.
:::note
You need to change the driver to `radeonsi` by adding the following environment variable `LIBVA_DRIVER_NAME=radeonsi` to your docker-compose file or [in the `frigate.yaml` for HA OS users](advanced.md#environment_vars).
:::
```yaml
ffmpeg:
@@ -246,12 +286,12 @@ These instructions were originally based on the [Jellyfin documentation](https:/
# Community Supported
## NVIDIA Jetson (Orin AGX, Orin NX, Orin Nano*, Xavier AGX, Xavier NX, TX2, TX1, Nano)
## NVIDIA Jetson (Orin AGX, Orin NX, Orin Nano\*, Xavier AGX, Xavier NX, TX2, TX1, Nano)
A separate set of docker images is available that is based on Jetpack/L4T. They comes with an `ffmpeg` build
A separate set of docker images is available that is based on Jetpack/L4T. They come with an `ffmpeg` build
with codecs that use the Jetson's dedicated media engine. If your Jetson host is running Jetpack 4.6, use the
`frigate-tensorrt-jp4` image, or if your Jetson host is running Jetpack 5.0+, use the `frigate-tensorrt-jp5`
image. Note that the Orin Nano has no video encoder, so frigate will use software encoding on this platform,
`stable-tensorrt-jp4` tagged image, or if your Jetson host is running Jetpack 5.0+, use the `stable-tensorrt-jp5`
tagged image. Note that the Orin Nano has no video encoder, so frigate will use software encoding on this platform,
but the image will still allow hardware decoding and tensorrt object detection.
You will need to use the image with the nvidia container runtime:
@@ -262,7 +302,7 @@ You will need to use the image with the nvidia container runtime:
If everything is working correctly, you should see a significant reduction in ffmpeg CPU load and power consumption.
Verify that hardware decoding is working by running `jtop` (`sudo pip3 install -U jetson-stats`), which should show
that NVDEC/NVDEC1 are in use.
## Rockchip platform
Hardware accelerated video de-/encoding is supported on all Rockchip SoCs using [Nyanmisaka's FFmpeg 6.1 Fork](https://github.com/nyanmisaka/ffmpeg-rockchip) based on [Rockchip's mpp library](https://github.com/rockchip-linux/mpp).
### Prerequisites
Make sure to follow the [Rockchip specific installation instructions](/frigate/installation#rockchip-platform).
### Configuration
Add one of the following FFmpeg presets to your `config.yaml` to enable hardware video processing:
```yaml
# if you try to decode a h264 encoded stream
ffmpeg:
hwaccel_args:preset-rk-h264
# if you try to decode a h265 (hevc) encoded stream
ffmpeg:
hwaccel_args:preset-rk-h265
```
:::note
Make sure that your SoC supports hardware acceleration for your input stream. For example, if your camera streams with h265 encoding and a 4k resolution, your SoC must be able to de- and encode h265 with a 4k resolution or higher. If you are unsure whether your SoC meets the requirements, take a look at the datasheet.
For Home Assistant Addon installations, the config file needs to be in the root of your Home Assistant config directory (same location as `configuration.yaml`). It can be named `frigate.yaml` or `frigate.yml`, but if both files exist `frigate.yaml` will be preferred and `frigate.yml` will be ignored.
For all other installation types, the config file should be mapped to `/config/config.yml` inside the container.
It is recommended to start with a minimal configuration and add to it as described in [this guide](../guides/getting_started.md):
It is recommended to start with a minimal configuration and add to it as described in [this guide](../guides/getting_started.md) and use the built in configuration editor in Frigate's UI which supports validation.
```yaml
mqtt:
host:mqtt.server.com
enabled:False
cameras:
back:
dummy_camera:# <--- this will be changed to your actual camera later
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.json` to the top of the config file.`frigate_host`being the IP address of Frigate or `ccab4aaf-frigate` if running in the addon.
VSCode supports JSON schemas for automatically validating configuration files. You can enable this feature by adding `# yaml-language-server: $schema=http://frigate_host:5000/api/config/schema.json` to the beginning of the configuration file. Replace`frigate_host`with the IP address or hostname of your Frigate server. If you're using both VSCode and Frigate as an add-on, you should use `ccab4aaf-frigate` instead. Make sure to expose the internal unauthenticated port `5000` when accessing the config from VSCode on another machine.
### Full configuration reference:
## Environment Variable Substitution
:::caution
It is not recommended to copy this full configuration file. Only specify values that are different from the defaults. Configuration options and default values may change in future versions.
:::
**Note:** The following values will be replaced at runtime by using environment variables
-`{FRIGATE_MQTT_USER}`
-`{FRIGATE_MQTT_PASSWORD}`
-`{FRIGATE_RTSP_USER}`
-`{FRIGATE_RTSP_PASSWORD}`
for example:
Frigate supports the use of environment variables starting with `FRIGATE_`**only** where specifically indicated in the [reference config](./reference.md). For example, the following values can be replaced at runtime by using environment variables:
```yaml
mqtt:
@@ -61,617 +50,187 @@ onvif:
```
```yaml
mqtt:
# Optional: Enable mqtt server (default: shown below)
enabled:True
# Required: host name
host:mqtt.server.com
# Optional: port (default: shown below)
port:1883
# Optional: topic prefix (default: shown below)
# NOTE: must be unique if you are running multiple instances
topic_prefix:frigate
# Optional: client id (default: shown below)
# NOTE: must be unique if you are running multiple instances
client_id:frigate
# Optional: user
# NOTE: MQTT user can be specified with an environment variables that must begin with 'FRIGATE_'.
# e.g. user: '{FRIGATE_MQTT_USER}'
user:mqtt_user
# Optional: password
# NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
# e.g. password: '{FRIGATE_MQTT_PASSWORD}'
password:password
# Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
tls_ca_certs:/path/to/ca.crt
# Optional: tls_client_cert and tls_client key in order to use self-signed client
# certificates (default: None)
# NOTE: certificate must not be password-protected
# do not set user and password when using a client certificate
tls_client_cert:/path/to/client.crt
tls_client_key:/path/to/client.key
# Optional: tls_insecure (true/false) for enabling TLS verification of
# the server hostname in the server certificate (default: None)
tls_insecure:false
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval:60
# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
# Required: name of the detector
detector_name:
# Required: type of the detector
# Frigate provided types include 'cpu', 'edgetpu', 'openvino' and 'tensorrt' (default: shown below)
# Additional detector types can also be plugged in.
# Detectors may require additional configuration.
# Refer to the Detectors configuration page for more information.
type:cpu
# Optional: Database configuration
database:
# The path to store the SQLite DB (default: shown below)
path:/config/frigate.db
# Optional: model modifications
model:
# Optional: path to the model (default: automatic based on detector)
path:/edgetpu_model.tflite
# Optional: path to the labelmap (default: shown below)
labelmap_path:/labelmap.txt
# Required: Object detection model input width (default: shown below)
width:320
# Required: Object detection model input height (default: shown below)
height:320
# Optional: Object detection model input colorspace
# Valid values are rgb, bgr, or yuv. (default: shown below)
input_pixel_format:rgb
# Optional: Object detection model input tensor format
# Valid values are nhwc or nchw (default: shown below)
input_tensor:nhwc
# Optional: Object detection model type, currently only used with the OpenVINO detector
# Valid values are ssd, yolox, yolov5, or yolov8 (default: shown below)
model_type:ssd
# Optional: Label name modifications. These are merged into the standard labelmap.
# Optional: global hwaccel args (default: shown below)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args:[]
# Optional: global input args (default: shown below)
input_args:preset-rtsp-generic
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect:-threads 2 -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record:preset-record-generic
# Optional: output args for rtmp streams (default: shown below)
rtmp:preset-rtmp-generic
# Optional: Time in seconds to wait before ffmpeg retries connecting to the camera. (default: shown below)
# If set too low, frigate will retry a connection to the camera's stream too frequently, using up the limited streams some cameras can allow at once
# If set too high, then if a ffmpeg crash or camera stream timeout occurs, you could potentially lose up to a maximum of retry_interval second(s) of footage
# NOTE: this can be a useful setting for Wireless / Battery cameras to reduce how much footage is potentially lost during a connection timeout.
retry_interval:10
# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
# Optional: width of the frame for the input with the detect role (default: shown below)
width:1280
# Optional: height of the frame for the input with the detect role (default: shown below)
height:720
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps:5
# Optional: enables detection for the camera (default: True)
enabled:True
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared:25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval:50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold:50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default:3000
# Optional: Object specific values
objects:
person:1000
# Optional: Milliseconds to offset detect annotations by (default: shown below).
# There can often be latency between a recording and the detect process,
# especially when using separate streams for detect and record.
# Use this setting to make the timeline bounding boxes more closely align
# with the recording. The value can be positive or negative.
# TIP: Imagine there is an event clip with a person walking from left to right.
# If the event timeline bounding box is consistently to the left of the person
# then the value should be decreased. Similarly, if a person is walking from
# left to right and the bounding box is consistently ahead of the person
# then the value should be increased.
# TIP: This offset is dynamic so you can change the value and it will update existing
# events, this makes it easy to tune.
# WARNING: Fast moving objects will likely not have the bounding box align.
annotation_offset:0
# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object.
# NOTE: This mask is COMBINED with the object type specific mask below
mask:0,0,1000,0,1000,200,0,200
# Optional: filters to reduce false positives for specific object types
filters:
person:
# Optional: minimum width*height of the bounding box for the detected object (default: 0)
min_area:5000
# Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
max_area:100000
# Optional: minimum width/height of the bounding box for the detected object (default: 0)
min_ratio:0.5
# Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
max_ratio:2.0
# Optional: minimum score for the object to initiate tracking (default: shown below)
min_score:0.5
# Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
threshold:0.7
# Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object
mask:0,0,1000,0,1000,200,0,200
# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold:30
# Optional: The percentage of the image used to detect lightning or other substantial changes where motion detection
# needs to recalibrate. (default: shown below)
# Increasing this value will make motion detection more likely to consider lightning or ir mode changes as valid motion.
# Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching
# a doorbell camera.
lightning_threshold:0.8
# Optional: Minimum size in pixels in the resized motion image that counts as motion (default: shown below)
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
# make motion detection more sensitive to smaller moving objects.
# As a rule of thumb:
# - 10 - high sensitivity
# - 30 - medium sensitivity
# - 50 - low sensitivity
contour_area:10
# Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
# Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
# Low values will cause things like moving shadows to be detected as motion for longer.
# possible values are shown above (default: not set)
strftime_fmt:"%Y/%m/%d %H:%M"
# Optional: Telemetry configuration
telemetry:
# Optional: Enabled network interfaces for bandwidth stats monitoring (default: empty list, let nethogs search all)
network_interfaces:
- eth
- enp
- eno
- ens
- wl
- lo
# Optional: Configure system stats
stats:
# Enable AMD GPU stats (default: shown below)
amd_gpu_stats:True
# Enable Intel GPU stats (default: shown below)
intel_gpu_stats:True
# Enable network bandwidth stats monitoring for camera ffmpeg processes, go2rtc, and object detectors. (default: shown below)
# NOTE: The container must either be privileged or have cap_net_admin, cap_net_raw capabilities enabled.
network_bandwidth:False
# Optional: Enable the latest version outbound check (default: shown below)
# NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
version_check:True
rtsp:
username:"{FRIGATE_GO2RTC_RTSP_USERNAME}"
password:"{FRIGATE_GO2RTC_RTSP_PASSWORD}"
```
## Common configuration examples
Here are some common starter configuration examples. Refer to the [reference config](./reference.md) for detailed information about all the config values.
### Raspberry Pi Home Assistant Addon with USB Coral
- Single camera with 720p, 5fps stream for detect
- MQTT connected to home assistant mosquitto addon
- Hardware acceleration for decoding video
- USB Coral detector
- Save all video with any detectable motion for 7 days regardless of whether any objects were detected or not
- Continue to keep all video if it was during any event for 30 days
Frigate has different live view options, some of which require the bundled `go2rtc` to be configured as shown in the [step by step guide](/guides/configuring_go2rtc).
Frigate intelligently displays your camera streams on the Live view dashboard. Your camera images update once per minute when no detectable activity is occurring to conserve bandwidth and resources. As soon as any motion is detected, cameras seamlessly switch to a live stream.
## Live View Options
## Live View technologies
Live view options can be selected while viewing the live stream. The options are:
Frigate intelligently uses three different streaming technologies to display your camera streams on the dashboard and the single camera view, switching between available modes based on network bandwidth, player errors, or required features like two-way talk. The highest quality and fluency of the Live view requires the bundled `go2rtc` to be configured as shown in the [step by step guide](/guides/configuring_go2rtc).
| jsmpeg | low | same as `detect -> fps`, capped at 10 | 720p | no | no | resolution is configurable, but go2rtc is recommended if you want higher resolutions |
| mse | low | native | native | yes (depends on audio codec) | yes | iPhone requires iOS 17.1+, Firefox is h.264 only |
| webrtc | lowest | native | native | yes (depends on audio codec) | yes | requires extra config, doesn't support h.265 |
### Audio Support
@@ -79,7 +81,7 @@ WebRTC works by creating a TCP or UDP connection on port `8555`. However, it req
- stun:8555
```
- For access through Tailscale, the Frigate system's Tailscale IP must be added as a WebRTC candidate. Tailscale IPs all start with `100.`, and are reserved within the `100.0.0.0/8` CIDR block.
- For access through Tailscale, the Frigate system's Tailscale IP must be added as a WebRTC candidate. Tailscale IPs all start with `100.`, and are reserved within the `100.64.0.0/10` CIDR block.
:::tip
@@ -104,6 +106,7 @@ If you are having difficulties getting WebRTC to work and you are running Frigat
If not running in host mode, port 8555 will need to be mapped for the container:
docker-compose.yml
```yaml
services:
frigate:
@@ -115,4 +118,4 @@ services:
:::
See [go2rtc WebRTC docs](https://github.com/AlexxIT/go2rtc/tree/v1.8.1#module-webrtc) for more information about this.
See [go2rtc WebRTC docs](https://github.com/AlexxIT/go2rtc/tree/v1.8.3#module-webrtc) for more information about this.
**Motion masks**: Motion masks are used to prevent unwanted types of motion from triggering detection. Try watching the debug feed with `Motion Boxes` enabled to see what may be regularly detected as motion. For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas. Motion is also used during object tracking to refine the object detection area in the next frame. Overmasking will make it more difficult for objects to be tracked. To see this effect, create a mask, and then watch the video feed with `Motion Boxes` enabled again.
Motion masks are used to prevent unwanted types of motion from triggering detection. Try watching the Debug feed (Settings --> Debug) with `Motion Boxes` enabled to see what may be regularly detected as motion. For example, you want to mask out your timestamp, the sky, rooftops, etc. Keep in mind that this mask only prevents motion from being detected and does not prevent objects from being detected if object detection was started due to motion in unmasked areas. Motion is also used during object tracking to refine the object detection area in the next frame. _Over-masking will make it more difficult for objects to be tracked._
**Object filter masks**: Object filter masks are used to filter out false positives for a given object type based on location. These should be used to filter any areas where it is not possible for an object of that type to be. The bottom center of the detected object's bounding box is evaluated against the mask. If it is in a masked area, it is assumed to be a false positive. For example, you may want to mask out rooftops, walls, the sky, treetops for people. For cars, masking locations other than the street or your driveway will tell Frigate that anything in your yard is a false positive.
See [further clarification](#further-clarification) below on why you may not want to use a motion mask.
## Object filter masks
Object filter masks are used to filter out false positives for a given object type based on location. These should be used to filter any areas where it is not possible for an object of that type to be. The bottom center of the detected object's bounding box is evaluated against the mask. If it is in a masked area, it is assumed to be a false positive. For example, you may want to mask out rooftops, walls, the sky, treetops for people. For cars, masking locations other than the street or your driveway will tell Frigate that anything in your yard is a false positive.
Object filter masks can be used to filter out stubborn false positives in fixed locations. For example, the base of this tree may be frequently detected as a person. The following image shows an example of an object filter mask (shaded red area) over the location where the bottom center is typically located to filter out person detections in a precise location.

## Using the mask creator
To create a poly mask:
1. Visit the Web UI
1. Click the camera you wish to create a mask for
1. Select "Debug" at the top
1.Expand the "Options" below the video feed
1. Click "Mask & Zone creator"
1. Click "Add" on the type of mask or zone you would like to create
1.Click on the camera's latest image to create a masked area. The yaml representation will be updated in real-time
1.When you've finished creating your mask, click "Copy" and paste the contents into your config file and restart Frigate
2. Click/tap the gear icon and open "Settings"
3. Select "Mask / zone editor"
4.At the top right, select the camera you wish to create a mask or zone for
5. Click the plus icon under the type of mask or zone you would like to create
6. Click on the camera's latest image to create the points for a masked area. Click the first point again to close the polygon.
7.When you've finished creating your mask, press Save.
8.Restart Frigate to apply your changes.
Example of a finished row corresponding to the below example image:
Your config file will be updated with the relative coordinates of the mask/zone:
This is a response to a [question posed on reddit](https://www.reddit.com/r/homeautomation/comments/ppxdve/replacing_my_doorbell_with_a_security_camera_a_6/hd876w4?utm_source=share&utm_medium=web2x&context=3):
@@ -70,7 +78,7 @@ It is, but the definition of "unnecessary" varies. I want to ignore areas of mot
> For me, giving my masks ANY padding results in a lot of people detection I'm not interested in. I live in the city and catch a lot of the sidewalk on my camera. People walk by my front door all the time and the margin between the sidewalk and actually walking onto my stoop is very thin, so I basically have everything but the exact contours of my stoop masked out. This results in very tidy detections but this info keeps throwing me off. Am I just overthinking it?
This is what `required_zones` are for. You should define a zone (remember this is evaluated based on the bottom center of the bounding box) and make it required to save snapshots and clips (now events in 0.9.0). You can also use this in your conditions for a notification.
This is what `required_zones` are for. You should define a zone (remember this is evaluated based on the bottom center of the bounding box) and make it required to save snapshots and clips (previously events in 0.9.0 to 0.13.0 and review items in 0.14.0 and later). You can also use this in your conditions for a notification.
> Maybe my specific situation just warrants this. I've just been having a hard time understanding the relevance of this information - it seems to be that it's exactly what would be expected when "masking out" an area of ANY image.
Frigate uses motion detection as a first line check to see if there is anything happening in the frame worth checking with object detection.
Once motion is detected, it tries to group up nearby areas of motion together in hopes of identifying a rectangle in the image that will capture the area worth inspecting. These are the red "motion boxes" you see in the debug viewer.
## The Goal
The default motion settings should work well for the majority of cameras, however there are cases where tuning motion detection can lead to better and more optimal results. Each camera has its own environment with different variables that affect motion, this means that the same motion settings will not fit all of your cameras.
Before tuning motion it is important to understand the goal. In an optimal configuration, motion from people and cars would be detected, but not grass moving, lighting changes, timestamps, etc. If your motion detection is too sensitive, you will experience higher CPU loads and greater false positives from the increased rate of object detection. If it is not sensitive enough, you will miss events.
## Create Motion Masks
First, mask areas with regular motion not caused by the objects you want to detect. The best way to find candidates for motion masks is by watching the debug stream with motion boxes enabled. Good use cases for motion masks are timestamps or tree limbs and large bushes that regularly move due to wind. When possible, avoid creating motion masks that would block motion detection for objects you want to track **even if they are in locations where you don't want events**. Motion masks should not be used to avoid detecting objects in specific areas. More details can be found [in the masks docs.](/configuration/masks.md).
## Prepare For Testing
The easiest way to tune motion detection is to use the Frigate UI under Settings > Motion Tuner. This screen allows the changing of motion detection values live to easily see the immediate effect on what is detected as motion.
## Tuning Motion Detection During The Day
Now that things are set up, find a time to tune that represents normal circumstances. For example, if you tune your motion on a day that is sunny and windy you may find later that the motion settings are not sensitive enough on a cloudy and still day.
:::note
Remember that motion detection is just used to determine when object detection should be used. You should aim to have motion detection sensitive enough that you won't miss events from objects you want to detect with object detection. The goal is to prevent object detection from running constantly for every small pixel change in the image. Windy days are still going to result in lots of motion being detected.
:::
### Threshold
The threshold value dictates how much of a change in a pixels luminance is required to be considered motion.
```yaml
# default threshold value
motion:
# Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
# Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
# The value should be between 1 and 255.
threshold:30
```
Lower values mean motion detection is more sensitive to changes in color, making it more likely for example to detect motion when a brown dogs blends in with a brown fence or a person wearing a red shirt blends in with a red car. If the threshold is too low however, it may detect things like grass blowing in the wind, shadows, etc. to be detected as motion.
Watching the motion boxes in the debug view, increase the threshold until you only see motion that is visible to the eye. Once this is done, it is important to test and ensure that desired motion is still detected.
### Contour Area
```yaml
# default contour_area value
motion:
# Optional: Minimum size in pixels in the resized motion image that counts as motion (default: shown below)
# Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
# make motion detection more sensitive to smaller moving objects.
# As a rule of thumb:
# - 10 - high sensitivity
# - 30 - medium sensitivity
# - 50 - low sensitivity
contour_area:10
```
Once the threshold calculation is run, the pixels that have changed are grouped together. The contour area value is used to decide which groups of changed pixels qualify as motion. Smaller values are more sensitive meaning people that are far away, small animals, etc. are more likely to be detected as motion, but it also means that small changes in shadows, leaves, etc. are detected as motion. Higher values are less sensitive meaning these things won't be detected as motion but with the risk that desired motion won't be detected until closer to the camera.
Watching the motion boxes in the debug view, adjust the contour area until there are no motion boxes smaller than the smallest you'd expect frigate to detect something moving.
### Improve Contrast
At this point if motion is working as desired there is no reason to continue with tuning for the day. If you were unable to find a balance between desired and undesired motion being detected, you can try disabling improve contrast and going back to the threshold and contour area steps.
## Tuning Motion Detection During The Night
Once daytime motion detection is tuned, there is a chance that the settings will work well for motion detection during the night as well. If this is the case then the preferred settings can be written to the config file and left alone.
However, if the preferred day settings do not work well at night it is recommended to use HomeAssistant or some other solution to automate changing the settings. That way completely separate sets of motion settings can be used for optimal day and night motion detection.
## Tuning For Large Changes In Motion
```yaml
# default lightning_threshold:
motion:
# Optional: The percentage of the image used to detect lightning or other substantial changes where motion detection
# needs to recalibrate. (default: shown below)
# Increasing this value will make motion detection more likely to consider lightning or ir mode changes as valid motion.
# Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching
# a doorbell camera.
lightning_threshold:0.8
```
:::tip
Some cameras like doorbell cameras may have missed detections when someone walks directly in front of the camera and the lightning_threshold causes motion detection to be re-calibrated. In this case, it may be desirable to increase the `lightning_threshold` to ensure these events are not missed.
:::
Large changes in motion like PTZ moves and camera switches between Color and IR mode should result in no motion detection. This is done via the `lightning_threshold` configuration. It is defined as the percentage of the image used to detect lightning or other substantial changes where motion detection needs to recalibrate. Increasing this value will make motion detection more likely to consider lightning or IR mode changes as valid motion. Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching a doorbell camera.
Frigate provides the following builtin detector types: `cpu`, `edgetpu`, `openvino`, and`tensorrt`. By default, Frigate will use a single CPU detector. Other detectors may require additional configuration as described below. When using multiple detectors they will run in dedicated processes, but pull from a common queue of detection requests from across all cameras.
Frigate provides the following builtin detector types: `cpu`, `edgetpu`, `openvino`, `tensorrt`, and `rknn`. By default, Frigate will use a single CPU detector. Other detectors may require additional configuration as described below. When using multiple detectors they will run in dedicated processes, but pull from a common queue of detection requests from across all cameras.
## CPU Detector (not recommended)
The CPU detector type runs a TensorFlow Lite model utilizing the CPU without hardware acceleration. It is recommended to use a hardware accelerated detector type instead for better performance. To configure a CPU based detector, set the `"type"` attribute to `"cpu"`.
:::tip
If you do not have GPU or Edge TPU hardware, using the [OpenVINO Detector](#openvino-detector) is often more efficient than using the CPU detector.
:::
The number of threads used by the interpreter can be specified using the `"num_threads"` attribute, and defaults to `3.`
A TensorFlow Lite model is provided in the container at `/cpu_model.tflite` and is used by this detector type by default. To provide your own model, bind mount the file into the container and provide the path with `model.path`.
@@ -29,14 +35,20 @@ detectors:
When using CPU detectors, you can add one CPU detector per camera. Adding more detectors than the number of cameras should not improve performance.
## Edge-TPU Detector
## EdgeTPU Detector
The EdgeTPU detector type runs a TensorFlow Lite model utilizing the Google Coral delegate for hardware acceleration. To configure an EdgeTPU detector, set the `"type"` attribute to `"edgetpu"`.
The EdgeTPU detector type runs a TensorFlow Lite model utilizing the Google Coral delegate for hardware acceleration. To configure an EdgeTPU detector, set the `"type"` attribute to `"edgetpu"`.
The EdgeTPU device can be specified using the `"device"` attribute according to the [Documentation for the TensorFlow Lite Python API](https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api). If not set, the delegate will use the first device it finds.
The EdgeTPU device can be specified using the `"device"` attribute according to the [Documentation for the TensorFlow Lite Python API](https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api). If not set, the delegate will use the first device it finds.
A TensorFlow Lite model is provided in the container at `/edgetpu_model.tflite` and is used by this detector type by default. To provide your own model, bind mount the file into the container and provide the path with `model.path`.
:::tip
See [common Edge TPU troubleshooting steps](/troubleshooting/edgetpu) if the Edge TPU is not detected.
:::
### Single USB Coral
```yaml
@@ -69,6 +81,15 @@ detectors:
device:""
```
### Single PCIE/M.2 Coral
```yaml
detectors:
coral:
type:edgetpu
device:pci
```
### Multiple PCIE/M.2 Corals
```yaml
@@ -95,11 +116,15 @@ detectors:
## OpenVINO Detector
The OpenVINO detector type runs an OpenVINO IR model on Intel CPU, GPU and VPU hardware. To configure an OpenVINO detector, set the `"type"` attribute to `"openvino"`.
The OpenVINO detector type runs an OpenVINO IR model on AMD and Intel CPUs, Intel GPUs and Intel VPU hardware. To configure an OpenVINO detector, set the `"type"` attribute to `"openvino"`.
The OpenVINO device to be used is specified using the `"device"` attribute according to the naming conventions in the [Device Documentation](https://docs.openvino.ai/latest/openvino_docs_OV_UG_Working_with_devices.html). Other supported devices could be `AUTO`,`CPU`,`GPU`, `MYRIAD`, etc. If not specified, the default OpenVINO device will be selected by the `AUTO` plugin.
The OpenVINO device to be used is specified using the `"device"` attribute according to the naming conventions in the [Device Documentation](https://docs.openvino.ai/2024/openvino-workflow/running-inference/inference-devices-and-modes.html). The most common devices are`CPU` and`GPU`. Currently, there is a known issue with using `AUTO`. For backwards compatibility, Frigate will attempt to use `GPU` if `AUTO` is set in your configuration.
OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer. A supported Intel platform is required to use the `GPU` device with OpenVINO. The `MYRIAD` device may be run on any platform, including Arm devices. For detailed system requirements, see [OpenVINO System Requirements](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html)
OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer. It will also run on AMD CPUs despite having no official support for it. A supported Intel platform is required to use the `GPU` device with OpenVINO. For detailed system requirements, see [OpenVINO System Requirements](https://docs.openvino.ai/2024/about-openvino/release-notes-openvino/system-requirements.html)
### Supported Models
#### SSDLite MobileNet v2
An OpenVINO model is provided in the container at `/openvino-model/ssdlite_mobilenet_v2.xml` and is used by this detector type by default. The model comes from Intel's Open Model Zoo [SSDLite MobileNet V2](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/ssdlite_mobilenet_v2) and is converted to an FP16 precision IR model. Use the model configuration shown below when using the OpenVINO detector with the default model.
@@ -107,70 +132,56 @@ An OpenVINO model is provided in the container at `/openvino-model/ssdlite_mobil
detectors:
ov:
type:openvino
device:AUTO
model:
path:/openvino-model/ssdlite_mobilenet_v2.xml
device:GPU
model:
width:300
height:300
input_tensor:nhwc
input_pixel_format:bgr
path:/openvino-model/ssdlite_mobilenet_v2.xml
labelmap_path:/openvino-model/coco_91cl_bkgr.txt
```
This detector also supports some YOLO variants: YOLOX, YOLOv5, and YOLOv8 specifically. Other YOLO variants are not officially supported/tested. Frigate does not come with any yolo models preloaded, so you will need to supply your own models. This detector has been verified to work with the [yolox_tiny](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny) model from Intel's Open Model Zoo. You can follow [these instructions](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/yolox-tiny#download-a-model-and-convert-it-into-openvino-ir-format) to retrieve the OpenVINO-compatible `yolox_tiny` model. Make sure that the model input dimensions match the `width` and `height` parameters, and `model_type` is set accordingly. See [Full Configuration Reference](/configuration/index.md#full-configuration-reference) for a list of possible `model_type` options. Below is an example of how `yolox_tiny` can be used in Frigate:
#### YOLOX
This detector also supports YOLOX. Frigate does not come with any YOLOX models preloaded, so you will need to supply your own models.
#### YOLO-NAS
[YOLO-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) models are supported, but not included by default. You can build and download a compatible model with pre-trained weights using [this notebook](https://github.com/frigate/blob/dev/notebooks/YOLO_NAS_Pretrained_Export.ipynb) [](https://colab.research.google.com/github/blakeblackshear/frigate/blob/dev/notebooks/YOLO_NAS_Pretrained_Export.ipynb).
:::warning
The pre-trained YOLO-NAS weights from DeciAI are subject to their license and can't be used commercially. For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
:::
The input image size in this notebook is set to 320x320. This results in lower CPU usage and faster inference times without impacting performance in most cases due to the way Frigate crops video frames to areas of interest before running detection. The notebook and config can be updated to 640x640 if desired.
After placing the downloaded onnx model in your config folder, you can use the following configuration:
```yaml
detectors:
ov:
type:openvino
device:AUTO
model:
path:/path/to/yolox_tiny.xml
device:GPU
model:
width:416
height:416
model_type:yolonas
width:320# <--- should match whatever was set in notebook
height:320# <--- should match whatever was set in notebook
input_tensor:nchw
input_pixel_format:bgr
model_type:yolox
labelmap_path:/path/to/coco_80cl.txt
path:/config/yolo_nas_s.onnx
labelmap_path:/labelmap/coco-80.txt
```
### Intel NCS2 VPU and Myriad X Setup
Intel produces a neural net inference accelleration chip called Myriad X. This chip was sold in their Neural Compute Stick 2 (NCS2) which has been discontinued. If intending to use the MYRIAD device for accelleration, additional setup is required to pass through the USB device. The host needs a udev rule installed to handle the NCS2 device.
Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects.
## NVidia TensorRT Detector
NVidia GPUs may be used for object detection using the TensorRT libraries. Due to the size of the additional libraries, this detector is only provided in images with the `-tensorrt` tag suffix. This detector is designed to work with Yolo models for object detection.
Nvidia GPUs may be used for object detection using the TensorRT libraries. Due to the size of the additional libraries, this detector is only provided in images with the `-tensorrt` tag suffix, e.g. `ghcr.io/blakeblackshear/frigate:stable-tensorrt`. This detector is designed to work with Yolo models for object detection.
### Minimum Hardware Support
@@ -192,7 +203,7 @@ There are improved capabilities in newer GPU architectures that TensorRT can ben
The model used for TensorRT must be preprocessed on the same hardware platform that they will run on. This means that each user must run additional setup to generate a model file for the TensorRT library. A script is included that will build several common models.
The Frigate image will generate model files during startup if the specified model is not found. Processed models are stored in the `/config/model_cache` folder. Typically the `/config` path is mapped to a directory on the host already and the `model_cache` does not need to be mapped separately unless the user wants to store it in a different location on the host.
The Frigate image will generate model files during startup if the specified model is not found. Processed models are stored in the `/config/model_cache` folder. Typically the `/config` path is mapped to a directory on the host already and the `model_cache` does not need to be mapped separately unless the user wants to store it in a different location on the host.
By default, the `yolov7-320` model will be generated, but this can be overridden by specifying the `YOLO_MODELS` environment variable in Docker. One or more models may be listed in a comma-separated format, and each one will be generated. To select no model generation, set the variable to an empty string, `YOLO_MODELS=""`. Models will only be generated if the corresponding `{model}.trt` file is not present in the `model_cache` folder, so you can force a model to be regenerated by deleting it from your Frigate data folder.
@@ -239,7 +250,7 @@ frigate:
- USE_FP16=false
```
If you have multiple GPUs passed through to Frigate, you can specify which one to use for the model conversion. The conversion script will use the first visible GPU, however in systems with mixed GPU models you may not want to use the default index for object detection. Add the `TRT_MODEL_PREP_DEVICE` environment variable to select a specific GPU.
If you have multiple GPUs passed through to Frigate, you can specify which one to use for the model conversion. The conversion script will use the first visible GPU, however in systems with mixed GPU models you may not want to use the default index for object detection. Add the `TRT_MODEL_PREP_DEVICE` environment variable to select a specific GPU.
```yml
frigate:
@@ -249,7 +260,7 @@ frigate:
### Configuration Parameters
The TensorRT detector can be selected by specifying `tensorrt` as the model type. The GPU will need to be passed through to the docker container using the same methods described in the [Hardware Acceleration](hardware_acceleration.md#nvidia-gpu) section. If you pass through multiple GPUs, you can select which GPU is used for a detector with the `device` configuration parameter. The `device` parameter is an integer value of the GPU index, as shown by `nvidia-smi` within the container.
The TensorRT detector can be selected by specifying `tensorrt` as the model type. The GPU will need to be passed through to the docker container using the same methods described in the [Hardware Acceleration](hardware_acceleration.md#nvidia-gpus) section. If you pass through multiple GPUs, you can select which GPU is used for a detector with the `device` configuration parameter. The `device` parameter is an integer value of the GPU index, as shown by `nvidia-smi` within the container.
The TensorRT detector uses `.trt` model files that are located in `/config/model_cache/tensorrt` by default. These model path and dimensions used will depend on which model you have generated.
@@ -289,5 +300,89 @@ Replace `<your_codeproject_ai_server_ip>` and `<port>` with the IP address and p
To verify that the integration is working correctly, start Frigate and observe the logs for any error messages related to CodeProject.AI. Additionally, you can check the Frigate web interface to see if the objects detected by CodeProject.AI are being displayed and tracked properly.
# Community Supported Detectors
## Rockchip platform
Hardware accelerated object detection is supported on the following SoCs:
- RK3562
- RK3566
- RK3568
- RK3576
- RK3588
This implementation uses the [Rockchip's RKNN-Toolkit2](https://github.com/airockchip/rknn-toolkit2/), version v2.0.0.beta0. Currently, only [Yolo-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) is supported as object detection model.
### Prerequisites
Make sure to follow the [Rockchip specific installation instrucitions](/frigate/installation#rockchip-platform).
### Configuration
This `config.yml` shows all relevant options to configure the detector and explains them. All values shown are the default values (except for two). Lines that are required at least to use the detector are labeled as required, all other lines are optional.
```yaml
detectors:# required
rknn:# required
type:rknn# required
# number of NPU cores to use
# 0 means choose automatically
# increase for better performance if you have a multicore NPU e.g. set to 3 on rk3588
num_cores:0
model:# required
# name of model (will be automatically downloaded) or path to your own .rknn model file
# possible values are:
# - deci-fp16-yolonas_s
# - deci-fp16-yolonas_m
# - deci-fp16-yolonas_l
# - /config/model_cache/your_custom_model.rknn
path:deci-fp16-yolonas_s
# width and height of detection frames
width:320
height:320
# pixel format of detection frame
# default value is rgb but yolo models usually use bgr format
input_pixel_format:bgr# required
# shape of detection frame
input_tensor:nhwc
# needs to be adjusted to model, see below
labelmap_path:/labelmap.txt# required
```
The correct labelmap must be loaded for each model. If you use a custom model (see notes below), you must make sure to provide the correct labelmap. The table below lists the correct paths for the bundled models:
| `path` | `labelmap_path` |
| --------------------- | --------------------- |
| deci-fp16-yolonas\_\* | /labelmap/coco-80.txt |
### Choosing a model
:::warning
The pre-trained YOLO-NAS weights from DeciAI are subject to their license and can't be used commercially. For more information, see: https://docs.deci.ai/super-gradients/latest/LICENSE.YOLONAS.html
:::
The inference time was determined on a rk3588 with 3 NPU cores.
You can get the load of your NPU with the following command:
```bash
$ cat /sys/kernel/debug/rknpu/load
>> NPU load: Core0: 0%, Core1: 0%, Core2: 0%,
```
:::
- All models are automatically downloaded and stored in the folder `config/model_cache/rknn_cache`. After upgrading Frigate, you should remove older models to free up space.
- You can also provide your own `.rknn` model. You should not save your own models in the `rknn_cache` folder, store them directly in the `model_cache` folder or another subfolder. To convert a model to `.rknn` format see the `rknn-toolkit2` (requires a x86 machine). Note, that there is only post-processing for the supported models.
There are several types of object filters that can be used to reduce false positive rates.
## Object Scores
For object filters in your configuration, any single detection below `min_score` will be ignored as a false positive. `threshold` is based on the median of the history of scores (padded to 3 values) for a tracked object. Consider the following frames when `min_score` is set to 0.6 and threshold is set to 0.85:
@@ -18,6 +20,8 @@ For object filters in your configuration, any single detection below `min_score`
In frame 2, the score is below the `min_score` value, so Frigate ignores it and it becomes a 0.0. The computed score is the median of the score history (padding to at least 3 values), and only when that computed score crosses the `threshold` is the object marked as a true positive. That happens in frame 4 in the example.
show image of snapshot vs event with differing scores
### Minimum Score
Any detection below `min_score` will be immediately thrown out and never tracked because it is considered a false positive. If `min_score` is too low then false positives may be detected and tracked which can confuse the object tracker and may lead to wasted resources. If `min_score` is too high then lower scoring true positives like objects that are further away or partially occluded may be thrown out which can also confuse the tracker and cause valid events to be lost or disjointed.
@@ -32,11 +36,17 @@ False positives can also be reduced by filtering a detection based on its shape.
### Object Area
`min_area` and `max_area` filter on the area of an objects bounding box in pixels and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter. The recordings timeline can be used to determine the area of the bounding box in that frame by selecting a timeline item then mousing over or tapping the red box.
`min_area` and `max_area` filter on the area of an objects bounding box in pixels and can be used to reduce false positives that are outside the range of expected sizes. For example when a leaf is detected as a dog or when a large tree is detected as a person, these can be reduced by adding a `min_area` / `max_area` filter.
### Object Proportions
`min_ratio` and `max_ratio`filter on the ratio of width / height of an objects bounding box and can be used to reduce false positives. For example if a false positive is detected as very tall for a dog which is often wider, a `min_ratio` filter can be used to filter out these false positives.
`min_ratio` and `max_ratio`values are compared against a given detected object's width/height ratio (in pixels). If the ratio is outside this range, the object will be ignored as a false positive. This allows objects that are proportionally too short-and-wide (higher ratio) or too tall-and-narrow (smaller ratio) to be ignored.
:::info
Conceptually, a ratio of 1 is a square, 0.5 is a "tall skinny" box, and 2 is a "wide flat" box. If `min_ratio` is 1.0, any object that is taller than it is wide will be ignored. Similarly, if `max_ratio` is 1.0, then any object that is wider than it is tall will be ignored.
Frigate includes the object models listed below from the Google Coral test data.
Please note:
- `car` is listed twice because `truck` has been renamed to `car` by default. These object types are frequently confused.
- `person` is the only tracked object by default. See the [full configuration reference](index.md#full-configuration-reference) for an example of expanding the list of tracked objects.
Please note:
- `car` is listed twice because `truck` has been renamed to `car` by default. These object types are frequently confused.
- `person` is the only tracked object by default. See the [full configuration reference](reference.md) for an example of expanding the list of tracked objects.
Recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM-DD/HH/<camera_name>/MM.SS.mp4`. These recordings are written directly from your camera stream without re-encoding. Each camera supports a configurable retention policy in the config. Frigate chooses the largest matching retention value between the recording retention and the event retention when determining if a recording should be removed.
Recordings can be enabled and are stored at `/media/frigate/recordings`. The folder structure for the recordings is `YYYY-MM-DD/HH/<camera_name>/MM.SS.mp4` in **UTC time**. These recordings are written directly from your camera stream without re-encoding. Each camera supports a configurable retention policy in the config. Frigate chooses the largest matching retention value between the recording retention and the event retention when determining if a recording should be removed.
New recording segments are written from the camera stream to cache, they are only moved to disk if they match the setup recording retention policy.
H265 recordings can be viewed in Chrome 108+, Edge and Safari only. All other browsers require recordings to be encoded with H264.
## Common recording configurations
### Most conservative: Ensure all video is saved
For users deploying Frigate in environments where it is important to have contiguous video stored even if there was no detectable motion, the following config will store all video for 3 days. After 3 days, only video containing motion and overlapping with events will be retained until 30 days have passed.
```yaml
record:
enabled:True
retain:
days:3
mode:all
events:
retain:
default:30
mode:motion
```
### Reduced storage: Only saving video when motion is detected
In order to reduce storage requirements, you can adjust your config to only retain video where motion was detected.
```yaml
record:
enabled:True
retain:
days:3
mode:motion
events:
retain:
default:30
mode:motion
```
### Minimum: Events only
If you only want to retain video that occurs during an event, this config will discard video unless an event is ongoing.
```yaml
record:
enabled:True
retain:
days:0
mode:all
events:
retain:
default:30
mode:motion
```
## Will Frigate delete old recordings if my storage runs out?
As of Frigate 0.12 if there is less than an hour left of storage, the oldest 2 hours of recordings will be deleted.
## What if I don't want 24/7 recordings?
## Configuring Recording Retention
Frigate supports both continuous and event based recordings with separate retention modes and retention periods.
:::tip
Retention configs support decimals meaning they can be configured to retain `0.5` days, for example.
:::
### Continuous Recording
The number of days to retain continuous recordings can be set via the following config where X is a number, by default continuous recording is disabled.
```yaml
record:
enabled:True
retain:
days:1# <- number of days to keep continuous recordings
```
Continuous recording supports different retention modes [which are described below](#what-do-the-different-retain-modes-mean)
### Event Recording
If you only used clips in previous versions with recordings disabled, you can use the following config to get the same behavior. This is also the default behavior when recordings are enabled.
@@ -22,34 +95,31 @@ record:
enabled:True
events:
retain:
default:10
default:10# <- number of days to keep event recordings
```
This configuration will retain recording segments that overlap with events and have active tracked objects for 10 days. Because multiple events can reference the same recording segments, this avoids storing duplicate footage for overlapping events and reduces overall storage needs.
When `retain -> days` is set to `0`, segments will be deleted from the cache if no events are in progress.
## Can I have "24/7" recordings, but only at certain times?
Using Frigate UI, HomeAssistant, or MQTT, cameras can be automated to only record in certain situations or at certain times.
**WARNING**: Recordings still must be enabled in the config. If a camera has recordings disabled in the config, enabling via the methods listed above will have no effect.
## What do the different retain modes mean?
Frigate saves from the stream with the `record` role in 10 second segments. These options determine which recording segments are kept for 24/7 recording (but can also affect events).
Frigate saves from the stream with the `record` role in 10 second segments. These options determine which recording segments are kept for continuous recording (but can also affect events).
Let's say you have Frigate configured so that your doorbell camera would retain the last **2** days of continuous recording.
Let's say you have Frigate configured so that your doorbell camera would retain the last **2** days of 24/7 recording.
- With the `all` option all 48 hours of those two days would be kept and viewable.
- With the `motion` option the only parts of those 48 hours would be segments that Frigate detected motion. This is the middle ground option that won't keep all 48 hours, but will likely keep all segments of interest along with the potential for some extra segments.
- With the `active_objects` option the only segments that would be kept are those where there was a true positive object that was not considered stationary.
The same options are available with events. Let's consider a scenario where you drive up and park in your driveway, go inside, then come back out 4 hours later.
- 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
@@ -61,11 +131,13 @@ record:
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
@@ -81,17 +153,43 @@ record:
car:7
```
## Can I have "continuous" recordings, but only at certain times?
Using Frigate UI, HomeAssistant, or MQTT, cameras can be automated to only record in certain situations or at certain times.
## How do I export recordings?
The export page in the Frigate WebUI allows for exporting real time clips with a designated start and stop time as well as exporting a timelapse for a designated start and stop time. These exports can take a while so it is important to leave the file until it is no longer in progress.
Footage can be exported from Frigate by right-clicking (desktop) or long pressing (mobile) on a review item in the Review pane or by clicking the Export button in the History view. Exported footage is then organized and searchable through the Export view, accessible from the main navigation bar.
## Syncing Recordings With Disk
### Time-lapse export
In some cases the recordings files may be deleted but Frigate will not know this has happened. Sync on startup can be enabled which will tell Frigate to check the file system and delete any db entries for files which don't exist.
Time lapse exporting is available only via the [HTTP API](../integrations/api.md#post-apiexportcamerastartstart-timestampendend-timestamp).
When exporting a time-lapse the default speed-up is 25x with 30 FPS. This means that every 25 seconds of (real-time) recording is condensed into 1 second of time-lapse video (always without audio) with a smoothness of 30 FPS.
To configure the speed-up factor, the frame rate and further custom settings, the configuration parameter `timelapse_args` can be used. The below configuration example would change the time-lapse speed to 60x (for fitting 1 hour of recording into 1 minute of time-lapse) with 25 FPS:
```yaml
record:
sync_on_startup:True
enabled:True
export:
timelapse_args:"-vf setpts=PTS/60 -r 25"
```
:::tip
When using `hwaccel_args` globally hardware encoding is used for time lapse generation. The encoder determines its own behavior so the resulting file size may be undesirably large.
To reduce the output file size the ffmpeg parameter `-qp n` can be utilized (where `n` stands for the value of the quantisation parameter). The value can be adjusted to get an acceptable tradeoff between quality and file size for the given scenario.
:::
## Syncing Recordings With Disk
In some cases the recordings files may be deleted but Frigate will not know this has happened. Recordings sync can be enabled which will tell Frigate to check the file system and delete any db entries for files which don't exist.
It is not recommended to copy this full configuration file. Only specify values that are different from the defaults. Configuration options and default values may change in future versions.
:::
```yaml
mqtt:
# Optional: Enable mqtt server (default: shown below)
enabled:True
# Required: host name
host:mqtt.server.com
# Optional: port (default: shown below)
port:1883
# Optional: topic prefix (default: shown below)
# NOTE: must be unique if you are running multiple instances
topic_prefix:frigate
# Optional: client id (default: shown below)
# NOTE: must be unique if you are running multiple instances
client_id:frigate
# Optional: user
# NOTE: MQTT user can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
# e.g. user: '{FRIGATE_MQTT_USER}'
user:mqtt_user
# Optional: password
# NOTE: MQTT password can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
# e.g. password: '{FRIGATE_MQTT_PASSWORD}'
password:password
# Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
tls_ca_certs:/path/to/ca.crt
# Optional: tls_client_cert and tls_client key in order to use self-signed client
# certificates (default: None)
# NOTE: certificate must not be password-protected
# do not set user and password when using a client certificate
tls_client_cert:/path/to/client.crt
tls_client_key:/path/to/client.key
# Optional: tls_insecure (true/false) for enabling TLS verification of
# the server hostname in the server certificate (default: None)
tls_insecure:false
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval:60
# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
# Required: name of the detector
detector_name:
# Required: type of the detector
# Frigate provided types include 'cpu', 'edgetpu', 'openvino' and 'tensorrt' (default: shown below)
# Additional detector types can also be plugged in.
# Detectors may require additional configuration.
# Refer to the Detectors configuration page for more information.
type:cpu
# Optional: Database configuration
database:
# The path to store the SQLite DB (default: shown below)
path:/config/frigate.db
# Optional: TLS configuration
tls:
# Optional: Enable TLS for port 8971 (default: shown below)
enabled:True
# Optional: Proxy configuration
proxy:
# Optional: Mapping for headers from upstream proxies. Only used if Frigate's auth
# is disabled.
# NOTE: Many authentication proxies pass a header downstream with the authenticated
# user name. Not all values are supported. It must be a whitelisted header.
# See the docs for more info.
header_map:
user:x-forwarded-user
# Optional: Url for logging out a user. This sets the location of the logout url in
# the UI.
logout_url:/api/logout
# Optional: Auth secret that is checked against the X-Proxy-Secret header sent from
# the proxy. If not set, all requests are trusted regardless of origin.
auth_secret:None
# Optional: Authentication configuration
auth:
# Optional: Enable authentication
enabled:True
# Optional: Reset the admin user password on startup (default: shown below)
# New password is printed in the logs
reset_admin_password:False
# Optional: Cookie to store the JWT token for native auth (default: shown below)
cookie_name:frigate_token
# Optional: Set secure flag on cookie. (default: shown below)
# NOTE: This should be set to True if you are using TLS
cookie_secure:False
# Optional: Session length in seconds (default: shown below)
session_length:86400# 24 hours
# Optional: Refresh time in seconds (default: shown below)
# When the session is going to expire in less time than this setting,
# it will be refreshed back to the session_length.
refresh_time:43200# 12 hours
# Optional: Rate limiting for login failures to help prevent brute force
# login attacks (default: shown below)
# See the docs for more information on valid values
failed_login_rate_limit:None
# Optional: Trusted proxies for determining IP address to rate limit
# NOTE: This is only used for rate limiting login attempts and does not bypass
# authentication. See the authentication docs for more details.
trusted_proxies:[]
# Optional: Number of hashing iterations for user passwords
# As of Feb 2023, OWASP recommends 600000 iterations for PBKDF2-SHA256
# NOTE: changing this value will not automatically update password hashes, you
# will need to change each user password for it to apply
hash_iterations:600000
# Optional: model modifications
model:
# Optional: path to the model (default: automatic based on detector)
path:/edgetpu_model.tflite
# Optional: path to the labelmap (default: shown below)
labelmap_path:/labelmap.txt
# Required: Object detection model input width (default: shown below)
width:320
# Required: Object detection model input height (default: shown below)
height:320
# Optional: Object detection model input colorspace
# Valid values are rgb, bgr, or yuv. (default: shown below)
input_pixel_format:rgb
# Optional: Object detection model input tensor format
# Valid values are nhwc or nchw (default: shown below)
input_tensor:nhwc
# Optional: Object detection model type, currently only used with the OpenVINO detector
# Valid values are ssd, yolox, yolonas (default: shown below)
model_type:ssd
# Optional: Label name modifications. These are merged into the standard labelmap.
# Optional: global hwaccel args (default: auto detect)
# NOTE: See hardware acceleration docs for your specific device
hwaccel_args:"auto"
# Optional: global input args (default: shown below)
input_args:preset-rtsp-generic
# Optional: global output args
output_args:
# Optional: output args for detect streams (default: shown below)
detect:-threads 2 -f rawvideo -pix_fmt yuv420p
# Optional: output args for record streams (default: shown below)
record:preset-record-generic
# Optional: Time in seconds to wait before ffmpeg retries connecting to the camera. (default: shown below)
# If set too low, frigate will retry a connection to the camera's stream too frequently, using up the limited streams some cameras can allow at once
# If set too high, then if a ffmpeg crash or camera stream timeout occurs, you could potentially lose up to a maximum of retry_interval second(s) of footage
# NOTE: this can be a useful setting for Wireless / Battery cameras to reduce how much footage is potentially lost during a connection timeout.
retry_interval:10
# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
# Optional: width of the frame for the input with the detect role (default: use native stream resolution)
width:1280
# Optional: height of the frame for the input with the detect role (default: use native stream resolution)
height:720
# Optional: desired fps for your camera for the input with the detect role (default: shown below)
# NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
fps:5
# Optional: enables detection for the camera (default: True)
enabled:True
# Optional: Number of consecutive detection hits required for an object to be initialized in the tracker. (default: 1/2 the frame rate)
min_initialized:2
# Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
max_disappeared:25
# Optional: Configuration for stationary object tracking
stationary:
# Optional: Frequency for confirming stationary objects (default: same as threshold)
# When set to 1, object detection will run to confirm the object still exists on every frame.
# If set to 10, object detection will run to confirm the object still exists on every 10th frame.
interval:50
# Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
threshold:50
# Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
# This can help with false positives for objects that should only be stationary for a limited amount of time.
# It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
# car at the default.
# WARNING: Setting these values overrides default behavior and disables stationary object tracking.
# There are very few situations where you would want it disabled. It is NOT recommended to
# copy these values from the example config into your config unless you know they are needed.
max_frames:
# Optional: Default for all object types (default: not set, track forever)
default:3000
# Optional: Object specific values
objects:
person:1000
# Optional: Milliseconds to offset detect annotations by (default: shown below).
# There can often be latency between a recording and the detect process,
# especially when using separate streams for detect and record.
# Use this setting to make the timeline bounding boxes more closely align
# with the recording. The value can be positive or negative.
# TIP: Imagine there is an event clip with a person walking from left to right.
# If the event timeline bounding box is consistently to the left of the person
# then the value should be decreased. Similarly, if a person is walking from
# left to right and the bounding box is consistently ahead of the person
# then the value should be increased.
# TIP: This offset is dynamic so you can change the value and it will update existing
# events, this makes it easy to tune.
# WARNING: Fast moving objects will likely not have the bounding box align.
annotation_offset:0
# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
# Optional: list of objects to track from labelmap.txt (default: shown below)
track:
- person
# Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
# Checks based on the bottom center of the bounding box of the object.
# NOTE: This mask is COMBINED with the object type specific mask below
Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at `rtsp://<frigate_host>:8554/<camera_name>`. Port 8554 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](#reduce-connections-to-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.
Frigate uses [go2rtc](https://github.com/AlexxIT/go2rtc/tree/v1.8.1) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `go2rtc` in the config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc/tree/v1.8.1#configuration) for more advanced configurations and features.
Frigate uses [go2rtc](https://github.com/AlexxIT/go2rtc/tree/v1.9.4) to provide its restream and MSE/WebRTC capabilities. The go2rtc config is hosted at the `go2rtc` in the config, see [go2rtc docs](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#configuration) for more advanced configurations and features.
:::note
You can access the go2rtc webUI at `http://frigate_ip:5000/live/webrtc` which can be helpful to debug as well as provide useful information about your camera streams.
You can access the go2rtc stream info at `/api/go2rtc/streams` which can be helpful to debug as well as provide useful information about your camera streams.
:::
### Birdseye Restream
Birdseye RTSP restream can be accessed at `rtsp://<frigate_host>:8554/birdseye`. Enabling the birdseye restream will cause birdseye to run 24/7 which may increase CPU usage somewhat.
```yaml
birdseye:
restream:true
@@ -32,16 +33,11 @@ go2rtc:
rtsp:
username:"admin"
password:"pass"
streams:
...
streams:...
```
**NOTE:** This does not apply to localhost requests, there is no need to provide credentials when using the restream as a source for frigate cameras.
## RTMP (Deprecated)
In previous Frigate versions RTMP was used for re-streaming. RTMP has disadvantages however including being incompatible with H.265, high bitrates, and certain audio codecs. RTMP is deprecated and it is recommended to move to the new restream role.
## Reduce Connections To Camera
Some cameras only support one active connection or you may just want to have a single connection open to the camera. The RTSP restream allows this to be possible.
@@ -138,7 +134,7 @@ cameras:
## Advanced Restream Configurations
The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.8.1#source-exec) source in go2rtc can be used for custom ffmpeg commands. An example is below:
The [exec](https://github.com/AlexxIT/go2rtc/tree/v1.9.4#source-exec) source in go2rtc can be used for custom ffmpeg commands. An example is below:
NOTE: The output will need to be passed with two curly braces `{{output}}`
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.