database:
    path: /db/frigate.db
mqtt:
  host: 192.168.122.25
  port: 2083
detectors:
    coral:
        type: edgetpu
        device: usb
go2rtc:
  streams:
    haustuer_cam: 
      - rtsp://XXXXXXXXX@192.168.122.15:88/videoMain
      - "ffmpeg:haustuer_cam#audio=opus" # <- copy of the stream which transcodes audio to opus
    haustuer_cam_sub:
      - rtsp://XXXXXXXXX@192.168.122.15:88/videoSub # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
      - "ffmpeg:haustuer_cam_sub#audio=opus" # <- copy of the stream which transcodes audio to opus
    garage_cam: 
      - rtsp://XXXXXXXXX@192.168.122.19:554/h264Preview_01_main
      - "ffmpeg:garage_cam#audio=opus" # <- copy of the stream which transcodes audio to opus
    garage_cam_sub:
      - rtsp://XXXXXXXXX@192.168.122.19:554/h264Preview_01_sub # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
      - "ffmpeg:garage_cam_sub#audio=opus" # <- copy of the stream which transcodes audio to opus
    garten_cam: 
      - rtsp://XXXXXXXXX@192.168.122.17:88/videoMain
      - "ffmpeg:garten_cam#audio=opus" # <- copy of the stream which transcodes audio to opus
    garten_cam_sub:
      - rtsp://XXXXXXXXX@192.168.122.17:88/videoSub # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
      - "ffmpeg:garten_cam_sub#audio=opus" # <- copy of the stream which transcodes audio to opus
    garten_links_cam: 
      - rtsp://XXXXXXXXX@192.168.122.16/11
      - "ffmpeg:garten_links_cam#audio=opus" # <- copy of the stream which transcodes audio to opus
    garten_links_cam_sub:
      - rtsp://XXXXXXXXX@192.168.122.16/12 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
      - "ffmpeg:garten_links_cam_sub#audio=opus" # <- copy of the stream which transcodes audio to opus
    wohnzimmer_cam: 
      - rtsp://XXXXXXXXX@192.168.122.18:88/videoMain
      - "ffmpeg:wohnzimmer_cam#audio=opus" # <- copy of the stream which transcodes audio to opus
    wohnzimmer_cam_sub:
      - rtsp://XXXXXXXXX@192.168.122.18:88/videoSub # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
      - "ffmpeg:wohnzimmer_cam_sub#audio=opus" # <- copy of the stream which transcodes audio to opus
ffmpeg:
    output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    hwaccel_args: # This is the section for the H/W Accelaration, you will need to figure out what settings you need to enable - https://docs.frigate.video/configuration/hardware_acceleration
        #- -hwaccel
        #- qsv
        #- -qsv_device
        #- /dev/dri/renderD128
        - -hwaccel
        - vaapi 
        - -hwaccel_device
        - /dev/dri/renderD128 
        #- -hwaccel_output_format
        #- yuv420p
        #- -hwaccel
        #- vaapi
        #- -hwaccel_device
        #- /dev/dri/renderD128
        #- -hwaccel_output_format
        #- yuv420p
record: # how long to record before and after motion
    events:
        pre_capture: 7
        post_capture: 10
