Advertisement
AussiSG

FrigateConfig

Mar 19th, 2024
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 9.80 KB | Software | 0 0
  1. mqtt:
  2.   host: 192.168.0.12
  3.   user: USER
  4.   password: USER
  5.  
  6. ffmpeg:
  7.   hwaccel_args: preset-vaapi
  8.  
  9. #  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  10. #  output_args:
  11. #    # Optional: output args for detect streams (default: shown below)
  12. #    detect: -f rawvideo -pix_fmt yuv420p
  13. #    # Optional: output args for record streams (default: shown below)
  14. #    record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy -an
  15. #    # Optional: output args for rtmp streams (default: shown below)
  16. #    rtmp: -c copy -f flv  
  17.  
  18. detectors:
  19.   ov:
  20.     type: openvino
  21.     device: AUTO
  22.     model:
  23.       path: /openvino-model/ssdlite_mobilenet_v2.xml
  24.  
  25. model:
  26.   width: 300
  27.   height: 300
  28.   input_tensor: nhwc
  29.   input_pixel_format: bgr
  30.   labelmap_path: /openvino-model/coco_91cl_bkgr.txt
  31.  
  32. go2rtc:
  33.   streams:
  34.     front1: # <- for RTSP streams
  35.       - rtsp://192.168.0.15:554/ # <- stream which supports video & aac audio
  36.     doorbell:
  37.       - "ffmpeg:http://192.168.0.21/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=USER&password=PASS#video=copy#audio=copy#audio=opus"
  38.       - rtsp://USER:PASS@192.168.0.21:554/h264Preview_01_sub
  39.     doorbell_sub:
  40.       - "ffmpeg:http://192.168.0.21/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=USER&password=PASS"
  41.     doorbell_snapshot:
  42.      - onvif://USER:PASS@192.168.0.21:8000?subtype=MediaProfile00000&snapshot
  43.  
  44.   webrtc:
  45.     candidates:
  46.      - 192.168.0.12:8555
  47.   log:
  48.     exec: trace
  49.   ffmpeg:
  50.     bin: ffmpeg
  51.     volume: "-af \"volume=30dB\""
  52.  
  53.  
  54. cameras:
  55.   front1:
  56.     ffmpeg:
  57.       inputs:
  58.        # High Resolution Stream
  59.         - path: rtsp://127.0.0.1:8554/front1
  60.           input_args: preset-rtsp-restream
  61.           roles:
  62.            - record
  63.             - detect
  64.       input_args: -avoid_negative_ts make_zero -fflags nobuffer -flags low_delay -strict experimental -fflags +genpts+discardcorrupt -use_wallclock_as_timestamps 1 -c:v mjpeg
  65.       output_args:
  66.               rtmp: -c:v libx264 -an -f flv
  67.     snapshots:
  68.      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  69.       # This value can be set via MQTT and will be updated in startup based on retained value
  70.       enabled: True
  71.       # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  72.       clean_copy: True
  73.       # Optional: print a timestamp on the snapshots (default: shown below)
  74.       timestamp: False
  75.     # Optional: Record configuration
  76.     # NOTE: Can be overridden at the camera level
  77.     record:
  78.      # Optional: Enable recording (default: shown below)
  79.       # WARNING: If recording is disabled in the config, turning it on via
  80.       #          the UI or MQTT later will have no effect.
  81.       # WARNING: Frigate does not currently support limiting recordings based
  82.       #          on available disk space automatically. If using recordings,
  83.       #          you must specify retention settings for a number of days that
  84.       #          will fit within the available disk space of your drive or Frigate
  85.       #          will crash.
  86.       enabled: True
  87.       # Optional: Number of minutes to wait between cleanup runs (default: shown below)
  88.       # This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
  89.       expire_interval: 60
  90.       # Optional: Retention settings for recording
  91.       retain:
  92.        # Optional: Number of days to retain recordings regardless of events (default: shown below)
  93.         # NOTE: This should be set to 0 and retention should be defined in events section below
  94.         #       if you only want to retain recordings of events.
  95.         days: 0
  96.         # Optional: Mode for retention. Available options are: all, motion, and active_objects
  97.         #   all - save all recording segments regardless of activity
  98.         #   motion - save all recordings segments with any detected motion
  99.         #   active_objects - save all recording segments with active/moving objects
  100.         # NOTE: this mode only applies when the days setting above is greater than 0
  101.         mode: all
  102.       # Optional: Event recording settings
  103.       events:
  104.        # Optional: Number of seconds before the event to include (default: shown below)
  105.         pre_capture: 5
  106.         # Optional: Number of seconds after the event to include (default: shown below)
  107.         post_capture: 5
  108.         # Optional: Objects to save recordings for. (default: all tracked objects)
  109.         objects:
  110.          - car
  111.           - person
  112.         # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
  113.         required_zones: []
  114.         # Optional: Retention settings for recordings of events
  115.         retain:
  116.          # Required: Default retention days (default: shown below)
  117.           default: 10
  118.           # Optional: Mode for retention. (default: shown below)
  119.           #   all - save all recording segments for events regardless of activity
  120.           #   motion - save all recordings segments for events with any detected motion
  121.           #   active_objects - save all recording segments for event with active/moving objects
  122.           #
  123.           # NOTE: If the retain mode for the camera is more restrictive than the mode configured
  124.           #       here, the segments will already be gone by the time this mode is applied.
  125.           #       For example, if the camera retain mode is "motion", the segments without motion are
  126.           #       never stored, so setting the mode to "all" here won't bring them back.
  127.           mode: motion
  128.           # Optional: Per object retention days
  129.           objects:
  130.             person: 15
  131.  
  132.  
  133. ################### Doorbell Camera
  134.   doorbell:
  135.     ffmpeg:
  136.       inputs:
  137.         - path: rtsp://127.0.0.1:8554/doorbell?video=copy&audio=aac
  138.           input_args: preset-rtsp-restream
  139.           roles:
  140.            - record
  141.         - path: rtsp://127.0.0.1:8554/doorbell_sub?video=copy
  142.           input_args: preset-rtsp-restream
  143.           roles:
  144.            - detect      
  145.       output_args:
  146.           record: preset-record-generic-audio-copy
  147.     snapshots:
  148.      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  149.       # This value can be set via MQTT and will be updated in startup based on retained value
  150.       enabled: True
  151.       # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  152.       clean_copy: True
  153.       # Optional: print a timestamp on the snapshots (default: shown below)
  154.       timestamp: False
  155.     # Optional: Record configuration
  156.     # NOTE: Can be overridden at the camera level
  157.     record:
  158.      # Optional: Enable recording (default: shown below)
  159.       # WARNING: If recording is disabled in the config, turning it on via
  160.       #          the UI or MQTT later will have no effect.
  161.       # WARNING: Frigate does not currently support limiting recordings based
  162.       #          on available disk space automatically. If using recordings,
  163.       #          you must specify retention settings for a number of days that
  164.       #          will fit within the available disk space of your drive or Frigate
  165.       #          will crash.
  166.       enabled: True
  167.       # Optional: Number of minutes to wait between cleanup runs (default: shown below)
  168.       # This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
  169.       expire_interval: 60
  170.       # Optional: Retention settings for recording
  171.       retain:
  172.        # Optional: Number of days to retain recordings regardless of events (default: shown below)
  173.         # NOTE: This should be set to 0 and retention should be defined in events section below
  174.         #       if you only want to retain recordings of events.
  175.         days: 0
  176.         # Optional: Mode for retention. Available options are: all, motion, and active_objects
  177.         #   all - save all recording segments regardless of activity
  178.         #   motion - save all recordings segments with any detected motion
  179.         #   active_objects - save all recording segments with active/moving objects
  180.         # NOTE: this mode only applies when the days setting above is greater than 0
  181.         mode: all
  182.       # Optional: Event recording settings
  183.       events:
  184.        # Optional: Number of seconds before the event to include (default: shown below)
  185.         pre_capture: 5
  186.         # Optional: Number of seconds after the event to include (default: shown below)
  187.         post_capture: 5
  188.         # Optional: Objects to save recordings for. (default: all tracked objects)
  189.         objects:
  190.          - car
  191.           - person
  192.         # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
  193.         required_zones: []
  194.         # Optional: Retention settings for recordings of events
  195.         retain:
  196.          # Required: Default retention days (default: shown below)
  197.           default: 10
  198.           # Optional: Mode for retention. (default: shown below)
  199.           #   all - save all recording segments for events regardless of activity
  200.           #   motion - save all recordings segments for events with any detected motion
  201.           #   active_objects - save all recording segments for event with active/moving objects
  202.           #
  203.           # NOTE: If the retain mode for the camera is more restrictive than the mode configured
  204.           #       here, the segments will already be gone by the time this mode is applied.
  205.           #       For example, if the camera retain mode is "motion", the segments without motion are
  206.           #       never stored, so setting the mode to "all" here won't bring them back.
  207.           mode: motion
  208.           # Optional: Per object retention days
  209.           objects:
  210.             person: 15
  211.  
  212.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement