config.example.yml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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 person
  54. # max_area (optional): maximum width*height of the bounding box for the detected person
  55. # threshold (optional): The minimum decimal percentage (50% hit = 0.5) for the confidence from tensorflow
  56. ####################
  57. objects:
  58. track:
  59. - person
  60. - car
  61. - truck
  62. filters:
  63. person:
  64. min_area: 5000
  65. max_area: 100000
  66. threshold: 0.8
  67. zones:
  68. #################
  69. # Name of the zone
  70. ################
  71. front_steps:
  72. front_door:
  73. ####################
  74. # For each camera, a list of x,y coordinates to define the polygon of the zone. The top
  75. # left corner is 0,0. Can also be a comma separated string of all x,y coordinates combined.
  76. # The same zone can exist across multiple cameras if they have overlapping FOVs.
  77. # An object is determined to be in the zone based on whether or not the bottom center
  78. # of it's bounding box is within the polygon. The polygon must have at least 3 points.
  79. # Coordinates can be generated at https://www.image-map.net/
  80. ####################
  81. coordinates:
  82. - 545,1077
  83. - 747,939
  84. - 788,805
  85. ################
  86. # Zone level object filters. These are applied in addition to the global and camera filters
  87. # and should be more restrictive than the global and camera filters. The global and camera
  88. # filters are applied upstream.
  89. ################
  90. filters:
  91. person:
  92. min_area: 5000
  93. max_area: 100000
  94. threshold: 0.8
  95. driveway:
  96. front_door:
  97. coordinates: 545,1077,747,939,788,805
  98. yard:
  99. cameras:
  100. back:
  101. ffmpeg:
  102. ################
  103. # Source passed to ffmpeg after the -i parameter. Supports anything compatible with OpenCV and FFmpeg.
  104. # Environment variables that begin with 'FRIGATE_' may be referenced in {}
  105. ################
  106. input: rtsp://viewer:{FRIGATE_RTSP_PASSWORD}@10.0.10.10:554/cam/realmonitor?channel=1&subtype=2
  107. #################
  108. # These values will override default values for just this camera
  109. #################
  110. # global_args: []
  111. # hwaccel_args: []
  112. # input_args: []
  113. # output_args: []
  114. ################
  115. ## Optionally specify the resolution of the video feed. Frigate will try to auto detect if not specified
  116. ################
  117. # height: 1280
  118. # width: 720
  119. ################
  120. ## Optional mask. Must be the same aspect ratio as your video feed. Value is either the
  121. ## name of a file in the config directory or a base64 encoded bmp image prefixed with
  122. ## 'base64,' eg. 'base64,asfasdfasdf....'.
  123. ##
  124. ## The mask works by looking at the bottom center of the bounding box for the detected
  125. ## person in the image. If that pixel in the mask is a black pixel, it ignores it as a
  126. ## false positive. In my mask, the grass and driveway visible from my backdoor camera
  127. ## are white. The garage doors, sky, and trees (anywhere it would be impossible for a
  128. ## person to stand) are black.
  129. ##
  130. ## Masked areas are also ignored for motion detection.
  131. ################
  132. # mask: back-mask.bmp
  133. ################
  134. # Allows you to limit the framerate within frigate for cameras that do not support
  135. # custom framerates. A value of 1 tells frigate to look at every frame, 2 every 2nd frame,
  136. # 3 every 3rd frame, etc.
  137. ################
  138. take_frame: 1
  139. ################
  140. # This will save a clip for each tracked object by frigate along with a json file that contains
  141. # data related to the tracked object. This works by telling ffmpeg to write video segments to /cache
  142. # from the video stream without re-encoding. Clips are then created by using ffmpeg to merge segments
  143. # without re-encoding. The segments saved are unaltered from what frigate receives to avoid re-encoding.
  144. # They do not contain bounding boxes. 30 seconds of video is added to the start of the clip. These are
  145. # optimized to capture "false_positive" examples for improving frigate.
  146. #
  147. # NOTE: This will only work for camera feeds that can be copied into the mp4 container format without
  148. # encoding such as h264. I do not expect this to work for mjpeg streams, and it may not work for many other
  149. # types of streams.
  150. #
  151. # WARNING: Videos in /cache are retained until there are no ongoing events. If you are tracking cars or
  152. # other objects for long periods of time, the cache will continue to grow indefinitely.
  153. ################
  154. save_clips:
  155. enabled: False
  156. #########
  157. # Number of seconds before the event to include in the clips
  158. #########
  159. pre_capture: 30
  160. ################
  161. # Configuration for the snapshots in the debug view and mqtt
  162. ################
  163. snapshots:
  164. show_timestamp: True
  165. draw_zones: False
  166. ################
  167. # Camera level object config. This config is merged with the global config above.
  168. ################
  169. objects:
  170. track:
  171. - person
  172. filters:
  173. person:
  174. min_area: 5000
  175. max_area: 100000
  176. threshold: 0.8