blakeblackshear / frigate

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

[Config Support]: ffmpeg process is not running. #7848

Closed maxwood closed 1 year ago

maxwood commented 1 year ago

Describe the problem you are having

I'm getting a lot of errors when trying to use go2rtc to restream 2 of my camera feeds

I've left driveway_cam without using go2rtc for now but if I add it I get the same errors that I do for the other cameras.

Not sure if I'm missing something completely - any help is appreciated. Thank you.

Version

System 0.12.1-367d724

Frigate config file

mqtt: 
  host: 192.168.178.98
  user: user
  password: pass
ffmpeg:
  hwaccel_args: preset-intel-qsv-h264
detectors:
  coral:
    type: edgetpu
    device: usb

go2rtc:
  streams:
    driveway_cam:
      - rtsp://user:pass@192.168.254.6:554/Streaming/Channels/103/
    front_cam:
      - rtsp://user:pass@192.168.178.28/ch0_0.h264
    garage_cam:
      - rtsp://192.168.178.26/ch0_0.h264

cameras:
      front_cam: # <------ Name the camera
        ffmpeg:
          inputs:
            - path: rtsp://192.168.178.100:8554/front_cam # <----- Update for your camera
              input_args: preset-rtsp-restream
              roles:
                - detect
                - rtmp
                - record

        detect:
          width: 1920 # <---- update for your camera's resolution
          height: 1080 # <---- update for your camera's resolution
        snapshots:
            enabled: true
            retain:
              default: 14
        record:
          enabled: True
          retain:
            days: 0
          events:
            retain: 
              default: 14
              mode: active_objects       

      garage_cam: # <------ Name the camera
        ffmpeg:
          inputs:
            - path: rtsp://192.168.178.100:8554/garage_cam # <----- Update for your camera
              input_args: preset-rtsp-restream
              roles:
                - detect
                - rtmp
                - record

        detect:
          width: 1280 # <---- update for your camera's resolution
          height: 720 # <---- update for your camera's resolution
        snapshots:
            enabled: true
            retain:
              default: 30
        record:
          enabled: True
          retain:
            days: 0
          events:
            retain: 
              default: 30
              mode: motion

      driveway_cam: # <------ Name the camera
        ffmpeg:
          inputs:
            - path: rtsp://user:pass@192.168.254.6:554/Streaming/Channels/103/ # <----- Update for your camera
              roles:
                - detect
                - rtmp
                - record

        detect:
          width: 1080 # <---- update for your camera's resolution
          height: 1920 # <---- update for your camera's resolution
        snapshots:
            enabled: true
            retain:
              default: 30
        zones:
            approaching:
              coordinates: 421,938,336,936,313,847,286,751,256,618,202,626,60,662,36,744,83,932,105,1220,172,1237,249,1258,318,1261,423,1269,534,1307,623,1336,697,1352,1041,1389,1052,1206,1059,1062,1059,810,1055,712,1039,618,972,506,882,377,885,566,738,561,652,559
        record:
          enabled: True
          retain:
            days: 0
          events:
            retain: 
              default: 14
              mode: active_objects

Relevant log output

2023-09-17 10:49:15.873916052  [2023-09-17 10:49:15] watchdog.front_cam             ERROR   : Ffmpeg process crashed unexpectedly for front_cam.
2023-09-17 10:49:15.874486320  [2023-09-17 10:49:15] watchdog.front_cam             ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-09-17 10:49:15.874496919  [2023-09-17 10:49:15] watchdog.garage_cam            ERROR   : Ffmpeg process crashed unexpectedly for garage_cam.
2023-09-17 10:49:15.887544322  [2023-09-17 10:49:15] ffmpeg.front_cam.detect        ERROR   : [tcp @ 0x5624bb1b8f40] Connection to tcp://192.168.178.100:8554?timeout=5000000 failed: Connection refused
2023-09-17 10:49:15.888088525  [2023-09-17 10:49:15] watchdog.garage_cam            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-09-17 10:49:15.888357207  [2023-09-17 10:49:15] ffmpeg.front_cam.detect        ERROR   : rtsp://192.168.178.100:8554/front_cam: Connection refused
2023-09-17 10:49:15.888746519  [2023-09-17 10:49:15] ffmpeg.garage_cam.detect       ERROR   : [tcp @ 0x557adc101f40] Connection to tcp://192.168.178.100:8554?timeout=5000000 failed: Connection refused
2023-09-17 10:49:15.888757417  [2023-09-17 10:49:15] ffmpeg.garage_cam.detect       ERROR   : rtsp://192.168.178.100:8554/garage_cam: Connection refused
2023-09-17 10:49:15.927115289  [2023-09-17 10:49:15] frigate.video                  ERROR   : garage_cam: Unable to read frames from ffmpeg process.
2023-09-17 10:49:15.927172990  [2023-09-17 10:49:15] frigate.video                  ERROR   : garage_cam: ffmpeg process is not running. exiting capture thread...
2023-09-17 10:49:15.928461020  [2023-09-17 10:49:15] frigate.video                  ERROR   : front_cam: Unable to read frames from ffmpeg process.
2023-09-17 10:49:15.928518732  [2023-09-17 10:49:15] frigate.video                  ERROR   : front_cam: ffmpeg process is not running. exiting capture thread...

