mqtt:
  enabled: true
  host: 192.168.1.210
  port: 1890

detectors:
  #coral:
    #type: edgetpu
    #device: usb
  cpu1:
    type: cpu
    num_threads: 3
    #model:
      #path: "/custom_model.tflite"
  cpu2:
    type: cpu
    num_threads: 3
  cpu3:
    type: cpu
    num_threads: 3
  cpu4:
    type: cpu
    num_threads: 3

database:
  path: /config/frigate.db

audio:
  enabled: false
  max_not_heard: 30
  min_volume: 500
  listen:
    - bark
    - fire_alarm
    - scream
    - speech
    - yell
  filters:
    speech:
      threshold: 0.8

logger:
  default: critical
  logs:
    frigate.app: error
    frigate.mqtt: critical
    frigate.event: error
    frigate.video: critical
    ffmpeg: critical
    detect: critical
    go2rtc: error
    watchdog: critical

birdseye:
  enabled: true
  restream: true
  width: 2304
  height: 1296
  quality: 1
  mode: continuous
  inactivity_threshold: 15
  layout:
    scaling_factor: 1.0

ffmpeg:
  #hwaccel_args: preset-vaapi
  global_args: -hide_banner -loglevel warning
  hwaccel_args: -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format
    yuv420p
  input_args: preset-rtsp-restream -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt
    -rtsp_transport tcp -timeout 5000000 -use_wallclock_as_timestamps 1
  output_args:
    #record: preset-record-generic-audio-copy
    detect: -f rawvideo -pix_fmt yuv420p
    record: preset-record-generic-audio-copy -f segment -segment_time 10 -segment_format
      mp4 -reset_timestamps 1 -strftime 1 -c copy -an
  retry_interval: 20

detect:
  enabled: true
  width: 1280
  height: 720
  fps: 10
  min_initialized: 2
  max_disappeared: 25
  stationary:
    interval: 200
    threshold: 50
    max_frames:
      # Optional: Default for all object types (default: not set, track forever)
      #default: 3000
      # Optional: Object specific values
      objects:
        car: 9000
  annotation_offset: 0

motion:
  threshold: 30
  lightning_threshold: 0.8
  contour_area: 25
  # Optional: Alpha value passed to cv2.accumulateWeighted when averaging frames to determine the background (default: shown below)
  # Higher values mean the current frame impacts the average a lot, and a new object will be averaged into the background faster.
  # Low values will cause things like moving shadows to be detected as motion for longer.
  # https://www.geeksforgeeks.org/background-subtraction-in-an-image-using-concept-of-running-average/
  #frame_alpha: 0.01
  frame_height: 300
  improve_contrast: true

record:
  enabled: true
  expire_interval: 60
  sync_recordings: true
  retain:
    days: 0.5
    mode: motion
  export:
    #timelapse_args: "-vf setpts=0.04*PTS -r 30"
    # DESC: Time-lapse speed set to x60 (for fitting 1 hour (x60) of recording into 1 minute of time-lapse) with 25 FPS
    timelapse_args: -vf setpts=PTS/60 -r 25
  # Optional: Recording Preview Settings
  preview:
    # Optional: Quality of recording preview (default: shown below).
    # Options are: very_low, low, medium, high, very_high
    quality: very_high
  events:
    pre_capture: 5
    post_capture: 10
    objects:
      - person
      - cat
      - dog
      - car
      - license_plate
      - dayplate
      - nightplate
   #required_zones: []
    retain:
      default: 0.5
      mode: active_objects
      objects:
        person: 0.5
        car: 0.5
        license_plate: 1
        dayplate: 1
        nightplate: 1
#record:
  #enabled: true
  #expire_interval: 60
  #sync_recordings: true
  #retain:
    #days: 0.25
    #mode: all
  #export:
    #timelapse_args: "-vf setpts=0.04*PTS -r 30"
  #events:
    #pre_capture: 5
    #post_capture: 10
    #objects:
      #- person
    #required_zones: []
    #retain:
      #default: 1
      #mode: motion
      #objects:
        #person: 0.5
        #car: 0.5

snapshots:
  enabled: true
  clean_copy: true
  timestamp: true
  bounding_box: true
  crop: false
  height: 720
  retain:
    default: 0.5
    objects:
      person: 0.5
      car: 0.5
      license_plate: 7
      dayplate: 7
      nightplate: 7
  quality: 100

timestamp_style:
  position: tr
  format: '%d.%m.%Y %H:%M:%S'
  color:
    red: 255
    green: 255
    blue: 255
  thickness: 2
  effect: shadow

ui:
  live_mode: mse
  #use_experimental: false
  time_format: browser
  date_style: short
  time_style: medium
  strftime_fmt: '%d/%m/%Y %H:%M'

go2rtc:
  streams:
    go2rtc_Eingang:
      #- tapo://admin:7AA7D570BB74FB56E7B3BFD406B5146EDAFD62AB5E5708ADA0F3382514EDC344@192.168.1.48
      - rtsp://iobroker:ixijannik@192.168.1.48/stream1
      - ffmpeg:go2rtc_Eingang#audio=opus
      - ffmpeg:go2rtc_Eingang#audio=aac
    go2rtc_Eingang_SUB:
      - rtsp://iobroker:ixijannik@192.168.1.48/stream2
      - ffmpeg:go2rtc_Eingang_SUB#audio=opus
      - ffmpeg:go2rtc_Eingang_SUB#audio=acc
    go2rtc_Sued-Ost:
      #- tapo://admin:7AA7D570BB74FB56E7B3BFD406B5146EDAFD62AB5E5708ADA0F3382514EDC344@192.168.1.85
      - rtsp://iobroker:ixijannik@192.168.1.85/stream1
      - ffmpeg:go2rtc_Sued-Ost#audio=opus
      - ffmpeg:go2rtc_Sied-Ost#audio=aac
    go2rtc_Sued-Ost_SUB:
      - rtsp://iobroker:ixijannik@192.168.1.85/stream2
      - ffmpeg:go2rtc_Sued-Ost_SUB#audio=opus
      - ffmpeg:go2rtc_Sued-Ost_SUB#audio=acc
    go2rtc_Katzen-Korb:
      #- tapo://admin:7AA7D570BB74FB56E7B3BFD406B5146EDAFD62AB5E5708ADA0F3382514EDC344@192.168.1.86
      - rtsp://iobroker:ixijannik@192.168.1.86/stream1
      - ffmpeg:go2rtc_Katzen-Korb#audio=opus
      - ffmpeg:go2rtc_Katzen-Korb#audio=aac
    go2rtc_Katzen-Korb_SUB:
      - rtsp://iobroker:ixijannik@192.168.1.86/stream2
      - ffmpeg:go2rtc_Katzen-Korb_SUB#audio=opus
      - ffmpeg:go2rtc_Katzen-Korb_SUB#audio=aac
    go2rtc_Katzen-Schrank:
      #- tapo://admin:7AA7D570BB74FB56E7B3BFD406B5146EDAFD62AB5E5708ADA0F3382514EDC344@192.168.1.75
      - rtsp://iobroker:ixijannik@192.168.1.75/stream1
      - ffmpeg:go2rtc_Katzen-Schrank#audio=opus
      - ffmpeg:go2rtc_Katzen-Schrank#audio=aac
    go2rtc_Katzen-Schrank_SUB:
      #- tapo://admin:7AA7D570BB74FB56E7B3BFD406B5146EDAFD62AB5E5708ADA0F3382514EDC344@192.168.1.75
      - rtsp://iobroker:ixijannik@192.168.1.75/stream2
      - ffmpeg:go2rtc_Katzen-Schrank_SUB#audio=opus
      - ffmpeg:go2rtc_Katzen-Schrank_SUB#audio=aac

  webrtc:
    candidates:
      - 192.168.1.12:8555
      - stun:8555