cameras:
  haustuer: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/haustuer_cam_sub # <----- The stream you want to use for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/haustuer_cam
          roles:
            - record
            - rtmp
    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        - car
        - dog
        - cat
      filters:
        person:
          # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          #min_area: 5000
          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          #max_area: 100000
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          #min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
          # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
          # Checks based on the bottom center of the bounding box of the object
          #mask: 0,0,1000,0,1000,200,0,200
    record: # what you want Frigate to record
        enabled: True
        #retain: # uncomment this section if you want Frigate to record this camera 24/7. This can use a lot of space, you have been warned!
          #days: 1
          #mode: all
        events: # this is the default recording mode where events are recorded, the number of days it saves events for is 10.
            retain:
                mode: active_objects
                default: 10
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: true
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: false
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: true
      # Optional: crop the snapshot (default: shown below)
      crop: false
      # Optional: height to resize the snapshot to (default: original size)
      # height: 175
      # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        #objects:
          #person: 15
    motion:
      mask:
        - 858,215,847,176,746,145,754,115,557,74,528,34,396,37,297,38,349,720,0,720,0,0,1280,0,1280,370
  garage: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/garage_cam_sub # <----- The stream you want to use for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/garage_cam
          roles:
            - record
            - rtmp
    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
      filters:
        person:
          # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          #min_area: 5000
          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          #max_area: 100000
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          #min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
          # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
          # Checks based on the bottom center of the bounding box of the object
          #mask: 0,0,1000,0,1000,200,0,200
    record: # what you want Frigate to record
        enabled: True
        #retain: # uncomment this section if you want Frigate to record this camera 24/7. This can use a lot of space, you have been warned!
          #days: 1
          #mode: all
        events: # this is the default recording mode where events are recorded, the number of days it saves events for is 10.
            retain:
                mode: active_objects
                default: 10
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: true
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: false
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: true
      # Optional: crop the snapshot (default: shown below)
      crop: false
      # Optional: height to resize the snapshot to (default: original size)
      # height: 175
      # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
      # required_zones: []
      required_zones:
        - hof
        - einfahrt
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        #objects:
          #person: 15
    motion:
      mask:
        #- 0,195,40,158,104,104,158,72,180,21,259,21,393,27,408,62,426,91,448,107,476,100,532,105,582,95,591,0,0,0
        - 0,480,199,480,199,450,0,450
    zones:
      hof:
        coordinates: 640,480,640,204,640,74,556,68,503,92,400,79,388,144,189,136,181,70,73,144,0,207,0,480
        objects:
          - car
          - person
      einfahrt:
        coordinates: 204,128,389,140,383,34,231,26
        objects:
          - car
          - person
  garten: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/garten_cam_sub # <----- The stream you want to use for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/garten_cam
          roles:
            - record
            - rtmp
    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        #- car
        - dog
        - cat
      filters:
        person:
          # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          #min_area: 5000
          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          #max_area: 100000
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          #min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
          # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
          # Checks based on the bottom center of the bounding box of the object
          #mask: 0,0,1000,0,1000,200,0,200
    record: # what you want Frigate to record
        enabled: True
        #retain: # uncomment this section if you want Frigate to record this camera 24/7. This can use a lot of space, you have been warned!
          #days: 1
          #mode: all
        events: # this is the default recording mode where events are recorded, the number of days it saves events for is 10.
            retain:
                mode: active_objects
                default: 10
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: true
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: false
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: true
      # Optional: crop the snapshot (default: shown below)
      crop: false
      # Optional: height to resize the snapshot to (default: original size)
      # height: 175
      # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        #objects:
          #person: 15
    motion:
      mask:
        - 487,699,485,720,1280,720,1280,373
        - 0,80,0,0,1280,0,1280,256,958,203,953,219,786,235,738,162,687,139,654,118,602,100,552,107,515,59,449,41,350,39,257,42,121,41,129,79
  garten_links: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/garten_links_cam_sub # <----- The stream you want to use for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/garten_links_cam
          roles:
            - record
            - rtmp
    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 352 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        #- car
        - dog
        - cat
      filters:
        person:
          # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          #min_area: 5000
          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          #max_area: 100000
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          #min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
          # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
          # Checks based on the bottom center of the bounding box of the object
          #mask: 0,0,1000,0,1000,200,0,200
    record: # what you want Frigate to record
        enabled: True
        #retain: # uncomment this section if you want Frigate to record this camera 24/7. This can use a lot of space, you have been warned!
          #days: 1
          #mode: all
        events: # this is the default recording mode where events are recorded, the number of days it saves events for is 10.
            retain:
                mode: active_objects
                default: 10
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: true
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: false
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: true
      # Optional: crop the snapshot (default: shown below)
      crop: false
      # Optional: height to resize the snapshot to (default: original size)
      # height: 175
      # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        #objects:
          #person: 15
    motion:
      mask:
        - 237,0,182,21,139,25,99,38,0,79,0,303,0,0
        - 469,0,468,21,640,21,640,0
  wohnzimmer: # <------ Name the camera
    ffmpeg:
      hwaccel_args: preset-vaapi
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/wohnzimmer_cam_sub # <----- The stream you want to use for detection
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/wohnzimmer_cam
          roles:
            - record
            - rtmp
    rtmp:
      enabled: false # <-- RTMP should be disabled if your stream is not H264
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
      fps: 5
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
      filters:
        person:
          # Optional: minimum width*height of the bounding box for the detected object (default: 0)
          #min_area: 5000
          # Optional: maximum width*height of the bounding box for the detected object (default: 24000000)
          #max_area: 100000
          # Optional: minimum score for the object to initiate tracking (default: shown below)
          #min_score: 0.5
          # Optional: minimum decimal percentage for tracked object's computed score to be considered a true positive (default: shown below)
          threshold: 0.7
          # Optional: mask to prevent this object type from being detected in certain areas (default: no mask)
          # Checks based on the bottom center of the bounding box of the object
          #mask: 0,0,1000,0,1000,200,0,200
    record: # what you want Frigate to record
        enabled: True
        #retain: # uncomment this section if you want Frigate to record this camera 24/7. This can use a lot of space, you have been warned!
          #days: 1
          #mode: all
        events: # this is the default recording mode where events are recorded, the number of days it saves events for is 10.
            retain:
                mode: active_objects
                default: 10
    snapshots:
      # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
      # This value can be set via MQTT and will be updated in startup based on retained value
      enabled: true
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: false
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: true
      # Optional: crop the snapshot (default: shown below)
      crop: false
      # Optional: height to resize the snapshot to (default: original size)
      # height: 175
      # Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
      required_zones: []
      # Optional: Camera override for retention settings (default: global values)
      retain:
        # Required: Default retention days (default: shown below)
        default: 10
        # Optional: Per object retention days
        #objects:
          #person: 15
    motion:
      mask:
        - 0,720,369,720,364,120,433,121,503,129,542,147,586,184,630,241,1280,632,1280,0,0,0