blakeblackshear / frigate

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

[Support]: Audio event detected, but no clip available #7993

Closed Calimerorulez closed 1 year ago

Calimerorulez commented 1 year ago

Describe the problem you are having

I've configured audio detection on some of my camera's. A car just honked near my doorbell, and it was detected. But when I go to the event in Eveents, the clips isn't available, but the snapshot is.

2023-09-29 15:15:34.649738475  [2023-09-29 15:15:34] frigate.http                   ERROR   : No recordings found for the requested time range
2023-09-29 15:15:34.894262301  [2023-09-29 15:15:34] frigate.http                   ERROR   : Event does not have recordings: 1695993164.41568-v0xdp4

Version

0.13.0-0858859 (beta 2)

Frigate config file

detectors:
  coral_pci:
    type: edgetpu
    device: pci
mqtt:
  # Required: host name
  host: ---
  # Optional: port (default: shown below)
  port: 1883
  # Optional: topic prefix (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  topic_prefix: frigate
  # Optional: client id (default: shown below)
  # WARNING: must be unique if you are running multiple instances
  client_id: frigate
  # Optional: user
  user: frigate
  # Optional: password
  # NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
  #       eg. password: '{FRIGATE_MQTT_PASSWORD}'
  password: frigate
  # Optional: interval in seconds for publishing stats (default: shown below)
  stats_interval: 60

record:
  enabled: true
  retain:
    days: 0
    mode: motion
  events:
    pre_capture: 10
    post_capture: 10
    retain:
      default: 7
      mode: active_objects
#    max_seconds: 90

#ffmpeg:
#  input_args: preset-rtsp-restream
#  output_args:
#    record: preset-record-generic-audio-aac

# ffmpeg configuration
ffmpeg:
  global_args: -hide_banner -loglevel warning -threads 2

  hwaccel_args: preset-vaapi
  #hwaccel_args: preset-nvidia-h264

  input_args: preset-rtsp-restream
  output_args:
    detect: -threads 2 -f rawvideo -pix_fmt yuv420p
    record: preset-record-ubiquiti
    rtmp: preset-rtmp-ubiquiti

go2rtc:
  streams:
    g3b_voortuin:
      - rtspx://192.168.1.4:7441/hJ84WEkjmUXe6H66
    flex_ne:
      - rtspx://192.168.1.4:7441/eXz1bJYvAZNRyNOg
    flex_se:
      - rtspx://192.168.1.4:7441/8jU5tkUhuBVLqUNS
    g5b_achtertuin:
      - rtspx://192.168.1.4:7441/aqSo7WiK8WuY6XMW
    g4_deurbel:
      - rtspx://192.168.1.4:7441/8AwXQAd8rnKMYexm
    g5b_overkapping:
      - rtspx://192.168.1.4:7441/aPckb6DeNUXfYPVU
    g3i_garage:
      - rtspx://192.168.1.4:7441/Fz3j4v2biFVY3rKB

cameras:
  # Name of your camera
  g3b_voortuin:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1080
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g3b_voortuin
          roles:
            - detect
            - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 1920
      height: 1080
      fps: 5

  flex_ne:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1080
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/flex_ne
          roles:
            - detect
            - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      filters:
        car:
          mask:
          - 1318,389,1382,227,1113,202,976,347
          - 749,556,991,304,198,224,0,427
          - 0,640,691,824,833,553,0,393
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 1920
      height: 1080
      fps: 5

  flex_se:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1080
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/flex_se
          roles:
            - detect
            - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 1920
      height: 1080
      fps: 5

  g5b_achtertuin:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 2688
    audio:
      enabled: True
      listen:
        - children_playing
        - cat
        - bird
        - dog
        - dogs
        - footsteps
        - clapping
        - bark
        - scream
        - speech
        - yell
        - whispering
        - laughter
        - honk
        - fireworks
        - firecracker
        - music
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g5b_achtertuin
          roles:
            - detect
            - record
            - audio
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 2688
      height: 1512
      fps: 5

  g4_deurbel:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1600
    audio:
      enabled: True
      listen:
        - children_playing
        - cat
        - bird
        - dog
        - dogs
        - footsteps
        - clapping
        - bark
        - scream
        - speech
        - yell
        - whispering
        - laughter
        - honk
        - fireworks
        - firecracker
        - music
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g4_deurbel
          roles:
            - detect
            - record
            - audio
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - bird
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 1600
      height: 1200
      fps: 5

  g5b_overkapping:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 2688
    audio:
      enabled: True
      listen:
        - children_playing
        - cat
        - bird
        - dog
        - dogs
        - footsteps
        - clapping
        - bark
        - scream
        - speech
        - yell
        - whispering
        - laughter
        - honk
        - fireworks
        - firecracker
        - music
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g5b_overkapping
          roles:
            - detect
            - record
            - audio
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - bicycle
        - motorcycle
        - cat
        - dog
        - bird
        # Optional: save clips configuration
    detect:
      width: 2688
      height: 1512
      fps: 5

  g3i_garage:
    mqtt:
      timestamp: False
      bounding_box: False
      crop: True
      quality: 100
      height: 1080
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/g3i_garage
          roles:
            - detect
            - record
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: true
      retain:
        default: 7
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - cat
        - dog
        # Optional: save clips configuration
    detect:
      width: 1920
      height: 1080
      fps: 5

Relevant log output

2023-09-29 15:15:34.649738475  [2023-09-29 15:15:34] frigate.http                   ERROR   : No recordings found for the requested time range
2023-09-29 15:15:34.894262301  [2023-09-29 15:15:34] frigate.http                   ERROR   : Event does not have recordings: 1695993164.41568-v0xdp4

FFprobe output from your camera

For the g4_deurbel:

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"30/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","display_aspect_ratio":"4:3","height":1200,"width":1600},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]

Frigate stats

No response

Operating system

Proxmox

Install method

Docker Compose

Coral version

M.2

Network connection

Wired

Camera make and model

Unifi

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

this is covered in the audio docs, you must have motion based recording enabled for audio events to be kept

https://deploy-preview-6262--frigate-docs.netlify.app/configuration/audio_detectors#configuring-minimum-volume

Calimerorulez commented 1 year ago

I thought I had:

record:
  enabled: true
  retain:
    days: 0
    mode: motion
NickM-27 commented 1 year ago

yes but days == 0 which means that config is doing nothing

Calimerorulez commented 1 year ago

Oops... Shame on me. Thanks :)

Still trying to figure out for myself why I should enable recordings then.

NickM-27 commented 1 year ago

Not sure I understand what you mean. You could set the event based recordings to be motion and they would be kept.

Calimerorulez commented 1 year ago

I will experiment with the different settings, I'm having a hard time understanding the Recording section of the documentation. But I'm Dutch. That is the reason :)

Thank you for the help, I will close this issue.