config.example.yml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. web_port: 5000
  2. ################
  3. ## List of detectors.
  4. ## Currently supported types: cpu, edgetpu
  5. ## EdgeTPU requires device as defined here: https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api
  6. ################
  7. detectors:
  8. coral:
  9. type: edgetpu
  10. device: usb
  11. mqtt:
  12. host: mqtt.server.com
  13. topic_prefix: frigate
  14. # client_id: frigate # Optional -- set to override default client id of 'frigate' if running multiple instances
  15. # user: username # Optional
  16. #################
  17. ## Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  18. ## password: '{FRIGATE_MQTT_PASSWORD}'
  19. #################
  20. # password: password # Optional
  21. ################
  22. # Global configuration for saving clips
  23. ################
  24. save_clips:
  25. ###########
  26. # Maximum length of time to retain video during long events.
  27. # If an object is being tracked for longer than this amount of time, the cache
  28. # will begin to expire and the resulting clip will be the last x seconds of the event.
  29. ###########
  30. max_seconds: 300
  31. #################
  32. # Default ffmpeg args. Optional and can be overwritten per camera.
  33. # Should work with most RTSP cameras that send h264 video
  34. # Built from the properties below with:
  35. # "ffmpeg" + global_args + input_args + "-i" + input + output_args
  36. #################
  37. # ffmpeg:
  38. # global_args:
  39. # - -hide_banner
  40. # - -loglevel
  41. # - panic
  42. # hwaccel_args: []
  43. # input_args:
  44. # - -avoid_negative_ts
  45. # - make_zero
  46. # - -fflags
  47. # - nobuffer
  48. # - -flags
  49. # - low_delay
  50. # - -strict
  51. # - experimental
  52. # - -fflags
  53. # - +genpts+discardcorrupt
  54. # - -vsync
  55. # - drop
  56. # - -rtsp_transport
  57. # - tcp
  58. # - -stimeout
  59. # - '5000000'
  60. # - -use_wallclock_as_timestamps
  61. # - '1'
  62. # output_args:
  63. # - -f
  64. # - rawvideo
  65. # - -pix_fmt
  66. # - yuv420p
  67. ####################
  68. # Global object configuration. Applies to all cameras
  69. # unless overridden at the camera levels.
  70. # Keys must be valid labels. By default, the model uses coco (https://dl.google.com/coral/canned_models/coco_labels.txt).
  71. # All labels from the model are reported over MQTT. These values are used to filter out false positives.
  72. # min_area (optional): minimum width*height of the bounding box for the detected object
  73. # max_area (optional): maximum width*height of the bounding box for the detected object
  74. # min_score (optional): minimum score for the object to initiate tracking
  75. # threshold (optional): The minimum decimal percentage for tracked object's computed score to considered a true positive
  76. ####################
  77. objects:
  78. track:
  79. - person
  80. filters:
  81. person:
  82. min_area: 5000
  83. max_area: 100000
  84. min_score: 0.5
  85. threshold: 0.85
  86. cameras:
  87. back:
  88. ffmpeg:
  89. ################
  90. # Source passed to ffmpeg after the -i parameter. Supports anything compatible with OpenCV and FFmpeg.
  91. # Environment variables that begin with 'FRIGATE_' may be referenced in {}
  92. ################
  93. input: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
  94. #################
  95. # These values will override default values for just this camera
  96. #################
  97. # global_args: []
  98. # hwaccel_args: []
  99. # input_args: []
  100. # output_args: []
  101. ################
  102. ## Optionally specify the resolution of the video feed. Frigate will try to auto detect if not specified
  103. ################
  104. # height: 1280
  105. # width: 720
  106. ################
  107. ## Specify the framerate of your camera
  108. ##
  109. ## NOTE: This should only be set in the event ffmpeg is unable to determine your camera's framerate
  110. ## on its own and the reported framerate for your camera in frigate is well over what is expected.
  111. ################
  112. # fps: 5
  113. ################
  114. ## Optional mask. Must be the same aspect ratio as your video feed. Value is any of the following:
  115. ## - name of a file in the config directory
  116. ## - base64 encoded image prefixed with 'base64,' eg. 'base64,asfasdfasdf....'
  117. ## - polygon of x,y coordinates prefixed with 'poly,' eg. 'poly,0,900,1080,900,1080,1920,0,1920'
  118. ##
  119. ## The mask works by looking at the bottom center of the bounding box for the detected
  120. ## person in the image. If that pixel in the mask is a black pixel, it ignores it as a
  121. ## false positive. In my mask, the grass and driveway visible from my backdoor camera
  122. ## are white. The garage doors, sky, and trees (anywhere it would be impossible for a
  123. ## person to stand) are black.
  124. ##
  125. ## Masked areas are also ignored for motion detection.
  126. ################
  127. # mask: back-mask.bmp
  128. ################
  129. # Allows you to limit the framerate within frigate for cameras that do not support
  130. # custom framerates. A value of 1 tells frigate to look at every frame, 2 every 2nd frame,
  131. # 3 every 3rd frame, etc.
  132. ################
  133. take_frame: 1
  134. ################
  135. # The number of seconds to retain the highest scoring image for the best.jpg endpoint before allowing it
  136. # to be replaced by a newer image. Defaults to 60 seconds.
  137. ################
  138. best_image_timeout: 60
  139. ################
  140. # MQTT settings
  141. ################
  142. # mqtt:
  143. # crop_to_region: True
  144. # snapshot_height: 300
  145. ################
  146. # Zones
  147. ################
  148. zones:
  149. #################
  150. # Name of the zone
  151. ################
  152. front_steps:
  153. ####################
  154. # A list of x,y coordinates to define the polygon of the zone. The top
  155. # left corner is 0,0. Can also be a comma separated string of all x,y coordinates combined.
  156. # The same zone name can exist across multiple cameras if they have overlapping FOVs.
  157. # An object is determined to be in the zone based on whether or not the bottom center
  158. # of it's bounding box is within the polygon. The polygon must have at least 3 points.
  159. # Coordinates can be generated at https://www.image-map.net/
  160. ####################
  161. coordinates:
  162. - 545,1077
  163. - 747,939
  164. - 788,805
  165. ################
  166. # Zone level object filters. These are applied in addition to the global and camera filters
  167. # and should be more restrictive than the global and camera filters. The global and camera
  168. # filters are applied upstream.
  169. ################
  170. filters:
  171. person:
  172. min_area: 5000
  173. max_area: 100000
  174. threshold: 0.8
  175. ################
  176. # This will save a clip for each tracked object by frigate along with a json file that contains
  177. # data related to the tracked object. This works by telling ffmpeg to write video segments to /cache
  178. # from the video stream without re-encoding. Clips are then created by using ffmpeg to merge segments
  179. # without re-encoding. The segments saved are unaltered from what frigate receives to avoid re-encoding.
  180. # They do not contain bounding boxes. These are optimized to capture "false_positive" examples for improving frigate.
  181. #
  182. # NOTE: This feature does not work if you have "-vsync drop" configured in your input params.
  183. # This will only work for camera feeds that can be copied into the mp4 container format without
  184. # encoding such as h264. It may not work for some types of streams.
  185. ################
  186. save_clips:
  187. enabled: False
  188. #########
  189. # Number of seconds before the event to include in the clips
  190. #########
  191. pre_capture: 30
  192. #########
  193. # Objects to save clips for. Defaults to all tracked object types.
  194. #########
  195. # objects:
  196. # - person
  197. ################
  198. # Configuration for the snapshots in the debug view and mqtt
  199. ################
  200. snapshots:
  201. show_timestamp: True
  202. draw_zones: False
  203. ################
  204. # Camera level object config. If defined, this is used instead of the global config.
  205. ################
  206. objects:
  207. track:
  208. - person
  209. - car
  210. filters:
  211. person:
  212. min_area: 5000
  213. max_area: 100000
  214. min_score: 0.5
  215. threshold: 0.85