config.example.yml 7.3 KB

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