Frigate stats

No response

Operating system

Proxmox

Install method

Docker Compose

Coral version

USB

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

The docs say to use 127.0.0.1:8554 not the host ip address

maxwood commented 1 year ago

Wow, I can't believe it was that simple - thanks Nick!

I think this line

Frigate can restream your video feed as an RTSP feed for other applications such as Home Assistant to utilize it at rtsp://:8554/

makes it a bit confusing.

NickM-27 commented 1 year ago

I see, good to know. Feel free to create a new issue if something else comes up

rgehq commented 2 months ago

I run homeassistant via proxmox machine type q35 viommu=intel with coral dual TPU any idea how to fix it?

2024-08-29 11:34:21.160975630 [2024-08-29 13:34:21] frigate.storage INFO : Exiting storage maintainer... 2024-08-29 11:34:21.161175739 [2024-08-29 13:34:21] frigate.record.cleanup INFO : Exiting recording cleanup... 2024-08-29 11:34:21.161229764 [2024-08-29 13:34:21] frigate.stats.emitter INFO : Exiting stats emitter... 2024-08-29 11:34:21.161660536 [2024-08-29 13:34:21] frigate.ptz.autotrack INFO : Exiting autotracker... 2024-08-29 11:34:21.161661816 [2024-08-29 13:34:21] frigate.events.cleanup INFO : Exiting event cleanup... 2024-08-29 11:34:21.162064486 [2024-08-29 13:34:21] frigate.app INFO : Waiting for capture process for IPC-HDW5449TM-SE-LED-0280B to stop 2024-08-29 11:34:21.162375110 [2024-08-29 13:34:21] watchdog.IPC-HDW5449TM-SE-LED-0280B INFO : Terminating the existing ffmpeg process... 2024-08-29 11:34:21.162376428 [2024-08-29 13:34:21] watchdog.IPC-HDW5449TM-SE-LED-0280B INFO : Waiting for ffmpeg to exit gracefully... 2024-08-29 11:34:21.164743033 [2024-08-29 13:34:21] frigate.app INFO : Waiting for process for IPC-HDW5449TM-SE-LED-0280B to stop 2024-08-29 11:34:21.246469550 [2024-08-29 13:34:21] frigate.object_processing INFO : Exiting object processor... 2024-08-29 11:34:21.289816635 [2024-08-29 13:34:21] frigate.video INFO : IPC-HDW5449TM-SE-LED-0280B: emptying frame queue 2024-08-29 11:34:21.290212363 [2024-08-29 13:34:21] frigate.video INFO : IPC-HDW5449TM-SE-LED-0280B: exiting subprocess 2024-08-29 11:34:21.292418667 [2024-08-29 13:34:21] frigate.app INFO : Closing frame queue for IPC-HDW5449TM-SE-LED-0280B 2024-08-29 11:34:21.413008663 [2024-08-29 13:34:21] frigate.events.maintainer INFO : Exiting event processor... 2024-08-29 11:34:21.793314738 [2024-08-29 13:34:21] root INFO : Waiting for detection process to exit gracefully... 2024-08-29 11:34:21.793518991 [2024-08-29 13:34:21] detector.coral1_pci INFO : Signal to exit detection process... 2024-08-29 11:34:22.180205592 [2024-08-29 13:34:22] detector.coral1_pci INFO : Exited detection process... 2024-08-29 11:34:22.182723395 [2024-08-29 13:34:22] root INFO : Detection process has exited... 2024-08-29 11:34:22.182831366 [2024-08-29 13:34:22] detector.coral2 INFO : Signal to exit detection process... 2024-08-29 11:34:22.182941433 [2024-08-29 13:34:22] root INFO : Waiting for detection process to exit gracefully... 2024-08-29 11:34:22.206365637 [2024-08-29 13:34:22] detector.coral2 INFO : Exited detection process... 2024-08-29 11:34:22.208520640 [2024-08-29 13:34:22] root INFO : Detection process has exited... 2024-08-29 11:34:22.709389261 [2024-08-29 13:34:22] frigate.app INFO : Detection queue closed 2024-08-29 11:34:23.210111800 [2024-08-29 13:34:23] frigate.app INFO : Detected frames queue closed 2024-08-29 11:34:23.710956791 [2024-08-29 13:34:23] frigate.app INFO : Timeline queue closed 2024-08-29 11:34:24.293618447 [2024-08-29 13:34:24] frigate.output.output INFO : exiting output process... 2024-08-29 11:34:29.182739613 [2024-08-29 13:34:29] frigate.record.maintainer INFO : Exiting recording maintenance... 2024-08-29 11:34:29.367118737 [2024-08-29 13:34:29] frigate.review.maintainer INFO : Exiting review maintainer... 2024-08-29 11:34:29.760217363 [2024-08-29 13:34:29] frigate.comms.ws INFO : Exiting websocket client... 2024-08-29 11:34:30.184055650 [2024-08-29 13:34:30] peewee.sqliteq INFO : writer received shutdown request, exiting. s6-rc: info: service s6rc-fdholder: starting s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service s6rc-fdholder successfully started s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service log-prepare: starting s6-rc: info: service log-prepare successfully started s6-rc: info: service nginx-log: starting s6-rc: info: service go2rtc-log: starting s6-rc: info: service frigate-log: starting s6-rc: info: service certsync-log: starting s6-rc: info: service nginx-log successfully started s6-rc: info: service go2rtc-log successfully started s6-rc: info: service go2rtc: starting s6-rc: info: service certsync-log successfully started s6-rc: info: service frigate-log successfully started s6-rc: info: service go2rtc successfully started s6-rc: info: service go2rtc-healthcheck: starting s6-rc: info: service frigate: starting s6-rc: info: service frigate successfully started s6-rc: info: service nginx: starting s6-rc: info: service go2rtc-healthcheck successfully started 2024-08-29 11:34:31.548584565 [INFO] Starting NGINX... 2024-08-29 11:34:31.548943679 [INFO] Preparing Frigate... 2024-08-29 11:34:31.549084418 [INFO] Preparing new go2rtc config... 2024-08-29 11:34:31.553310443 [INFO] No TLS certificate found. Generating a self signed certificate... 2024-08-29 11:34:31.556766418 [INFO] Starting Frigate... 2024-08-29 11:34:31.571756033 [INFO] Got IP address from supervisor: 192.168.1.15 2024-08-29 11:34:31.594315731 [INFO] Got WebRTC port from supervisor: 8555 2024-08-29 11:34:31.781304325 [INFO] Starting go2rtc... 2024-08-29 11:34:31.880987697 13:34:31.880 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2 2024-08-29 11:34:31.881002175 13:34:31.880 INF config path=/dev/shm/go2rtc.yaml 2024-08-29 11:34:31.881410663 13:34:31.881 INF [rtsp] listen addr=:8554 2024-08-29 11:34:31.881411950 13:34:31.881 INF [api] listen addr=:1984 2024-08-29 11:34:31.881413475 13:34:31.881 INF [webrtc] listen addr=:8555/tcp s6-rc: info: service nginx successfully started s6-rc: info: service certsync: starting 2024-08-29 11:34:32.338519245 [INFO] Starting certsync... s6-rc: info: service certsync successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started 2024-08-29 11:34:32.375454006 127.0.0.1 - - [29/Aug/2024:13:34:32 +0200] "" 400 0 "-" "-" "-" 2024-08-29 11:34:32.454725066 [2024-08-29 13:34:32] frigate.app INFO : Starting Frigate (0.14.0-da913d8) 2024-08-29 11:34:32.454935603 [2024-08-29 13:34:32] frigate.app INFO : Creating directory: /tmp/cache 2024-08-29 11:34:32.454937026 [2024-08-29 13:34:32] frigate.util.config INFO : Checking if frigate config needs migration... 2024-08-29 11:34:32.463119204 [2024-08-29 13:34:32] frigate.util.config INFO : frigate config does not need migration... 2024-08-29 11:34:32.468609634 [2024-08-29 13:34:32] frigate.config WARNING : IPC-HDW5449TM-SE-LED-0280B detect fps is set to 25. This does NOT need to match your camera's frame rate. High values could lead to reduced performance. Recommended value is 5. 2024-08-29 11:34:32.493668349 [2024-08-29 13:34:32] peewee_migrate.logs INFO : Starting migrations 2024-08-29 11:34:32.493727718 [2024-08-29 13:34:32] peewee_migrate.logs INFO : There is nothing to migrate 2024-08-29 11:34:32.496842531 [2024-08-29 13:34:32] frigate.app INFO : Recording process started: 350 2024-08-29 11:34:32.502628393 [2024-08-29 13:34:32] frigate.app INFO : Recording process started: 351 2024-08-29 11:34:32.502630643 [2024-08-29 13:34:32] frigate.app INFO : go2rtc process pid: 98 2024-08-29 11:34:32.508065259 [2024-08-29 13:34:32] frigate.comms.mqtt ERROR : Unable to connect to MQTT server: MQTT Not authorized 2024-08-29 11:34:32.517022719 [2024-08-29 13:34:32] detector.coral1_pci INFO : Starting detection process: 379 2024-08-29 11:34:32.522926138 [2024-08-29 13:34:32] detector.coral2 INFO : Starting detection process: 381 2024-08-29 11:34:32.523335214 [2024-08-29 13:34:32] frigate.app INFO : Output process started: 383 2024-08-29 11:34:32.554094077 [2024-08-29 13:34:32] frigate.video ERROR : IPC-HDW5449TM-SE-LED-0280B: Unable to read frames from ffmpeg process. 2024-08-29 11:34:32.554327633 [2024-08-29 13:34:32] frigate.video ERROR : IPC-HDW5449TM-SE-LED-0280B: ffmpeg process is not running. exiting capture thread... 2024-08-29 11:34:32.561677870 [2024-08-29 13:34:32] frigate.app INFO : Camera processor started for IPC-HDW5449TM-SE-LED-0280B: 408 2024-08-29 11:34:32.561837942 [2024-08-29 13:34:32] frigate.app INFO : Capture process started for IPC-HDW5449TM-SE-LED-0280B: 412 2024-08-29 11:34:32.566549091 [2024-08-29 13:34:32] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:0 2024-08-29 11:34:32.567263323 [2024-08-29 13:34:32] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as pci:1 2024-08-29 11:34:32.572497765 [2024-08-29 13:34:32] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2024-08-29 11:34:32.572605402 [2024-08-29 13:34:32] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2024-08-29 11:34:33.514457688 [2024-08-29 13:34:33] frigate.comms.mqtt ERROR : Unable to connect to MQTT server: MQTT Not authorized 2024-08-29 11:34:35.516924635 [2024-08-29 13:34:35] frigate.comms.mqtt ERROR : Unable to connect to MQTT server: MQTT Not authorized 2024-08-29 11:34:39.519115358 [2024-08-29 13:34:39] frigate.comms.mqtt ERROR : Unable to connect to MQTT server: MQTT Not authorized 2024-08-29 11:34:41.549126215 [INFO] Starting go2rtc healthcheck service...

MQTT server

mqtt: user: xxxx password: xxxx port: 1883 topic_prefix: frigate client_id: frigate

One single PCIe edge TPU

detectors: coral1: type: edgetpu device: pci:0 coral2: type: edgetpu device: pci:1

Use hardware acceleration with h264 and intel quicksync vieo

ffmpeg: hwaccel_args:

Recording options

record: enabled: True

Keep all recordings for 2 days

retain: days: 2 mode: all

Keep event recordings for 10 days

events: pre_capture: 5 post_capture: 5 retain: default: 2 mode: motion objects: person: 15

Cat is special

    cat: 15

Camera configuration

cameras:

Back door camera

back_door: ffmpeg: inputs: