blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.47k stars 1.79k forks source link

[Support]: Camera / Birdseye Live View #9625

Closed gelato closed 10 months ago

gelato commented 10 months ago

Describe the problem you are having

It seems that I can't configure 2 streams and use HQ stream for live/birdseye and LQ stream for detect because live/birdseye settings are actually detect's settings (if I set 5 fps in detect - live will be using 5 fps in the viewer, if I use LQ stream for detect - the same will be for live/birdseye no matter the stream_name: setting). My goal is to have HQ stream for live/recordings and LQ for detect.

Version

0.13.0-01E2D20

Frigate config file

mqtt:
  # Optional: Enable mqtt server (default: shown below)
  enabled: True
  # Required: host name
  host: mosquitto.multimedia.svc.cluster.local
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # NOTE: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # NOTE: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  # NOTE: MQTT user can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
  #       e.g. user: '{FRIGATE_MQTT_USER}'
  user: mqttuser
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variable or docker secrets that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: 12332145
  # Optional: tls_ca_certs for enabling TLS using self-signed certs (default: None)
  # tls_ca_certs: /path/to/ca.crt
  # Optional: tls_client_cert and tls_client key in order to use self-signed client
  # certificates (default: None)
  # NOTE: certificate must not be password-protected
  #       do not set user and password when using a client certificate
  # tls_client_cert: /path/to/client.crt
  # tls_client_key: /path/to/client.key
  # Optional: tls_insecure (true/false) for enabling TLS verification of
  # the server hostname in the server certificate (default: None)
  # tls_insecure: true
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

# Optional: Detectors configuration. Defaults to a single CPU detector
detectors:
  # Required: name of the detector
  detector_name:
    # Required: type of the detector
    # Frigate provided types include 'cpu', 'edgetpu', 'openvino' and 'tensorrt' (default: shown below)
    # Additional detector types can also be plugged in.
    # Detectors may require additional configuration.
    # Refer to the Detectors configuration page for more information.
    type: cpu

# Optional: Database configuration
database:
  # The path to store the SQLite DB (default: shown below)
  path: /data/frigate.db

# Optional: model modifications
# model:
#   # Optional: path to the model (default: automatic based on detector)
#   path: /edgetpu_model.tflite
#   # Optional: path to the labelmap (default: shown below)
#   labelmap_path: /labelmap.txt
#   # Required: Object detection model input width (default: shown below)
#   width: 320
#   # Required: Object detection model input height (default: shown below)
#   height: 320
#   # Optional: Object detection model input colorspace
#   # Valid values are rgb, bgr, or yuv. (default: shown below)
#   input_pixel_format: rgb
#   # Optional: Object detection model input tensor format
#   # Valid values are nhwc or nchw (default: shown below)
#   input_tensor: nhwc
#   # Optional: Object detection model type, currently only used with the OpenVINO detector
#   # Valid values are ssd, yolox, yolov5, or yolov8 (default: shown below)
#   model_type: ssd
#   # Optional: Label name modifications. These are merged into the standard labelmap.
#   labelmap:
#     2: vehicle

# Optional: Audio Events Configuration
# NOTE: Can be overridden at the camera level
audio:
  # Optional: Enable audio events (default: shown below)
  enabled: True
  # Optional: Configure the amount of seconds without detected audio to end the event (default: shown below)
  max_not_heard: 30
  # Optional: Configure the min rms volume required to run audio detection (default: shown below)
  # As a rule of thumb:
  #  - 200 - high sensitivity
  #  - 500 - medium sensitivity
  #  - 1000 - low sensitivity
  min_volume: 500
  # Optional: Types of audio to listen for (default: shown below)
  listen:
    - bark
    - fire_alarm
    - scream
    - speech
    - yell
  # Optional: Filters to configure detection.
  filters:
    # Label that matches label in listen config.
    speech:
      # Minimum score that triggers an audio event (default: shown below)
      threshold: 0.8
    scream:
      # Minimum score that triggers an audio event (default: shown below)
      threshold: 0.8
    yell:
      # Minimum score that triggers an audio event (default: shown below)
      threshold: 0.8

# Optional: logger verbosity settings
logger:
  # Optional: Default log verbosity (default: shown below)
  default: info
  # Optional: Component specific logger overrides
  logs:
    frigate.event: debug

# Optional: set environment variables
# environment_vars:
#   EXAMPLE_VAR: value

# Optional: birdseye configuration
# NOTE: Can (enabled, mode) be overridden at the camera level
birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Restream birdseye via RTSP (default: shown below)
  # NOTE: Enabling this will set birdseye to run 24/7 which may increase CPU usage somewhat.
  restream: False
  # Optional: Width of the output resolution (default: shown below)
  width: 1920
  # Optional: Height of the output resolution (default: shown below)
  height: 1080
  # Optional: Encoding quality of the mpeg1 feed (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 1
  # Optional: Mode of the view. Available options are: objects, motion, and continuous
  #   objects - cameras are included if they have had a tracked object within the last 30 seconds
  #   motion - cameras are included if motion was detected in the last 30 seconds
  #   continuous - all cameras are included always
  mode: motion

