config.example.yml 6.7 KB

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