cameras:

  Eingang:
    enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/go2rtc_Eingang
          input_args: preset-rtsp-restream
          roles:
            - audio
          #- detect
            - record
        - path: rtsp://127.0.0.1:8554/go2rtc_Eingang_SUB
          input_args: preset-rtsp-generic
          roles:
          #- audio
            - detect
    record:
      enabled: true
    audio:
      enabled: false
    best_image_timeout: 60
    webui_url: 
      http://192.168.1.12:5000/api/Eingang?fps=30&h=1296&timestamp=1&zones=1&bbox=1&motion=1&regions=1
    onvif:
      host: 192.168.1.48
      port: 2020
      user: iobroker
      password: ixijannik
      #autotracking:
        #enabled: false
        #calibrate_on_startup: false
        #zooming: disabled
        #zoom_factor: 0.3
        #track:
          #- person
        #required_zones:
          #- Zone_Eingang
          #- Zone_Hof-Einfahrt
        #return_preset: preset2
        #timeout: 5
    ui:
      dashboard: true
      order: 1
    live:
      stream_name: go2rtc_Eingang
      height: 1296
      quality: 1
    detect:
      enabled: true
      width: 1280
      height: 720
      fps: 10
    birdseye:
      order: 1
    objects:
      track:
        - person
        - face
        - package
        - amazon
        - car
        - license_plate
        - dayplate
        - nightplate
        - plate
        - bicycle
        - motorcycle
        - dog
        - cat
        - bus
        - horse
      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 width/height of the bounding box for the detected object (default: 0)
          min_ratio: 0.5
            # Optional: maximum width/height of the bounding box for the detected object (default: 24000000)
          max_ratio: 2.0
            # 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
    motion:
      mask: 
        0,0,0.193,0,0.195,0.035,0.27,0.048,0.269,0.07,0.269,0.089,0.207,0.097,0.128,0.136,0,0.205
      threshold: 40
      contour_area: 40
      improve_contrast: 'true'
    zones:
      Zone_Eingang:
        coordinates: 
          0.011,0.345,0.072,0.629,0.215,0.527,0.341,0.439,0.472,0.493,0.564,0.531,0.642,0.56,0.666,0.6,0.801,0.454,0.802,0.395,0.825,0.414,0.848,0.393,0.956,0.475,0.912,0.747,0.8,1,0.093,1,0.006,0.712
        objects:
          - person
          - face
          - package
          - amazon
          - car
          - license_plate
          - dayplate
          - nightplate
          - plate
        filters:
          person:
            min_area: 5000
            max_area: 100000
            threshold: 0.7
        inertia: 3
        loitering_time: 1
      Zone_Hof-Einfahrt:
        coordinates: 
          0.967,0.203,0.872,0.185,0.81,0.192,0.741,0.213,0.683,0.234,0.624,0.254,0.624,0.351,0.798,0.453,0.802,0.389,0.823,0.369,0.849,0.391,0.844,0.486,0.841,0.631,0.823,0.677,0.908,0.743,1,0.825,1,0.221
        objects:
          - car
          - face
          - package
          - amazon
          - license_plate
          - dayplate
          - nightplate
          - plate
        inertia: 3
        loitering_time: 1
      Zone_KiGa-Gehweg:
        coordinates: 
          0.023,0.194,0.031,0.3,0.199,0.222,0.283,0.182,0.336,0.158,0.357,0.134,0.353,0.097,0.335,0.074,0.304,0.061,0.252,0.046,0.195,0.038,0.195,0.055,0.269,0.069,0.269,0.088,0.206,0.098
        inertia: 3
        objects:
          - person
          - face
          - bicycle
          - package
          - amazon
          - car
          - license_plate
          - dayplate
          - nightplate
          - plate
        loitering_time: 1
      Zone_Straße-Am-Oberen-Tor:
        coordinates: 
          0.03,0.294,0.08,0.621,0.379,0.408,0.358,0.329,0.36,0.256,0.381,0.217,0.407,0.194,0.435,0.18,0.462,0.177,0.508,0.18,0.553,0.238,0.566,0.302,0.618,0.261,0.688,0.233,0.758,0.214,0.824,0.198,0.89,0.198,0.941,0.205,0.941,0.175,0.801,0.101,0.681,0.063,0.629,0.049,0.574,0.035,0.573,0,0.193,0,0.193,0.034,0.242,0.041,0.289,0.052,0.333,0.07,0.356,0.096,0.356,0.128,0.341,0.155,0.259,0.189,0.156,0.238
        inertia: 3
        objects:
          - car
          - license_plate
          - dayplate
          - nightplate
          - plate
          - person
          - face
          - package
          - amazon
          - bicycle
          - motorcycle
  Sued-Ost:
    enabled: true
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/go2rtc_Sued-Ost
          input_args: preset-rtsp-restream
          roles:
            - audio
          #- detect
            - record
        - path: rtsp://127.0.0.1:8554/go2rtc_Sued-Ost_SUB
          input_args: preset-rtsp-generic
          roles:
          #- audio
            - detect

    record:
      enabled: false
    audio:
      enabled: false
    best_image_timeout: 60
    webui_url: 
      http://192.168.1.12:5000/api/Sued-Ost?fps=30&h=1296&timestamp=1&zones=1&bbox=1&motion=1&regions=1
    ui:
      dashboard: true
      order: 2
    live:
      stream_name: go2rtc_Sued-Ost
      height: 1296
      quality: 1
    detect:
      enabled: false
      width: 1280
      height: 720
      fps: 10
    birdseye:
      order: 2
    objects:
      track:
        - person
        - face
        - package
        - amazon
        - car
        - license_plate
        - dayplate
        - nightplate
        - plate
        - bicycle
        - motorcycle
        - dog
        - cat
        - bus
        - horse
      filters:
        car:
          mask: 
            0.097,0.554,0.097,0.527,0.148,0.504,0.149,0.534,0.174,0.532,0.176,0.57,0.152,0.592,0.157,0.641,0.099,0.613
    motion:
      mask: 
        0,0,1,0,1,0.35,0.866,0.351,0.71,0.366,0.664,0.387,0.587,0.389,0.469,0.388,0.408,0.398,0.322,0.406,0.28,0.346,0.223,0.332,0.204,0.293,0.106,0.256,0.079,0.341,0,0.342
    zones:
      Zone_Hof-Einfahrt:
        coordinates: 
          0.551,1,0.593,0.913,0.625,0.838,0.653,0.793,0.679,0.779,0.738,0.782,0.736,0.806,0.683,0.812,0.742,0.869,0.787,0.919,0.836,0.968,0.847,0.995
        inertia: 3
      Zone_Gehweg-Pusteblume:
        coordinates: 
          0.497,0.594,0.496,0.561,0.518,0.588,0.538,0.606,0.555,0.63,0.562,0.658,0.558,0.684,0.536,0.707,0.509,0.728,0.467,0.741,0.428,0.75,0.376,0.754,0.331,0.745,0.268,0.726,0.21,0.702,0.156,0.676,0.082,0.629,0.019,0.573,0.016,0.522,0.035,0.522,0.099,0.556,0.099,0.53,0.15,0.511,0.15,0.537,0.176,0.532,0.179,0.569,0.153,0.589,0.248,0.621,0.31,0.654,0.389,0.651,0.423,0.644,0.431,0.636,0.432,0.598
        inertia: 3
      Zone_KiGa-Gehweg:
        coordinates: 
          0.026,0.651,0.119,0.733,0.172,0.781,0.201,0.828,0.217,0.872,0.217,0.937,0.149,0.869,0.085,0.793,0.034,0.735
        inertia: 3
      Zone_Straße-Gesamt:
        coordinates: 
          0.495,0.556,0.495,0.494,0.557,0.523,0.668,0.526,0.668,0.575,0.651,0.575,0.637,0.579,0.625,0.602,0.637,0.622,0.67,0.65,0.76,0.705,0.855,0.763,0.8,0.778,0.74,0.779,0.682,0.774,0.655,0.787,0.634,0.812,0.613,0.853,0.551,1,0.285,1,0.217,0.933,0.217,0.871,0.201,0.824,0.171,0.776,0.128,0.736,0.027,0.653,0.018,0.578,0.067,0.607,0.117,0.649,0.178,0.683,0.248,0.717,0.318,0.74,0.376,0.752,0.427,0.75,0.477,0.738,0.522,0.717,0.558,0.684,0.562,0.66,0.556,0.632,0.536,0.603
        inertia: 3
      Zone_Straße-Am-Oberen-Tor:
        coordinates: 
          0.556,0.635,0.56,0.663,0.556,0.687,0.534,0.707,0.513,0.724,0.483,0.738,0.445,0.747,0.4,0.752,0.355,0.749,0.308,0.738,0.254,0.72,0.2,0.7,0.117,0.651,0.063,0.608,0.017,0.574,0.025,0.649,0.103,0.716,0.171,0.774,0.203,0.825,0.218,0.872,0.218,0.935,0.281,1,0.545,1,0.588,0.914,0.622,0.838,0.654,0.793,0.673,0.779,0.727,0.777,0.628,0.712
        inertia: 3
      Zone_Straße-Haupt:
        coordinates: 
          0.494,0.556,0.494,0.489,0.552,0.525,0.623,0.6,0.638,0.621,0.663,0.64,0.714,0.672,0.856,0.758,0.809,0.774,0.735,0.776,0.631,0.715,0.556,0.636,0.535,0.605
        inertia: 3
      Zone_Straße-Am-Damm:
        coordinates: 
          0.558,0.497,0.558,0.545,0.625,0.602,0.635,0.582,0.65,0.575,0.668,0.575,0.67,0.496

        inertia: 3
  Katzen-Korb:
    enabled: false
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/go2rtc_Katzen-Korb
          input_args: preset-rtsp-restream
          roles:
            - audio
          #- detect
            - record
        - path: rtsp://127.0.0.1:8554/go2rtc_Katzen-Korb_SUB
          input_args: preset-rtsp-restream
          roles:
            - detect
    record:
      enabled: false
    best_image_timeout: 60
    webui_url: 
      http://192.168.1.12:5000/api/Katzen-Korb?fps=30&h=1296&timestamp=1&zones=1&bbox=1&motion=1&regions=1
    ui:
      dashboard: true
      order: 3
    live:
      stream_name: go2rtc_Katzen-Korb
      height: 1296
      quality: 1
    detect:
      enabled: false
      width: 1280
      height: 720
      fps: 10
    birdseye:
      order: 3
    objects:
      track:
        - person
        - cat

  Katzen-Schrank:
    enabled: false
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/go2rtc_Katzen-Schrank
          input_args: preset-rtsp-restream
          roles:
            - audio
          #- detect
            - record
        - path: rtsp://127.0.0.1:8554/go2rtc_Katzen-Schrank_SUB
          input_args: preset-rtsp-restream
          roles:
            - detect
    record:
      enabled: false
    best_image_timeout: 60
    webui_url: 
      http://192.168.1.12:5000/api/Katzen-Schrank?fps=30&h=1296&timestamp=1&zones=1&bbox=1&motion=1&regions=1
    ui:
      dashboard: true
      order: 4
    live:
      stream_name: go2rtc_Katzen-Schrank
      height: 1080
      quality: 1
    detect:
      enabled: false
      width: 1280
      height: 720
      fps: 10
    birdseye:
      order: 4
    objects:
      track:
        - person
        - cat

telemetry:
  network_interfaces:
    - eth
    - enp
    - eno
    - ens
    - wl
    - lo
  stats:
    amd_gpu_stats: false
    intel_gpu_stats: true
    network_bandwidth: true
  version_check: true

camera_groups:
  Außenbereich:
    order: 1
    icon: LuCloudSunRain
    cameras:
      - Eingang
      - Sued-Ost