# Optional: ffmpeg configuration
# More information about presets at https://docs.frigate.video/configuration/ffmpeg_presets
ffmpeg:
  # Optional: global ffmpeg args (default: shown below)
  global_args: -hide_banner -loglevel warning -threads 2
  # Optional: global hwaccel args (default: shown below)
  # NOTE: See hardware acceleration docs for your specific device
  hwaccel_args: ["-vaapi_device", "/dev/dri/renderD128", "-hwaccel_output_format", "vaapi"]
  # Optional: global input args (default: shown below)
  input_args: preset-rtsp-generic
  # Optional: global output args
  output_args:
    # Optional: output args for detect streams (default: shown below)
    detect: -threads 2 -f rawvideo -pix_fmt yuv420p
    # Optional: output args for record streams (default: shown below)
    record:
      -f segment
      -segment_format mp4
      -segment_time 15
      -reset_timestamps 1
      -strftime 1
      -codec:v h264_vaapi
      -b:v 2M
      -maxrate 2M
      -c:v copy
      -c:a aac
    # Optional: output args for rtmp streams (default: shown below)
    rtmp: preset-rtmp-generic
  # Optional: Time in seconds to wait before ffmpeg retries connecting to the camera. (default: shown below)
  # If set too low, frigate will retry a connection to the camera's stream too frequently, using up the limited streams some cameras can allow at once
  # If set too high, then if a ffmpeg crash or camera stream timeout occurs, you could potentially lose up to a maximum of retry_interval second(s) of footage
  # NOTE: this can be a useful setting for Wireless / Battery cameras to reduce how much footage is potentially lost during a connection timeout.
  retry_interval: 10

# Optional: Detect configuration
# NOTE: Can be overridden at the camera level
detect:
  # Optional: width of the frame for the input with the detect role (default: use native stream resolution)
  # width: 1280
  # # Optional: height of the frame for the input with the detect role (default: use native stream resolution)
  # height: 720
  # Optional: desired fps for your camera for the input with the detect role (default: shown below)
  # NOTE: Recommended value of 5. Ideally, try and reduce your FPS on the camera.
  fps: 25
  # Optional: enables detection for the camera (default: True)
  enabled: True
  # Optional: Number of consecutive detection hits required for an object to be initialized in the tracker. (default: 1/2 the frame rate)
  # min_initialized: 2
  # Optional: Number of frames without a detection before Frigate considers an object to be gone. (default: 5x the frame rate)
  # max_disappeared: 25
  # Optional: Configuration for stationary object tracking
  # stationary:
    # Optional: Frequency for confirming stationary objects (default: same as threshold)
    # When set to 1, object detection will run to confirm the object still exists on every frame.
    # If set to 10, object detection will run to confirm the object still exists on every 10th frame.
    # interval: 50
    # Optional: Number of frames without a position change for an object to be considered stationary (default: 10x the frame rate or 10s)
    # threshold: 50
    # Optional: Define a maximum number of frames for tracking a stationary object (default: not set, track forever)
    # This can help with false positives for objects that should only be stationary for a limited amount of time.
    # It can also be used to disable stationary object tracking. For example, you may want to set a value for person, but leave
    # car at the default.
    # WARNING: Setting these values overrides default behavior and disables stationary object tracking.
    #          There are very few situations where you would want it disabled. It is NOT recommended to
    #          copy these values from the example config into your config unless you know they are needed.
    # max_frames:
    #   # Optional: Default for all object types (default: not set, track forever)
    #   default: 3000
    #   # Optional: Object specific values
    #   objects:
    #     person: 1000
  # Optional: Milliseconds to offset detect annotations by (default: shown below).
  # There can often be latency between a recording and the detect process,
  # especially when using separate streams for detect and record.
  # Use this setting to make the timeline bounding boxes more closely align
  # with the recording. The value can be positive or negative.
  # TIP: Imagine there is an event clip with a person walking from left to right.
  #      If the event timeline bounding box is consistently to the left of the person
  #      then the value should be decreased. Similarly, if a person is walking from
  #      left to right and the bounding box is consistently ahead of the person
  #      then the value should be increased.
  # TIP: This offset is dynamic so you can change the value and it will update existing
  #      events, this makes it easy to tune.
  # WARNING: Fast moving objects will likely not have the bounding box align.
  # annotation_offset: 0

