config.example.yml 8.1 KB

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