Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
-
+
diff --git a/72a19f07.a7e83a1a.js b/72a19f07.a7e83a1a.js
deleted file mode 100644
index 5c72088da..000000000
--- a/72a19f07.a7e83a1a.js
+++ /dev/null
@@ -1 +0,0 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{78:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return b})),a.d(t,"metadata",(function(){return l})),a.d(t,"toc",(function(){return c})),a.d(t,"default",(function(){return o}));var n=a(3),r=a(7),i=(a(0),a(92)),b={id:"api",title:"HTTP API"},l={unversionedId:"usage/api",id:"usage/api",isDocsHomePage:!1,title:"HTTP API",description:"A web server is available on port 5000 with the following endpoints.",source:"@site/docs/usage/api.md",slug:"/usage/api",permalink:"/frigate/usage/api",editUrl:"https://github.com/blakeblackshear/frigate/edit/master/docs/docs/usage/api.md",version:"current",sidebar:"docs",previous:{title:"Web Interface",permalink:"/frigate/usage/web"},next:{title:"MQTT",permalink:"/frigate/usage/mqtt"}},c=[{value:"/api/<camera_name>",id:"apicamera_name",children:[]},{value:"/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]",id:"apicamera_nameobject_namebestjpgh300crop1",children:[]},{value:"/api/<camera_name>/latest.jpg[?h=300]",id:"apicamera_namelatestjpgh300",children:[]},{value:"/api/stats",id:"apistats",children:[]},{value:"/api/config",id:"apiconfig",children:[]},{value:"/api/version",id:"apiversion",children:[]},{value:"/api/events",id:"apievents",children:[]},{value:"/api/events/summary",id:"apieventssummary",children:[]},{value:"/api/events/<id>",id:"apieventsid",children:[]},{value:"/api/events/<id>/thumbnail.jpg",id:"apieventsidthumbnailjpg",children:[]},{value:"/api/events/<id>/snapshot.jpg",id:"apieventsidsnapshotjpg",children:[]},{value:"/clips/<camera>-<id>.mp4",id:"clipscamera-idmp4",children:[]},{value:"/clips/<camera>-<id>.jpg",id:"clipscamera-idjpg",children:[]}],p={toc:c};function o(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(i.b)("wrapper",Object(n.a)({},p,a,{components:t,mdxType:"MDXLayout"}),Object(i.b)("p",null,"A web server is available on port 5000 with the following endpoints."),Object(i.b)("h3",{id:"apicamera_name"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/")),Object(i.b)("p",null,"An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use."),Object(i.b)("p",null,"Accepts the following query string parameters:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"fps")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Frame rate")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"h")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"bbox")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"timestamp")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"zones")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"mask")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"motion")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"regions")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(i.b)("p",null,"You can access a higher resolution mjpeg stream by appending ",Object(i.b)("inlineCode",{parentName:"p"},"h=height-in-pixels")," to the endpoint. For example ",Object(i.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?h=1080"),". You can also increase the FPS by appending ",Object(i.b)("inlineCode",{parentName:"p"},"fps=frame-rate")," to the URL such as ",Object(i.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?fps=10")," or both with ",Object(i.b)("inlineCode",{parentName:"p"},"?fps=10&h=1000"),"."),Object(i.b)("h3",{id:"apicamera_nameobject_namebestjpgh300crop1"},Object(i.b)("inlineCode",{parentName:"h3"},"/api///best.jpg[?h=300&crop=1]")),Object(i.b)("p",null,"The best snapshot for any object type. It is a full resolution image by default."),Object(i.b)("p",null,"Example parameters:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall"),Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"crop=1"),": crops the image to the region of the detection rather than returning the entire image")),Object(i.b)("h3",{id:"apicamera_namelatestjpgh300"},Object(i.b)("inlineCode",{parentName:"h3"},"/api//latest.jpg[?h=300]")),Object(i.b)("p",null,"The most recent frame that frigate has finished processing. It is a full resolution image by default."),Object(i.b)("p",null,"Accepts the following query string parameters:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"h")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"bbox")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"timestamp")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"zones")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"mask")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"motion")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"regions")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(i.b)("p",null,"Example parameters:"),Object(i.b)("ul",null,Object(i.b)("li",{parentName:"ul"},Object(i.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall")),Object(i.b)("h3",{id:"apistats"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/stats")),Object(i.b)("p",null,"Contains some granular debug info that can be used for sensors in HomeAssistant."),Object(i.b)("p",null,"Sample response:"),Object(i.b)("pre",null,Object(i.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n /* Per Camera Stats */\n "back": {\n /***************\n * Frames per second being consumed from your camera. If this is higher\n * than it is supposed to be, you should set -r FPS in your input_args.\n * camera_fps = process_fps + skipped_fps\n ***************/\n "camera_fps": 5.0,\n /***************\n * Number of times detection is run per second. This can be higher than\n * your camera FPS because frigate often looks at the same frame multiple times\n * or in multiple locations\n ***************/\n "detection_fps": 1.5,\n /***************\n * PID for the ffmpeg process that consumes this camera\n ***************/\n "capture_pid": 27,\n /***************\n * PID for the process that runs detection for this camera\n ***************/\n "pid": 34,\n /***************\n * Frames per second being processed by frigate.\n ***************/\n "process_fps": 5.1,\n /***************\n * Frames per second skip for processing by frigate.\n ***************/\n "skipped_fps": 0.0\n },\n /***************\n * Sum of detection_fps across all cameras and detectors.\n * This should be the sum of all detection_fps values from cameras.\n ***************/\n "detection_fps": 5.0,\n /* Detectors Stats */\n "detectors": {\n "coral": {\n /***************\n * Timestamp when object detection started. If this value stays non-zero and constant\n * for a long time, that means the detection process is stuck.\n ***************/\n "detection_start": 0.0,\n /***************\n * Time spent running object detection in milliseconds.\n ***************/\n "inference_speed": 10.48,\n /***************\n * PID for the shared process that runs object detection on the Coral.\n ***************/\n "pid": 25321\n }\n },\n "service": {\n /* Uptime in seconds */\n "uptime": 10,\n "version": "0.8.0-8883709"\n }\n}\n')),Object(i.b)("h3",{id:"apiconfig"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/config")),Object(i.b)("p",null,"A json representation of your configuration"),Object(i.b)("h3",{id:"apiversion"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/version")),Object(i.b)("p",null,"Version info"),Object(i.b)("h3",{id:"apievents"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/events")),Object(i.b)("p",null,"Events from the database. Accepts the following query string parameters:"),Object(i.b)("table",null,Object(i.b)("thead",{parentName:"table"},Object(i.b)("tr",{parentName:"thead"},Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(i.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(i.b)("tbody",{parentName:"table"},Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"before")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"after")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"camera")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Camera name")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"label")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Label name")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"zone")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Zone name")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"limit")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Limit the number of events returned")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"has_snapshot")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have snapshots (0 or 1)")),Object(i.b)("tr",{parentName:"tbody"},Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(i.b)("inlineCode",{parentName:"td"},"has_clip")),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(i.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have clips (0 or 1)")))),Object(i.b)("h3",{id:"apieventssummary"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/events/summary")),Object(i.b)("p",null,"Returns summary data for events in the database. Used by the HomeAssistant integration."),Object(i.b)("h3",{id:"apieventsid"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/events/")),Object(i.b)("p",null,"Returns data for a single event."),Object(i.b)("h3",{id:"apieventsidthumbnailjpg"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/events//thumbnail.jpg")),Object(i.b)("p",null,"Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ",Object(i.b)("inlineCode",{parentName:"p"},"?format=android")," will convert the thumbnail to 2:1 aspect ratio."),Object(i.b)("h3",{id:"apieventsidsnapshotjpg"},Object(i.b)("inlineCode",{parentName:"h3"},"/api/events//snapshot.jpg")),Object(i.b)("p",null,"Returns the snapshot image for the event id. Works while the event is in progress and after completion."),Object(i.b)("p",null,"Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:\n|param|Type|Description|\n|----|-----|--|\n|",Object(i.b)("inlineCode",{parentName:"p"},"h"),"|int|Height in pixels|\n|",Object(i.b)("inlineCode",{parentName:"p"},"bbox"),"|int|Show bounding boxes for detected objects (0 or 1)|\n|",Object(i.b)("inlineCode",{parentName:"p"},"timestamp"),"|int|Print the timestamp in the upper left (0 or 1)|\n|",Object(i.b)("inlineCode",{parentName:"p"},"crop"),"|int|Crop the snapshot to the (0 or 1)|"),Object(i.b)("h3",{id:"clipscamera-idmp4"},Object(i.b)("inlineCode",{parentName:"h3"},"/clips/-.mp4")),Object(i.b)("p",null,"Video clip for the given camera and event id."),Object(i.b)("h3",{id:"clipscamera-idjpg"},Object(i.b)("inlineCode",{parentName:"h3"},"/clips/-.jpg")),Object(i.b)("p",null,"JPG snapshot for the given camera and event id."))}o.isMDXComponent=!0},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function i(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),o=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=o(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},s={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},m=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,i=e.originalType,b=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=o(a),m=n,j=d["".concat(b,".").concat(m)]||d[m]||s[m]||i;return a?r.a.createElement(j,l(l({ref:t},p),{},{components:a})):r.a.createElement(j,l({ref:t},p))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=a.length,b=new Array(i);b[0]=m;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,b[1]=l;for(var p=2;p/api/<camera_name>",id:"apicamera_name",children:[]},{value:"/api/<camera_name>/<object_name>/best.jpg[?h=300&crop=1]",id:"apicamera_nameobject_namebestjpgh300crop1",children:[]},{value:"/api/<camera_name>/latest.jpg[?h=300]",id:"apicamera_namelatestjpgh300",children:[]},{value:"/api/stats",id:"apistats",children:[]},{value:"/api/config",id:"apiconfig",children:[]},{value:"/api/version",id:"apiversion",children:[]},{value:"/api/events",id:"apievents",children:[]},{value:"/api/events/summary",id:"apieventssummary",children:[]},{value:"/api/events/<id>",id:"apieventsid",children:[]},{value:"/api/events/<id>/thumbnail.jpg",id:"apieventsidthumbnailjpg",children:[]},{value:"/api/events/<id>/snapshot.jpg",id:"apieventsidsnapshotjpg",children:[]},{value:"/clips/<camera>-<id>.mp4",id:"clipscamera-idmp4",children:[]},{value:"/clips/<camera>-<id>.jpg",id:"clipscamera-idjpg",children:[]}],p={toc:c};function o(e){var t=e.components,a=Object(r.a)(e,["components"]);return Object(b.b)("wrapper",Object(n.a)({},p,a,{components:t,mdxType:"MDXLayout"}),Object(b.b)("p",null,"A web server is available on port 5000 with the following endpoints."),Object(b.b)("h3",{id:"apicamera_name"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/")),Object(b.b)("p",null,"An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"fps")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Frame rate")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"You can access a higher resolution mjpeg stream by appending ",Object(b.b)("inlineCode",{parentName:"p"},"h=height-in-pixels")," to the endpoint. For example ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?h=1080"),". You can also increase the FPS by appending ",Object(b.b)("inlineCode",{parentName:"p"},"fps=frame-rate")," to the URL such as ",Object(b.b)("inlineCode",{parentName:"p"},"http://localhost:5000/back?fps=10")," or both with ",Object(b.b)("inlineCode",{parentName:"p"},"?fps=10&h=1000"),"."),Object(b.b)("h3",{id:"apicamera_nameobject_namebestjpgh300crop1"},Object(b.b)("inlineCode",{parentName:"h3"},"/api///best.jpg[?h=300&crop=1]")),Object(b.b)("p",null,"The best snapshot for any object type. It is a full resolution image by default."),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall"),Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"crop=1"),": crops the image to the region of the detection rather than returning the entire image")),Object(b.b)("h3",{id:"apicamera_namelatestjpgh300"},Object(b.b)("inlineCode",{parentName:"h3"},"/api//latest.jpg[?h=300]")),Object(b.b)("p",null,"The most recent frame that frigate has finished processing. It is a full resolution image by default."),Object(b.b)("p",null,"Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zones")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw the zones on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"mask")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Overlay the mask on the image (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"motion")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw blue boxes for areas with detected motion (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"regions")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Draw green boxes for areas where object detection was run (0 or 1)")))),Object(b.b)("p",null,"Example parameters:"),Object(b.b)("ul",null,Object(b.b)("li",{parentName:"ul"},Object(b.b)("inlineCode",{parentName:"li"},"h=300"),": resizes the image to 300 pixes tall")),Object(b.b)("h3",{id:"apistats"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/stats")),Object(b.b)("p",null,"Contains some granular debug info that can be used for sensors in HomeAssistant."),Object(b.b)("p",null,"Sample response:"),Object(b.b)("pre",null,Object(b.b)("code",Object(n.a)({parentName:"pre"},{className:"language-json"}),'{\n /* Per Camera Stats */\n "back": {\n /***************\n * Frames per second being consumed from your camera. If this is higher\n * than it is supposed to be, you should set -r FPS in your input_args.\n * camera_fps = process_fps + skipped_fps\n ***************/\n "camera_fps": 5.0,\n /***************\n * Number of times detection is run per second. This can be higher than\n * your camera FPS because frigate often looks at the same frame multiple times\n * or in multiple locations\n ***************/\n "detection_fps": 1.5,\n /***************\n * PID for the ffmpeg process that consumes this camera\n ***************/\n "capture_pid": 27,\n /***************\n * PID for the process that runs detection for this camera\n ***************/\n "pid": 34,\n /***************\n * Frames per second being processed by frigate.\n ***************/\n "process_fps": 5.1,\n /***************\n * Frames per second skip for processing by frigate.\n ***************/\n "skipped_fps": 0.0\n },\n /***************\n * Sum of detection_fps across all cameras and detectors.\n * This should be the sum of all detection_fps values from cameras.\n ***************/\n "detection_fps": 5.0,\n /* Detectors Stats */\n "detectors": {\n "coral": {\n /***************\n * Timestamp when object detection started. If this value stays non-zero and constant\n * for a long time, that means the detection process is stuck.\n ***************/\n "detection_start": 0.0,\n /***************\n * Time spent running object detection in milliseconds.\n ***************/\n "inference_speed": 10.48,\n /***************\n * PID for the shared process that runs object detection on the Coral.\n ***************/\n "pid": 25321\n }\n },\n "service": {\n /* Uptime in seconds */\n "uptime": 10,\n "version": "0.8.0-8883709"\n }\n}\n')),Object(b.b)("h3",{id:"apiconfig"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/config")),Object(b.b)("p",null,"A json representation of your configuration"),Object(b.b)("h3",{id:"apiversion"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/version")),Object(b.b)("p",null,"Version info"),Object(b.b)("h3",{id:"apievents"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events")),Object(b.b)("p",null,"Events from the database. Accepts the following query string parameters:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"before")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"after")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Epoch time")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"camera")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Camera name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"label")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Label name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"zone")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"str"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Zone name")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"limit")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Limit the number of events returned")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_snapshot")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have snapshots (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"has_clip")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Filter to events that have clips (0 or 1)")))),Object(b.b)("h3",{id:"apieventssummary"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/summary")),Object(b.b)("p",null,"Returns summary data for events in the database. Used by the HomeAssistant integration."),Object(b.b)("h3",{id:"apieventsid"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events/")),Object(b.b)("p",null,"Returns data for a single event."),Object(b.b)("h3",{id:"apieventsidthumbnailjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//thumbnail.jpg")),Object(b.b)("p",null,"Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ",Object(b.b)("inlineCode",{parentName:"p"},"?format=android")," will convert the thumbnail to 2:1 aspect ratio."),Object(b.b)("h3",{id:"apieventsidsnapshotjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/api/events//snapshot.jpg")),Object(b.b)("p",null,"Returns the snapshot image for the event id. Works while the event is in progress and after completion."),Object(b.b)("p",null,"Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:"),Object(b.b)("table",null,Object(b.b)("thead",{parentName:"table"},Object(b.b)("tr",{parentName:"thead"},Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"param"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Type"),Object(b.b)("th",Object(n.a)({parentName:"tr"},{align:null}),"Description"))),Object(b.b)("tbody",{parentName:"table"},Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"h")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Height in pixels")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"bbox")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Show bounding boxes for detected objects (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"timestamp")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Print the timestamp in the upper left (0 or 1)")),Object(b.b)("tr",{parentName:"tbody"},Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),Object(b.b)("inlineCode",{parentName:"td"},"crop")),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"int"),Object(b.b)("td",Object(n.a)({parentName:"tr"},{align:null}),"Crop the snapshot to the (0 or 1)")))),Object(b.b)("h3",{id:"clipscamera-idmp4"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.mp4")),Object(b.b)("p",null,"Video clip for the given camera and event id."),Object(b.b)("h3",{id:"clipscamera-idjpg"},Object(b.b)("inlineCode",{parentName:"h3"},"/clips/-.jpg")),Object(b.b)("p",null,"JPG snapshot for the given camera and event id."))}o.isMDXComponent=!0},92:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return j}));var n=a(0),r=a.n(n);function b(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function l(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p=r.a.createContext({}),o=function(e){var t=r.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):l(l({},t),e)),a},d=function(e){var t=o(e.components);return r.a.createElement(p.Provider,{value:t},e.children)},m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.a.createElement(r.a.Fragment,{},t)}},s=r.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,b=e.originalType,i=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=o(a),s=n,j=d["".concat(i,".").concat(s)]||d[s]||m[s]||b;return a?r.a.createElement(j,l(l({ref:t},p),{},{components:a})):r.a.createElement(j,l({ref:t},p))}));function j(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var b=a.length,i=new Array(b);i[0]=s;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l.mdxType="string"==typeof e?e:n,i[1]=l;for(var p=2;pAdvanced | Frigate
-
+
@@ -20,7 +20,7 @@
Event and clip information is managed in a sqlite database at /media/frigate/clips/frigate.db. If that database is deleted, clips will be orphaned and will need to be cleaned up manually. They also won't show up in the Media Browser within HomeAssistant.
If you are storing your clips on a network share (SMB, NFS, etc), you may get a database is locked error message on startup. You can customize the location of the database in the config if necessary.
This may need to be in a custom location if network storage is used for clips.
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. You must retain the same number of labels, but you can change the names. To change:
The default config will look for a USB Coral device. If you do not have a Coral, you will need to configure a CPU detector. If you have PCI or multiple Coral devices, you need to configure your detector devices in the config file. When using multiple detectors, they run in dedicated processes, but pull from a common queue of requested detections across all cameras.
Tune your object filters to adjust false positives: min_area, max_area, min_score, threshold.
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:
Frame
Current Score
Score History
Computed Score
Detected Object
1
0.7
0.0, 0, 0.7
0.0
No
2
0.55
0.0, 0.7, 0.0
0.0
No
3
0.85
0.7, 0.0, 0.85
0.7
No
4
0.90
0.7, 0.85, 0.95, 0.90
0.875
Yes
5
0.88
0.7, 0.85, 0.95, 0.90, 0.88
0.88
Yes
6
0.95
0.7, 0.85, 0.95, 0.90, 0.88, 0.95
0.89
Yes
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.
HassOS users can manage their configuration directly in the addon Configuration tab. For other installations, the default location for the config file is /config/config.yml. This can be overridden with the CONFIG_FILE environment variable. Camera specific ffmpeg parameters are documented here.
It is recommended to start with a minimal configuration and add to it:
Each of your cameras must be configured. The following is the minimum required to register a camera in Frigate. Check the camera configuration page for a complete list of options.
This setting, for example, allows Frigate to consume my 10-15fps camera streams on
my relatively low powered Haswell machine with relatively low cpu usage.
-
+
diff --git a/configuration/optimizing/index.html b/configuration/optimizing/index.html
index fb0a32c8d..a0257946e 100644
--- a/configuration/optimizing/index.html
+++ b/configuration/optimizing/index.html
@@ -7,7 +7,7 @@
Optimizing performance | Frigate
-
+
@@ -23,7 +23,7 @@
NOTICE: If you are using the addon, ensure you turn off Protection mode for hardware acceleration.
AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver (https://trac.ffmpeg.org/wiki/Hardware/QuickSync)
Note: You also need to set LIBVA_DRIVER_NAME=radeonsi as an environment variable on the container.
ffmpeg:
hwaccel_args:
--hwaccel
- vaapi
--hwaccel_device
- /dev/dri/renderD128
Nvidia GPU based decoding via NVDEC is supported, but requires special configuration. See the nvidia NVDEC documentation for more details.
Cameras that output H.264 video and AAC audio will offer the most compatibility with all features of Frigate and HomeAssistant. It is also helpful if your camera supports multiple substreams to allow different resolutions to be used for detection, streaming, clips, and recordings without re-encoding.
A complete and local NVR designed for HomeAssistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.
Use of a Google Coral Accelerator is optional, but highly recommended. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.
For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices.
The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with "Bus error" messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.
You can calculate the necessary shm-size for each camera with the following formula:
My mjpeg stream or snapshots look green and crazy#
This almost always means that the width/height defined for your camera are not correct. Double check the resolution with vlc or another player. Also make sure you don't have the width and height values backwards.
Example:
"[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5639eeb6e140] moov atom not found"#
These messages in the logs are expected in certain situations. Frigate checks the integrity of the video cache before assembling clips. Occasionally these cached files will be invalid and cleaned up automatically.
"ffmpeg didnt return a frame. something is wrong"#
Turn on logging for the ffmpeg process by overriding the global_args and setting the log level to info (the default is fatal). Note that all ffmpeg logs show up in the Frigate logs as ERROR level. This does not mean they are actually errors.
If you see repeated "On connect called" messages in your config, check for another instance of frigate. This happens when multiple frigate containers are trying to connect to mqtt with the same client_id.
An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use.
Accepts the following query string parameters:
param
Type
Description
fps
int
Frame rate
h
int
Height in pixels
bbox
int
Show bounding boxes for detected objects (0 or 1)
timestamp
int
Print the timestamp in the upper left (0 or 1)
zones
int
Draw the zones on the image (0 or 1)
mask
int
Overlay the mask on the image (0 or 1)
motion
int
Draw blue boxes for areas with detected motion (0 or 1)
regions
int
Draw green boxes for areas where object detection was run (0 or 1)
You can access a higher resolution mjpeg stream by appending h=height-in-pixels to the endpoint. For example http://localhost:5000/back?h=1080. You can also increase the FPS by appending fps=frame-rate to the URL such as http://localhost:5000/back?fps=10 or both with ?fps=10&h=1000.
Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ?format=android will convert the thumbnail to 2:1 aspect ratio.
Returns the snapshot image for the event id. Works while the event is in progress and after completion.
Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification:
-|param|Type|Description|
-|----|-----|--|
-|h|int|Height in pixels|
-|bbox|int|Show bounding boxes for detected objects (0 or 1)|
-|timestamp|int|Print the timestamp in the upper left (0 or 1)|
-|crop|int|Crop the snapshot to the (0 or 1)|
An mjpeg stream for debugging. Keep in mind the mjpeg endpoint is for debugging only and will put additional load on the system when in use.
Accepts the following query string parameters:
param
Type
Description
fps
int
Frame rate
h
int
Height in pixels
bbox
int
Show bounding boxes for detected objects (0 or 1)
timestamp
int
Print the timestamp in the upper left (0 or 1)
zones
int
Draw the zones on the image (0 or 1)
mask
int
Overlay the mask on the image (0 or 1)
motion
int
Draw blue boxes for areas with detected motion (0 or 1)
regions
int
Draw green boxes for areas where object detection was run (0 or 1)
You can access a higher resolution mjpeg stream by appending h=height-in-pixels to the endpoint. For example http://localhost:5000/back?h=1080. You can also increase the FPS by appending fps=frame-rate to the URL such as http://localhost:5000/back?fps=10 or both with ?fps=10&h=1000.
Returns a thumbnail for the event id optimized for notifications. Works while the event is in progress and after completion. Passing ?format=android will convert the thumbnail to 2:1 aspect ratio.
Returns the snapshot image for the event id. Works while the event is in progress and after completion.
Accepts the following query string parameters, but they are only applied when an event is in progress. After the event is completed, the saved snapshot is returned from disk without modification: