blakeblackshear / frigate

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

[Support]: ffmpeg crashes #6752

Closed Anonym-tsk closed 1 year ago

Anonym-tsk commented 1 year ago

Describe the problem you are having

Ffmpeg crashes sometimes with error exceeded fps limit and never restarts. Record not working after crash.

Version

0.12.0-DA3E197

Frigate config file

mqtt:
  enabled: true
  host: 192.168.0.11
  user: user
  password: pass

detectors:
  cpu:
    #type: cpu
    type: openvino
    device: CPU
    model:
      path: /openvino-model/ssdlite_mobilenet_v2.xml

model:
  width: 300
  height: 300
  input_tensor: nhwc
  input_pixel_format: bgr
  labelmap_path: /openvino-model/coco_91cl_bkgr.txt

detect:
  enabled: true
  fps: 5
  max_disappeared: 50
  stationary:
    interval: 0
    threshold: 50

objects:
  track:
    - person
    - car
    - cat
    - dog

record:
  enabled: true
  retain:
    days: 7
    mode: motion
  events:
    pre_capture: 5
    post_capture: 5
    retain:
      default: 14
      mode: active_objects

snapshots:
  enabled: true
  clean_copy: false
  bounding_box: false
  crop: false
  retain:
    default: 14

go2rtc:
  webrtc:
    candidates:
      - 192.168.0.11:8555
      - stun:8555
  streams:
    imou_cue_2:
      - rtsp://192.168.0.61:554/cam/realmonitor?channel=1&subtype=0
    imou_cue_2_low:
      - rtsp://192.168.0.61:554/cam/realmonitor?channel=1&subtype=1
    black_button:
      - rtsp://192.168.0.166:554/onvif1
    hallcam:
      - rtsp://192.168.0.161:8554/unicast

ui:
  live_mode: mse

telemetry:
  version_check: True

birdseye:
  enabled: false

cameras:
  imou_cue_2:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/imou_cue_2
          input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/imou_cue_2_low
          input_args: preset-rtsp-restream
          roles:
            - detect

    detect:
      width: 1920
      height: 1080

  hallcam:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/hallcam
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    detect:
      width: 1280
      height: 720

  black_button:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1:8554/black_button
          input_args: preset-rtsp-restream
          roles:
            - detect
            - record
    detect:
      width: 1280
      height: 720

Relevant log output

2023-06-09 05:03:42.410500079  [INFO] Starting Frigate...
2023-06-09 05:03:46.703212524  [2023-06-09 05:03:46] frigate.app                    INFO    : Starting Frigate (0.12.0-da3e197)
2023-06-09 05:03:46.718619898  [2023-06-09 05:03:46] frigate.config                 WARNING : Customizing more than a detector model path is unsupported.
2023-06-09 05:03:46.736391376  [2023-06-09 05:03:46] frigate.app                    INFO    : Creating directory: /tmp/cache
2023-06-09 05:03:46.739515015  [2023-06-09 05:03:46] peewee_migrate                 INFO    : Starting migrations
2023-06-09 05:03:46.745410881  [2023-06-09 05:03:46] peewee_migrate                 INFO    : There is nothing to migrate
2023-06-09 05:03:46.767888608  [2023-06-09 05:03:46] frigate.app                    INFO    : Output process started: 441
2023-06-09 05:03:46.774457778  [2023-06-09 05:03:46] frigate.app                    INFO    : Camera processor started for imou_cue_2: 443
2023-06-09 05:03:46.783950006  [2023-06-09 05:03:46] detector.cpu                   INFO    : Starting detection process: 440
2023-06-09 05:03:46.784592190  [2023-06-09 05:03:46] frigate.app                    INFO    : Camera processor started for hallcam: 444
2023-06-09 05:03:46.787530898  [2023-06-09 05:03:46] frigate.app                    INFO    : Camera processor started for black_button: 446
2023-06-09 05:03:46.794022798  [2023-06-09 05:03:46] frigate.app                    INFO    : Capture process started for imou_cue_2: 447
2023-06-09 05:03:46.801029620  [2023-06-09 05:03:46] frigate.app                    INFO    : Capture process started for hallcam: 448
2023-06-09 05:03:46.808928728  [2023-06-09 05:03:46] frigate.app                    INFO    : Capture process started for black_button: 449
2023-06-09 05:03:47.277865777  [2023-06-09 05:03:47] frigate.detectors.plugins.openvino INFO    : Model Input Shape: {1, 300, 300, 3}
2023-06-09 05:03:47.278018858  [2023-06-09 05:03:47] frigate.detectors.plugins.openvino INFO    : Model Output-0 Shape: {1, 1, 100, 7}
2023-06-09 05:03:47.278130228  [2023-06-09 05:03:47] frigate.detectors.plugins.openvino INFO    : Model has 1 Output Tensors
2023-06-09 05:09:36.969667021  [2023-06-09 05:09:36] watchdog.hallcam               INFO    : hallcam exceeded fps limit. Exiting ffmpeg...
2023-06-09 05:09:36.969994453  [2023-06-09 05:09:36] watchdog.hallcam               INFO    : Waiting for ffmpeg to exit gracefully...
2023-06-09 05:10:36.901020367  [2023-06-09 05:10:36] frigate.record                 WARNING : Failed to probe corrupt segment /tmp/cache/hallcam-20230609050927.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f4e5df16c0] moov atom not found\n/tmp/cache/hallcam-20230609050927.mp4: Invalid data found when processing input\n'
2023-06-09 05:10:36.901055867  [2023-06-09 05:10:36] frigate.record                 WARNING : Discarding a corrupt recording segment: /tmp/cache/hallcam-20230609050927.mp4

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"25/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":720,"width":1280}]}}]

Frigate stats

No response

Operating system

Other Linux

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wireless

Camera make and model

Dafang 1S

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

I'd suggest updating go2rtc https://docs.frigate.video/configuration/advanced#custom-go2rtc-version

Anonym-tsk commented 1 year ago

@NickM-27 go2rtc v1.5.0

NickM-27 commented 1 year ago

Yes that is the latest version

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.