# Optional: Object configuration
# NOTE: Can be overridden at the camera level
objects:
  # Optional: list of objects to track from labelmap.txt (default: shown below)
  track:
    - person
    - cat
    - dog
    - car
    - bicycle
    - motorcycle
    - bus
    - bird
    - horse
    - cow
    - handbag
    - suitcase
    - skateboard
    - door
  # Optional: mask to prevent all object types from being detected in certain areas (default: no mask)
  # Checks based on the bottom center of the bounding box of the object.
  # NOTE: This mask is COMBINED with the object type specific mask below
  # mask: 0,0,1000,0,1000,200,0,200
  # Optional: filters to reduce false positives for specific object types
  # 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
  #     # 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

# Optional: Motion configuration
# NOTE: Can be overridden at the camera level
motion:
  # Optional: The threshold passed to cv2.threshold to determine if a pixel is different enough to be counted as motion. (default: shown below)
  # Increasing this value will make motion detection less sensitive and decreasing it will make motion detection more sensitive.
  # The value should be between 1 and 255.
  threshold: 30
  # Optional: The percentage of the image used to detect lightning or other substantial changes where motion detection
  #           needs to recalibrate. (default: shown below)
  # Increasing this value will make motion detection more likely to consider lightning or ir mode changes as valid motion.
  # Decreasing this value will make motion detection more likely to ignore large amounts of motion such as a person approaching
  # a doorbell camera.
  lightning_threshold: 0.8
  # Optional: Minimum size in pixels in the resized motion image that counts as motion (default: shown below)
  # Increasing this value will prevent smaller areas of motion from being detected. Decreasing will
  # make motion detection more sensitive to smaller moving objects.
  # As a rule of thumb:
  #  - 10 - high sensitivity
  #  - 30 - medium sensitivity
  #  - 50 - low sensitivity
  contour_area: 10
  # 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
  # Optional: Height of the resized motion frame  (default: 100)
  # Higher values will result in more granular motion detection at the expense of higher CPU usage.
  # Lower values result in less CPU, but small changes may not register as motion.
  frame_height: 100
  # Optional: motion mask
  # NOTE: see docs for more detailed info on creating masks
  # mask: 0,900,1080,900,1080,1920,0,1920
  # Optional: improve contrast (default: shown below)
  # Enables dynamic contrast improvement. This should help improve night detections at the cost of making motion detection more sensitive
  # for daytime.
  improve_contrast: True
  # Optional: Delay when updating camera motion through MQTT from ON -> OFF (default: shown below).
  mqtt_off_delay: 30

# Optional: Record configuration
# NOTE: Can be overridden at the camera level
record:
  # Optional: Enable recording (default: shown below)
  # WARNING: If recording is disabled in the config, turning it on via
  #          the UI or MQTT later will have no effect.
  enabled: True
  # Optional: Number of minutes to wait between cleanup runs (default: shown below)
  # This can be used to reduce the frequency of deleting recording segments from disk if you want to minimize i/o
  expire_interval: 60
  # Optional: Sync recordings with disk on startup and once a day (default: shown below).
  sync_recordings: True
  # Optional: Retention settings for recording
  retain:
    # Optional: Number of days to retain recordings regardless of events (default: shown below)
    # NOTE: This should be set to 0 and retention should be defined in events section below
    #       if you only want to retain recordings of events.
    days: 30
    # Optional: Mode for retention. Available options are: all, motion, and active_objects
    #   all - save all recording segments regardless of activity
    #   motion - save all recordings segments with any detected motion
    #   active_objects - save all recording segments with active/moving objects
    # NOTE: this mode only applies when the days setting above is greater than 0
    mode: all
  # Optional: Recording Export Settings
  export:
    # Optional: Timelapse Output Args (default: shown below).
    # NOTE: The default args are set to fit 24 hours of recording into 1 hour playback.
    # See https://stackoverflow.com/a/58268695 for more info on how these args work.
    # As an example: if you wanted to go from 24 hours to 30 minutes that would be going
    # from 86400 seconds to 1800 seconds which would be 1800 / 86400 = 0.02.
    # The -r (framerate) dictates how smooth the output video is.
    # So the args would be -vf setpts=0.02*PTS -r 30 in that case.
    timelapse_args: "-vf setpts=0.04*PTS -r 30"
  # Optional: Event recording settings
  events:
    # Optional: Number of seconds before the event to include (default: shown below)
    pre_capture: 5
    # Optional: Number of seconds after the event to include (default: shown below)
    post_capture: 5
    # Optional: Objects to save recordings for. (default: all tracked objects)
    # objects:
    #   - person
    # Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
    required_zones: []
    # Optional: Retention settings for recordings of events
    retain:
      # Required: Default retention days (default: shown below)
      default: 30
      # Optional: Mode for retention. (default: shown below)
      #   all - save all recording segments for events regardless of activity
      #   motion - save all recordings segments for events with any detected motion
      #   active_objects - save all recording segments for event with active/moving objects
      #
      # NOTE: If the retain mode for the camera is more restrictive than the mode configured
      #       here, the segments will already be gone by the time this mode is applied.
      #       For example, if the camera retain mode is "motion", the segments without motion are
      #       never stored, so setting the mode to "all" here won't bring them back.
      mode: motion
      # Optional: Per object retention days
      objects:
        person: 30

# Optional: Configuration for the jpg snapshots written to the clips directory for each event
# NOTE: Can be overridden at the camera level
snapshots:
  # Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
  enabled: True
  # Optional: save a clean PNG copy of the snapshot image (default: shown below)
  clean_copy: True
  # Optional: print a timestamp on the snapshots (default: shown below)
  timestamp: True
  # 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: 30
    # Optional: Per object retention days
    objects:
      person: 30
  # Optional: quality of the encoded jpeg, 0-100 (default: shown below)
  quality: 90

# Optional: RTMP configuration
# NOTE: RTMP is deprecated in favor of restream
# NOTE: Can be overridden at the camera level
rtmp:
  # Optional: Enable the RTMP stream (default: False)
  enabled: False

# Optional: Restream configuration
# Uses https://github.com/AlexxIT/go2rtc (v1.8.3)
go2rtc:
  streams:
    gates_hq:
      - rtsp://admin:12332145@192.168.108.103:8554/Streaming/Channels/101
      - "ffmpeg:gates_hq#audio=aac"
    gates_lq:
      - rtsp://admin:12332145@192.168.108.103:8554/Streaming/Channels/102
      - "ffmpeg:gates_lq#audio=aac"

# Optional: jsmpeg stream configuration for WebUI
live:
  # Optional: Set the name of the stream that should be used for live view
  # in frigate WebUI. (default: name of camera)
  stream_name: gates_hq
  # Optional: Set the height of the jsmpeg stream. (default: 720)
  # This must be less than or equal to the height of the detect stream. Lower resolutions
  # reduce bandwidth required for viewing the jsmpeg stream. Width is computed to match known aspect ratio.
  # height: 1080
  # Optional: Set the encode quality of the jsmpeg stream (default: shown below)
  # 1 is the highest quality, and 31 is the lowest. Lower quality feeds utilize less CPU resources.
  quality: 1

# Optional: in-feed timestamp style configuration
# NOTE: Can be overridden at the camera level
# timestamp_style:
#   # Optional: Position of the timestamp (default: shown below)
#   #           "tl" (top left), "tr" (top right), "bl" (bottom left), "br" (bottom right)
#   position: "tl"
#   # Optional: Format specifier conform to the Python package "datetime" (default: shown below)
#   #           Additional Examples:
#   #             german: "%d.%m.%Y %H:%M:%S"
#   format: "%m/%d/%Y %H:%M:%S"
#   # Optional: Color of font
#   color:
#     # All Required when color is specified (default: shown below)
#     red: 255
#     green: 255
#     blue: 255
#   # Optional: Line thickness of font (default: shown below)
#   thickness: 2
#   # Optional: Effect of lettering (default: shown below)
#   #           None (No effect),
#   #           "solid" (solid background in inverse color of font)
#   #           "shadow" (shadow for font)
#   effect: None

# Required
cameras:
  # Required: name of the camera
  gates:
    # Optional: Enable/Disable the camera (default: shown below).
    # If disabled: config is used but no live stream and no capture etc.
    # Events/Recordings are still viewable.
    enabled: True
    # Required: ffmpeg settings for the camera
    ffmpeg:
      # Required: A list of input streams for the camera. See documentation for more information.
      inputs:
        # Required: the path to the stream
        # NOTE: path may include environment variables or docker secrets, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://localhost:8554/gates_hq
          input_args: preset-rtsp-restream
          roles:
            - record
            - audio
            - detect
        - path: rtsp://localhost:8554/gates_lq
          input_args: preset-rtsp-restream
          roles:
            - detect
          # Required: list of roles for this stream. valid values are: audio,detect,record,rtmp
          # NOTICE: In addition to assigning the audio, record, and rtmp roles,
          # they must also be enabled in the camera config.
          # roles:
          #   - audio
          #   - record
          # Optional: stream specific global args (default: inherit)
          # global_args:
          # Optional: stream specific hwaccel args (default: inherit)
          # hwaccel_args:
          # Optional: stream specific input args (default: inherit)
          # input_args:
      # Optional: camera specific global args (default: inherit)
      # global_args:
      # Optional: camera specific hwaccel args (default: inherit)
      # hwaccel_args:
      # Optional: camera specific input args (default: inherit)
      # input_args:
      # Optional: camera specific output args (default: inherit)
      # output_args:

    # Optional: timeout for highest scoring image before allowing it
    # to be replaced by a newer image. (default: shown below)
    best_image_timeout: 60

    # Optional: URL to visit the camera web UI directly from the system page. Might not be available on every camera.
    webui_url: ""

    # Optional: zones for this camera
    zones:
      # Required: name of the zone
      # NOTE: This must be different than any camera names, but can match with another zone on another
      #       camera.
      inside_gates:
        # Required: List of x,y coordinates to define the polygon of the zone.
        # NOTE: Presence in a zone is evaluated only based on the bottom center of the objects bounding box.
        coordinates: 1920,740,1920,996,1739,983,1379,723,1531,565
        # Optional: Number of consecutive frames required for object to be considered present in the zone (default: shown below).
        inertia: 3
        # Optional: List of objects that can trigger this zone (default: all tracked objects)
        objects:
          - person
          - dog
          - car
          - cat
        # Optional: Zone level object filters.
        # NOTE: The global and camera filters are applied upstream.
        # filters:
        #   person:
        #     min_area: 5000
        #     max_area: 100000
        #     threshold: 0.7
      sidewalk:
        coordinates: 895,1080,373,1080,0,1080,0,992,427,747,675,623,1291,277,1767,21,1776,85,1756,177,1677,305,1605,269,1543,329,1437,479,1256,632,1193,853
        inertia: 3
      road:
        coordinates: 1628,91,1801,0,1417,0,1071,0,557,0,273,105,0,255,0,965
        inertia: 3
      other_side_of_the_road:
        coordinates: 268,35,372,0,420,0,411,31,200,129,0,244,0,176
        inertia: 3

    # Optional: Configuration for the jpg snapshots published via MQTT
    mqtt:
      # Optional: Enable publishing snapshot via mqtt for camera (default: shown below)
      # NOTE: Only applies to publishing image data to MQTT via 'frigate/<camera_name>/<object_name>/snapshot'.
      # All other messages will still be published.
      enabled: True
      # Optional: print a timestamp on the snapshots (default: shown below)
      timestamp: True
      # Optional: draw bounding box on the snapshots (default: shown below)
      bounding_box: True
      # Optional: crop the snapshot (default: shown below)
      crop: True
      # Optional: height to resize the snapshot to (default: shown below)
      height: 270
      # Optional: jpeg encode quality (default: shown below)
      quality: 70
      # Optional: Restrict mqtt messages to objects that entered any of the listed zones (default: no required zones)
      required_zones: []

    # Optional: Configuration for how camera is handled in the GUI.
    ui:
      # Optional: Adjust sort order of cameras in the UI. Larger numbers come later (default: shown below)
      # By default the cameras are sorted alphabetically.
      order: 0
      # Optional: Whether or not to show the camera in the Frigate UI (default: shown below)
      dashboard: True

    # Optional: connect to ONVIF camera
    # to enable PTZ controls.
    # onvif:
    #   # Required: host of the camera being connected to.
    #   host: 0.0.0.0
    #   # Optional: ONVIF port for device (default: shown below).
    #   port: 8000
    #   # Optional: username for login.
    #   # NOTE: Some devices require admin to access ONVIF.
    #   user: admin
    #   # Optional: password for login.
    #   password: admin
    #   # Optional: PTZ camera object autotracking. Keeps a moving object in
    #   # the center of the frame by automatically moving the PTZ camera.
    #   autotracking:
    #     # Optional: enable/disable object autotracking. (default: shown below)
    #     enabled: False
    #     # Optional: calibrate the camera on startup (default: shown below)
    #     # A calibration will move the PTZ in increments and measure the time it takes to move.
    #     # The results are used to help estimate the position of tracked objects after a camera move.
    #     # Frigate will update your config file automatically after a calibration with
    #     # a "movement_weights" entry for the camera. You should then set calibrate_on_startup to False.
    #     calibrate_on_startup: False
    #     # Optional: the mode to use for zooming in/out on objects during autotracking. (default: shown below)
    #     # Available options are: disabled, absolute, and relative
    #     #   disabled - don't zoom in/out on autotracked objects, use pan/tilt only
    #     #   absolute - use absolute zooming (supported by most PTZ capable cameras)
    #     #   relative - use relative zooming (not supported on all PTZs, but makes concurrent pan/tilt/zoom movements)
    #     zooming: disabled
    #     # Optional: A value to change the behavior of zooming on autotracked objects. (default: shown below)
    #     # A lower value will keep more of the scene in view around a tracked object.
    #     # A higher value will zoom in more on a tracked object, but Frigate may lose tracking more quickly.
    #     # The value should be between 0.1 and 0.75
    #     zoom_factor: 0.3
    #     # Optional: list of objects to track from labelmap.txt (default: shown below)
    #     track:
    #       - person
    #     # Required: Begin automatically tracking an object when it enters any of the listed zones.
    #     required_zones:
    #       - zone_name
    #     # Required: Name of ONVIF preset in camera's firmware to return to when tracking is over. (default: shown below)
    #     return_preset: home
    #     # Optional: Seconds to delay before returning to preset. (default: shown below)
    #     timeout: 10
    #     # Optional: Values generated automatically by a camera calibration. Do not modify these manually. (default: shown below)
    #     movement_weights: []

    # Optional: Configuration for how to sort the cameras in the Birdseye view.
    birdseye:
      # Optional: Adjust sort order of cameras in the Birdseye view. Larger numbers come later (default: shown below)
      # By default the cameras are sorted alphabetically.
      order: 0

# Optional
ui:
  # Optional: Set the default live mode for cameras in the UI (default: shown below)
  live_mode: mse
  # Optional: Set a timezone to use in the UI (default: use browser local time)
  # timezone: America/Denver
  # Optional: Use an experimental recordings / camera view UI (default: shown below)
  use_experimental: True
  # Optional: Set the time format used.
  # Options are browser, 12hour, or 24hour (default: shown below)
  time_format: browser
  # Optional: Set the date style for a specified length.
  # Options are: full, long, medium, short
  # Examples:
  #    short: 2/11/23
  #    medium: Feb 11, 2023
  #    full: Saturday, February 11, 2023
  # (default: shown below).
  date_style: short
  # Optional: Set the time style for a specified length.
  # Options are: full, long, medium, short
  # Examples:
  #    short: 8:14 PM
  #    medium: 8:15:22 PM
  #    full: 8:15:22 PM Mountain Standard Time
  # (default: shown below).
  time_style: medium
  # Optional: Ability to manually override the date / time styling to use strftime format
  # https://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html
  # possible values are shown above (default: not set)
  strftime_fmt: "%Y/%m/%d %H:%M"

# Optional: Telemetry configuration
telemetry:
  # Optional: Enabled network interfaces for bandwidth stats monitoring (default: empty list, let nethogs search all)
  network_interfaces:
    - eth
    - enp
    - eno
    - ens
    - wl
    - lo
  # Optional: Configure system stats
  stats:
    # Enable AMD GPU stats (default: shown below)
    amd_gpu_stats: True
    # Enable Intel GPU stats (default: shown below)
    intel_gpu_stats: False
    # Enable network bandwidth stats monitoring for camera ffmpeg processes, go2rtc, and object detectors. (default: shown below)
    # NOTE: The container must either be privileged or have cap_net_admin, cap_net_raw capabilities enabled.
    network_bandwidth: False
  # Optional: Enable the latest version outbound check (default: shown below)
  # NOTE: If you use the HomeAssistant integration, disabling this will prevent it from reporting new versions
  version_check: True

Relevant log output

2024-02-03 09:39:40.672176853  [INFO] Preparing Frigate...
2024-02-03 09:39:40.682448904  [INFO] Starting Frigate...
2024-02-03 09:39:41.622520852  [2024-02-03 12:39:41] frigate.app                    INFO    : Starting Frigate (0.13.0-01e2d20)
2024-02-03 09:39:41.622583333  [2024-02-03 12:39:41] frigate.app                    INFO    : Creating directory: /tmp/cache
2024-02-03 09:39:41.622608290  [2024-02-03 12:39:41] frigate.app                    INFO    : Creating directory: /config/model_cache
2024-02-03 09:39:41.658794690  [2024-02-03 12:39:41] peewee_migrate.logs            INFO    : Starting migrations
2024-02-03 09:39:41.662011994  [2024-02-03 12:39:41] peewee_migrate.logs            INFO    : There is nothing to migrate
2024-02-03 09:39:41.670615949  [2024-02-03 12:39:41] frigate.app                    INFO    : Running database vacuum
2024-02-03 09:39:41.841897420  [2024-02-03 12:39:41] frigate.app                    INFO    : Recording process started: 441
2024-02-03 09:39:41.843000225  [2024-02-03 12:39:41] frigate.app                    INFO    : go2rtc process pid: 89
2024-02-03 09:39:41.856522376  [2024-02-03 12:39:41] detector.detector_name         INFO    : Starting detection process: 451
2024-02-03 09:39:41.859237601  [2024-02-03 12:39:41] frigate.app                    INFO    : Output process started: 453
2024-02-03 09:39:41.859385483  [2024-02-03 12:39:41] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2024-02-03 09:39:41.880488914  [2024-02-03 12:39:41] frigate.app                    INFO    : Camera processor started for gates: 464
2024-02-03 09:39:41.884527549  [2024-02-03 12:39:41] frigate.app                    INFO    : Capture process started for gates: 466
2024-02-03 09:39:41.888622835  [2024-02-03 12:39:41] frigate.app                    INFO    : Audio process started: 469

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"161/12","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","display_aspect_ratio":"16:9","height":1080,"width":1920},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]

Frigate stats

{"cameras":{"gates":{"audio_dBFS":-38.6588,"audio_rms":382.3943,"camera_fps":25.0,"capture_pid":466,"detection_enabled":1,"detection_fps":16.8,"ffmpeg_pid":471,"pid":464,"process_fps":15.0,"skipped_fps":10.0}},"cpu_usages":{"1":{"cmdline":"/package/admin/s6/command/s6-svscan -d4 -- /run/service","cpu":"0.0","cpu_average":"0","mem":"0.0"},"15":{"cmdline":"s6-supervise s6-linux-init-shutdownd","cpu":"0.0","cpu_average":"0","mem":"0.0"},"16":{"cmdline":"/package/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/basedir -g 3000 -C -B","cpu":"0.0","cpu_average":"0","mem":"0.0"},"24":{"cmdline":"s6-supervise nginx","cpu":"0.0","cpu_average":"0","mem":"0.0"},"25":{"cmdline":"s6-supervise go2rtc-healthcheck","cpu":"0.0","cpu_average":"0","mem":"0.0"},"26":{"cmdline":"s6-supervise s6rc-fdholder","cpu":"0.0","cpu_average":"0","mem":"0.0"},"27":{"cmdline":"s6-supervise go2rtc-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"28":{"cmdline":"s6-supervise go2rtc","cpu":"0.0","cpu_average":"0","mem":"0.0"},"29":{"cmdline":"s6-supervise s6rc-oneshot-runner","cpu":"0.0","cpu_average":"0","mem":"0.0"},"30":{"cmdline":"s6-supervise frigate","cpu":"0.0","cpu_average":"0","mem":"0.0"},"31":{"cmdline":"s6-supervise frigate-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"32":{"cmdline":"s6-supervise nginx-log","cpu":"0.0","cpu_average":"0","mem":"0.0"},"41":{"cmdline":"/package/admin/s6-2.11.3.2/command/s6-fdholderd -1 -i data/rules","cpu":"0.0","cpu_average":"0","mem":"0.0"},"42":{"cmdline":"/package/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ipcserver-access -v0 -E -l0 -i data/rules -- /package/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s6-rc-oneshot-run -l ../.. --","cpu":"0.0","cpu_average":"0","mem":"0.0"},"80":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/nginx","cpu":"0.0","cpu_average":"0","mem":"0.0"},"81":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/go2rtc","cpu":"0.0","cpu_average":"0","mem":"0.0"},"82":{"cmdline":"s6-log -b -- T 1 n0 s10000000 T /dev/shm/logs/frigate","cpu":"0.0","cpu_average":"0","mem":"0.0"},"89":{"cmdline":"/usr/local/go2rtc/bin/go2rtc -config=/dev/shm/go2rtc.yaml","cpu":"0.7","cpu_average":"0","mem":"0.0"},"95":{"cmdline":"python3 -u -m frigate","cpu":"1.3","cpu_average":"1","mem":"0.3"},"103":{"cmdline":"bash ./run.user go2rtc-healthcheck","cpu":"0.0","cpu_average":"0","mem":"0.0"},"104":{"cmdline":"nginx: master process nginx","cpu":"0.0","cpu_average":"0","mem":"0.0"},"144":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"145":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"146":{"cmdline":"nginx: worker process","cpu":"0.1","cpu_average":"0","mem":"0.0"},"160":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"190":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"223":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"239":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"243":{"cmdline":"nginx: worker process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"247":{"cmdline":"nginx: cache manager process","cpu":"0.0","cpu_average":"0","mem":"0.0"},"439":{"cmdline":"frigate.logger       ","cpu":"0.0","cpu_average":"0","mem":"0.2"},"441":{"cmdline":"frigate.recording_manager","cpu":"0.4","cpu_average":"0","mem":"0.2"},"450":{"cmdline":"/usr/bin/python3 -c from multiprocessing.resource_tracker import main;main(43)","cpu":"0.2","cpu_average":"0","mem":"0.0"},"451":{"cmdline":"frigate.detector.detector_name","cpu":"249.4","cpu_average":"275","mem":"0.2"},"453":{"cmdline":"frigate.output       ","cpu":"1.8","cpu_average":"1","mem":"0.2"},"456":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:","cpu":"7.4","cpu_average":"7","mem":"0.1"},"457":{"cmdline":"ffmpeg -f rawvideo -pix_fmt yuv420p -video_size 1280x720 -i pipe: -f mpegts -s 1280x720 -codec:v mpeg1video -q 1 -bf 0 pipe:","cpu":"0.0","cpu_average":"0","mem":"0.1"},"464":{"cmdline":"frigate.process:gates","cpu":"5.1","cpu_average":"5","mem":"0.2"},"466":{"cmdline":"frigate.capture:gates","cpu":"4.8","cpu_average":"4","mem":"0.2"},"469":{"cmdline":"frigate.audio_manager","cpu":"1.5","cpu_average":"0","mem":"0.2"},"471":{"cmdline":"ffmpeg -hide_banner -loglevel warning -threads 2 -hwaccel_flags allow_profile_mismatch -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -user_agent FFmpeg Frigate/0.13.0-01e2d20 -rtsp_transport tcp -timeout 5000000 -i rtsp://localhost:8554/gates_hq -f segment -segment_format mp4 -segment_time 15 -reset_timestamps 1 -strftime 1 -codec:v h264_vaapi -b:v 2M -maxrate 2M -c:v copy -c:a aac /tmp/cache/gates@%Y%m%d%H%M%S%z.mp4 -r 25 -vf fps=25,scale_vaapi=w=1280:h=720:format=nv12,hwdownload,format=nv12,format=yuv420p -threads 2 -f rawvideo -pix_fmt yuv420p pipe:","cpu":"5.9","cpu_average":"5","mem":"0.2"},"475":{"cmdline":"ffmpeg -vn -hide_banner -loglevel warning -threads 2 -user_agent FFmpeg Frigate/0.13.0-01e2d20 -rtsp_transport tcp -timeout 5000000 -i rtsp://localhost:8554/gates_hq -f s16le -ar 16000 -ac 1 -y pipe:","cpu":"0.2","cpu_average":"0","mem":"0.0"},"477":{"cmdline":"ffmpeg -hide_banner -v error -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_flags prefer_tcp -i rtsp://127.0.0.1:8554/gates_hq?audio -c:a aac -vn -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/cc7dc6d39add4a5a385e0d3b69a7bf83","cpu":"1.1","cpu_average":"0","mem":"0.0"},"912":{"cmdline":"sleep 30s","cpu":"0.0","cpu_average":"0","mem":"0.0"}},"detection_fps":16.8,"detectors":{"detector_name":{"detection_start":1706953838.683323,"inference_speed":35.45,"pid":451}},"gpu_usages":{"amd-vaapi":{"gpu":"0.83%","mem":"5.44%"}},"processes":{"audioDetector":{"pid":469},"go2rtc":{"pid":89},"logger":{"pid":439},"recording":{"pid":441}},"service":{"last_updated":1706953839,"latest_version":"0.13.1","storage":{"/dev/shm":{"free":4089.8,"mount_type":"tmpfs","total":4096.0,"used":6.2},"/media/frigate/clips":{"free":13884441.0,"mount_type":"nfs4","total":15603576.0,"used":1719119.0},"/media/frigate/recordings":{"free":13884441.0,"mount_type":"nfs4","total":15603576.0,"used":1719119.0},"/tmp/cache":{"free":1672646.5,"mount_type":"overlay","total":1912679.9,"used":142802.6}},"temperatures":{},"uptime":658,"version":"0.13.0-01e2d20"}}

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

EKF Connect IP65 Wi-Fi

Any other information that may be helpful

No response

NickM-27 commented 10 months ago

Birdseye is a combination of multiple streams, this is done by using the decoded stream and combining in to a single frame. It would only increase cpu usage to do that twice so that is why birdseye must be used with the detect stream.

as far as live view goes, you can select MSE or WebRTC to get the high quality live view

gelato commented 10 months ago

But live view is also used with detect stream... I'm already using MSE, but for detect stream I'm using camera's LQ feed (640x360) - it won't become better than this in any case. So this is a limitation, right? Whatever you feed to detect is also used for live/birdseye?

NickM-27 commented 10 months ago

No that is incorrect, live view (mse / WebRTC) have nothing to do with the detect view

gelato commented 10 months ago

Ok, but here are my observations: whenever I change resolution on detect module live's resolution also changes, and live's stream_name setting does not work - whenever I change it, having two streams, it always shows 640x360 picture (my LQ stream), and only when I switch detect role to my HQ stream the quality of live stream changes to 1920x1080 of my HQ stream.

NickM-27 commented 10 months ago

Then you are viewing the jsmpeg view and not mse or WebRTC

gelato commented 10 months ago

But I have: ui: live_mode: mse

Maybe there's another way to turn it on, or some other setting overrides it?

NickM-27 commented 10 months ago

you select it in the top right of the frigate camera page

gelato commented 10 months ago

Can you point me where exactly?

1
NickM-27 commented 10 months ago

press your camera and then it will be in the top right

gelato commented 10 months ago

Thanks, there was no such dropdown because I used experimental UI... Let me try defining different stream for it now

gelato commented 10 months ago

Yep, it works as you described, thank you so much! (experimental web is bound to jsmpeg it seems, it's a bit disappointing considering it feels much better than the standard one)