blakeblackshear / frigate

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

[Camera Support]: SONOFF Smart Camera GK-200MP2-B #5152

Closed bughattiveyron closed 1 year ago

bughattiveyron commented 1 year ago

Describe the problem you are having

Can not find a working config for output_args: to collect audio from the Sonoff GK-200MP2-B IP Camera

Camera collects video fine and records and creates clips, but no audio is being pulled. Audio works fine in the ewelink app.

Version

0.10.1-83481AF

Frigate config file

{
  "birdseye": {
    "enabled": true,
    "height": 720,
    "mode": "objects",
    "quality": 8,
    "width": 1280
  },
  "cameras": {
    "Back_Alley": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 720,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 1280
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-stimeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac",
          "rtmp": [
            "-c",
            "copy",
            "-f",
            "flv"
          ]
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://rtsp:V!ct0r123@10.66.66.216:554/av_stream/ch0 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac /tmp/cache/Back_Alley-%Y%m%d%H%M%S.mp4 -c copy -f flv rtmp://127.0.0.1/live/Back_Alley -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Back_Alley",
      "objects": {
        "filters": {
          "bicycle": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "car": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "motorcycle": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "truck": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "car",
          "truck",
          "bicycle",
          "motorcycle",
          "dog",
          "cat"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 300,
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    },
    "Front_Garage": {
      "best_image_timeout": 60,
      "detect": {
        "enabled": true,
        "fps": 5,
        "height": 720,
        "max_disappeared": 25,
        "stationary": {
          "interval": 0,
          "max_frames": {
            "default": null,
            "objects": {}
          },
          "threshold": 50
        },
        "width": 1280
      },
      "ffmpeg": {
        "global_args": [
          "-hide_banner",
          "-loglevel",
          "warning"
        ],
        "hwaccel_args": [],
        "input_args": [
          "-avoid_negative_ts",
          "make_zero",
          "-fflags",
          "+genpts+discardcorrupt",
          "-rtsp_transport",
          "tcp",
          "-stimeout",
          "5000000",
          "-use_wallclock_as_timestamps",
          "1"
        ],
        "inputs": [
          {
            "global_args": [],
            "hwaccel_args": [],
            "input_args": [],
            "path": "rtsp://liquid:secure@10.xx.xx.112:554/s0",
            "roles": [
              "record",
              "rtmp",
              "detect"
            ]
          }
        ],
        "output_args": {
          "detect": [
            "-f",
            "rawvideo",
            "-pix_fmt",
            "yuv420p"
          ],
          "record": "-f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac",
          "rtmp": "-c:v copy -f flv -ar 44100 -c:a aac"
        }
      },
      "ffmpeg_cmds": [
        {
          "cmd": "ffmpeg -hide_banner -loglevel warning -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1 -i rtsp://liquid:secure@10.xx.xx.112:554/s0 -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac /tmp/cache/Front_Garage-%Y%m%d%H%M%S.mp4 -c:v copy -f flv -ar 44100 -c:a aac rtmp://127.0.0.1/live/Front_Garage -r 5 -s 1280x720 -f rawvideo -pix_fmt yuv420p pipe:",
          "roles": [
            "record",
            "rtmp",
            "detect"
          ]
        }
      ],
      "live": {
        "height": 720,
        "quality": 8
      },
      "motion": {
        "contour_area": 30,
        "delta_alpha": 0.2,
        "frame_alpha": 0.2,
        "frame_height": 50,
        "improve_contrast": false,
        "mask": "",
        "threshold": 25
      },
      "mqtt": {
        "bounding_box": true,
        "crop": true,
        "enabled": true,
        "height": 270,
        "quality": 70,
        "required_zones": [],
        "timestamp": true
      },
      "name": "Front_Garage",
      "objects": {
        "filters": {
          "bicycle": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "car": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "cat": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "dog": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "motorcycle": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "person": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          },
          "truck": {
            "mask": null,
            "max_area": 24000000,
            "min_area": 0,
            "min_score": 0.5,
            "threshold": 0.7
          }
        },
        "mask": "",
        "track": [
          "person",
          "car",
          "truck",
          "bicycle",
          "motorcycle",
          "dog",
          "cat"
        ]
      },
      "record": {
        "enabled": true,
        "events": {
          "max_seconds": 300,
          "objects": null,
          "post_capture": 5,
          "pre_capture": 5,
          "required_zones": [],
          "retain": {
            "default": 10,
            "mode": "motion",
            "objects": {}
          }
        },
        "expire_interval": 60,
        "retain": {
          "days": 0,
          "mode": "all"
        },
        "retain_days": null
      },
      "rtmp": {
        "enabled": true
      },
      "snapshots": {
        "bounding_box": true,
        "clean_copy": true,
        "crop": false,
        "enabled": true,
        "height": null,
        "quality": 70,
        "required_zones": [],
        "retain": {
          "default": 10,
          "mode": "motion",
          "objects": {}
        },
        "timestamp": false
      },
      "timestamp_style": {
        "color": {
          "blue": 255,
          "green": 255,
          "red": 255
        },
        "effect": null,
        "format": "%m/%d/%Y %H:%M:%S",
        "position": "tl",
        "thickness": 2
      },
      "zones": {}
    }
  },
  "database": {
    "path": "/media/frigate/frigate.db"
  },
  "detect": {
    "enabled": true,
    "fps": 5,
    "height": 720,
    "max_disappeared": null,
    "stationary": {
      "interval": 0,
      "max_frames": {
        "default": null,
        "objects": {}
      },
      "threshold": null
    },
    "width": 1280
  },
  "detectors": {
    "cpu": {
      "device": "usb",
      "num_threads": 3,
      "type": "cpu"
    }
  },
  "environment_vars": {},
  "ffmpeg": {
    "global_args": [
      "-hide_banner",
      "-loglevel",
      "warning"
    ],
    "hwaccel_args": [],
    "input_args": [
      "-avoid_negative_ts",
      "make_zero",
      "-fflags",
      "+genpts+discardcorrupt",
      "-rtsp_transport",
      "tcp",
      "-stimeout",
      "5000000",
      "-use_wallclock_as_timestamps",
      "1"
    ],
    "output_args": {
      "detect": [
        "-f",
        "rawvideo",
        "-pix_fmt",
        "yuv420p"
      ],
      "record": [
        "-f",
        "segment",
        "-segment_time",
        "10",
        "-segment_format",
        "mp4",
        "-reset_timestamps",
        "1",
        "-strftime",
        "1",
        "-c",
        "copy",
        "-an"
      ],
      "rtmp": [
        "-c",
        "copy",
        "-f",
        "flv"
      ]
    }
  },
  "live": {
    "height": 720,
    "quality": 8
  },
  "logger": {
    "default": "info",
    "logs": {}
  },
  "model": {
    "height": 320,
    "labelmap": {},
    "labelmap_path": null,
    "path": null,
    "width": 320
  },
  "motion": null,
  "mqtt": {
    "client_id": "frigate",
    "host": "10.66.66.240",
    "password": "secure",
    "port": 1883,
    "stats_interval": 60,
    "tls_ca_certs": null,
    "tls_client_cert": null,
    "tls_client_key": null,
    "tls_insecure": null,
    "topic_prefix": "frigate",
    "user": "liquidmosq"
  },
  "objects": {
    "filters": null,
    "mask": "",
    "track": [
      "person"
    ]
  },
  "record": {
    "enabled": false,
    "events": {
      "max_seconds": 300,
      "objects": null,
      "post_capture": 5,
      "pre_capture": 5,
      "required_zones": [],
      "retain": {
        "default": 10,
        "mode": "motion",
        "objects": {}
      }
    },
    "expire_interval": 60,
    "retain": {
      "days": 0,
      "mode": "all"
    },
    "retain_days": null
  },
  "rtmp": {
    "enabled": true
  },
  "snapshots": {
    "bounding_box": true,
    "clean_copy": true,
    "crop": false,
    "enabled": false,
    "height": null,
    "quality": 70,
    "required_zones": [],
    "retain": {
      "default": 10,
      "mode": "motion",
      "objects": {}
    },
    "timestamp": false
  },
  "timestamp_style": {
    "color": {
      "blue": 255,
      "green": 255,
      "red": 255
    },
    "effect": null,
    "format": "%m/%d/%Y %H:%M:%S",
    "position": "tl",
    "thickness": 2
  }
}

Relevant log output

*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-01-18 13:51:25] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
*************************************************************
*************************************************************
***    Your config file is not valid!                     ***
***    Please check the docs at                           ***
***    https://docs.frigate.video/configuration/index     ***
*************************************************************
*************************************************************
***    Config Validation Errors                           ***
*************************************************************
1 validation error for FrigateConfig
cameras -> Back_Alley -> ffmpeg -> output_args
  none is not an allowed value (type=type_error.none.not_allowed)
Traceback (most recent call last):
  File "/opt/frigate/frigate/app.py", line 312, in start
    self.init_config()
  File "/opt/frigate/frigate/app.py", line 77, in init_config
    user_config = FrigateConfig.parse_file(config_file)
  File "/opt/frigate/frigate/config.py", line 904, in parse_file
    return cls.parse_obj(config)
  File "pydantic/main.py", line 511, in pydantic.main.BaseModel.parse_obj
  File "pydantic/main.py", line 331, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for FrigateConfig
cameras -> Back_Alley -> ffmpeg -> output_args
  none is not an allowed value (type=type_error.none.not_allowed)
*************************************************************
***    End Config Validation Errors                       ***
*************************************************************
[cmd] python3 exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-01-18 13:51:32] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
Starting migrations
[2023-01-18 13:51:32] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2023-01-18 13:51:32] peewee_migrate                 INFO    : There is nothing to migrate
[2023-01-18 13:51:32] detector.cpu                   INFO    : Starting detection process: 217
[2023-01-18 13:51:32] frigate.app                    INFO    : Output process started: 219
[2023-01-18 13:51:32] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-01-18 13:51:32] ws4py                          INFO    : Using epoll
[2023-01-18 13:51:32] frigate.app                    INFO    : Camera processor started for Front_Garage: 223
[2023-01-18 13:51:32] frigate.app                    INFO    : Camera processor started for Back_Alley: 225
[2023-01-18 13:51:32] frigate.app                    INFO    : Capture process started for Front_Garage: 227
[2023-01-18 13:51:32] frigate.app                    INFO    : Capture process started for Back_Alley: 229
[2023-01-18 13:51:32] ws4py                          INFO    : Using epoll
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-01-18 13:51:38] frigate.app                    INFO    : Starting Frigate (0.10.1-83481af)
Starting migrations
[2023-01-18 13:51:38] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2023-01-18 13:51:38] peewee_migrate                 INFO    : There is nothing to migrate
[2023-01-18 13:51:38] detector.cpu                   INFO    : Starting detection process: 217
[2023-01-18 13:51:38] frigate.app                    INFO    : Output process started: 219
[2023-01-18 13:51:38] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-01-18 13:51:38] ws4py                          INFO    : Using epoll
[2023-01-18 13:51:38] frigate.app                    INFO    : Camera processor started for Front_Garage: 223
[2023-01-18 13:51:38] frigate.app                    INFO    : Camera processor started for Back_Alley: 225
[2023-01-18 13:51:38] frigate.app                    INFO    : Capture process started for Front_Garage: 226
[2023-01-18 13:51:38] frigate.app                    INFO    : Capture process started for Back_Alley: 230
[2023-01-18 13:51:38] ws4py                          INFO    : Using epoll
[2023-01-18 13:51:40] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:36114]

FFprobe output from your camera

n/a

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

SONOFF Smart Camera GK-200MP2-B

Any other information that may be helpful

No response

NickM-27 commented 1 year ago

Your config is invalid so it's not clear. Also an ffprobe output for the camera would be helpful. Also you're on an outdated version of frigate.

bughattiveyron commented 1 year ago

Ok, updated frigate to :stable. I do not see errors in the config file either.

mqtt:
  # Required: host name
  host: 10.xx.xx.240
  # 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
  user: liquidmosq
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: secure

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # 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: 8
  # 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: objects

# Required
cameras:
  # Required: name of the camera
  Front_Garage:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac
        rtmp: -c:v copy -f flv -ar 44100 -c:a aac
      # 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, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://liquid:secure@10.xx.xx.112:554/s0
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
    snapshots:
      enabled: True
    record:
      enabled: True
  Back_Alley:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:a aac
      # 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, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
    snapshots:
      enabled: True
    record:
      enabled: True

ffprobe

ffprobe version n5.1-2-g915ef932a3-20220731 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-mbedtls --enable-librist --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags=-pie --extra-libs='-ldl -lgomp' --extra-version=20220731
  libavutil      57. 28.100 / 57. 28.100
  libavcodec     59. 37.100 / 59. 37.100
  libavformat    59. 27.100 / 59. 27.100
  libavdevice    59.  7.100 / 59.  7.100
  libavfilter     8. 44.100 /  8. 44.100
  libswscale      6.  7.100 /  6.  7.100
  libswresample   4.  7.100 /  4.  7.100
  libpostproc    56.  6.100 / 56.  6.100
Input #0, rtsp, from 'rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0':
  Metadata:
    title           : Session
  Duration: N/A, start: 29232.239911, bitrate: N/A
  Stream #0:0: Video: h264 (Main), yuv420p(progressive), 1920x1080, 10 fps, 10 tbr, 90k tbn
  Stream #0:1: Audio: pcm_alaw, 8000 Hz, mono, s16, 64 kb/s
NickM-27 commented 1 year ago

there should be logs, what do you see in the logs?

bughattiveyron commented 1 year ago

I am running frigate in a docker container on debian 11, I use portainer to access shell. Where do the ffmpeg logs reside for me to see them?

[2023-01-19 10:52:44] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:52:48] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:52:48] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:52:48] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x555ee64d2340] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:52:48] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:52:48] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:52:48] ffmpeg.Back_Alley.detect       ERROR   : 
[2023-01-19 10:52:54] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 10:52:54] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:52:58] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:52:58] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:52:58] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x5586ae7d1100] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:52:58] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:52:58] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:52:58] ffmpeg.Back_Alley.detect       ERROR   : 
[2023-01-19 10:53:04] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 10:53:04] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:53:08] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:53:08] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:53:08] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x563591945d40] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:53:08] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:53:08] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:53:08] ffmpeg.Back_Alley.detect       ERROR   : 
[2023-01-19 10:53:14] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 10:53:14] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:53:18] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:53:18] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:53:18] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x564a123b4640] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:53:18] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:53:18] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:53:18] ffmpeg.Back_Alley.detect       ERROR   : 
[2023-01-19 10:53:24] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 10:53:24] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:53:28] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:53:28] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:53:28] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x55b5f596f8c0] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:53:28] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:53:28] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:53:28] ffmpeg.Back_Alley.detect       ERROR   : 
[2023-01-19 10:53:34] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 10:53:34] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 10:53:38] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 10:53:38] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 10:53:38] ffmpeg.Back_Alley.detect       ERROR   : [hevc_mp4toannexb @ 0x55b98dfa4180] Codec 'h264' (27) is not supported by the bitstream filter 'hevc_mp4toannexb'. Supported codecs are: hevc (173) 
[2023-01-19 10:53:38] ffmpeg.Back_Alley.detect       ERROR   : Error initializing bitstream filter: hevc_mp4toannexb
[2023-01-19 10:53:38] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:0 -- 
[2023-01-19 10:53:38] ffmpeg.Back_Alley.detect       ERROR   : 
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[2023-01-19 10:53:43] frigate.video                  ERROR   : Front_Garage: Unable to read frames from ffmpeg process.
[2023-01-19 10:53:43] frigate.video                  ERROR   : Front_Garage: ffmpeg process is not running. exiting capture thread...
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[2023-01-19 10:53:48] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
Starting migrations
[2023-01-19 10:53:48] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2023-01-19 10:53:48] peewee_migrate                 INFO    : There is nothing to migrate
[2023-01-19 10:53:48] detector.cpu                   INFO    : Starting detection process: 216
[2023-01-19 10:53:48] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-01-19 10:53:48] frigate.app                    INFO    : Output process started: 218
[2023-01-19 10:53:48] ws4py                          INFO    : Using epoll
[2023-01-19 10:53:48] frigate.app                    INFO    : Camera processor started for Front_Garage: 222
[2023-01-19 10:53:48] frigate.app                    INFO    : Camera processor started for Back_Alley: 224
[2023-01-19 10:53:48] frigate.app                    INFO    : Capture process started for Front_Garage: 225
[2023-01-19 10:53:48] frigate.app                    INFO    : Capture process started for Back_Alley: 229
[2023-01-19 10:53:49] ws4py                          INFO    : Using epoll
[2023-01-19 10:54:22] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32954]
[2023-01-19 10:55:07] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50168]
[2023-01-19 10:55:09] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50168]
[2023-01-19 10:55:10] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50180]
[2023-01-19 10:55:13] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50180]
[2023-01-19 10:55:20] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32954]
[2023-01-19 10:55:20] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:36754]
[2023-01-19 10:56:59] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:36754]
[2023-01-19 10:57:23] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59108]
[2023-01-19 10:57:24] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59108]
[2023-01-19 10:57:24] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59120]
[2023-01-19 10:59:56] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59120]
[2023-01-19 10:59:56] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:54250]
[2023-01-19 11:06:54] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:54250]
[2023-01-19 11:06:54] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59548]
[2023-01-19 11:07:17] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59548]
[2023-01-19 11:07:17] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59556]
[2023-01-19 11:07:18] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59556]
[2023-01-19 11:07:18] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59558]
[2023-01-19 11:07:33] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
[2023-01-19 11:07:33] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
[2023-01-19 11:07:38] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
[2023-01-19 11:07:38] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-01-19 11:07:38] ffmpeg.Back_Alley.detect       ERROR   : Too many packets buffered for output stream 0:0.
NickM-27 commented 1 year ago

what device are you running frigate on?

bughattiveyron commented 1 year ago
root@LiquidDocker:~# lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri [Radeon R7 Graphics]
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kaveri HDMI/DP Audio Controller
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Kaveri P2P Bridge for GFX PCIe Port [1:0]
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Root Port
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09)
00:10.1 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 09)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 40)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)
00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 16)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40)
00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 0)
00:15.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 2)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 15h (Models 30h-3fh) Processor Function 5
01:00.0 VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1080] (rev a1)
01:00.1 Audio device: NVIDIA Corporation GP104 High Definition Audio Controller (rev a1)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
NickM-27 commented 1 year ago

your output args for Back_Alley are incorrect, they need to be record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac

bughattiveyron commented 1 year ago

Just updated it, but im pretty sure I have used those args and it still didnt work. The camera actually fails completely to capture anything. So far the only config that works for that camera is no output_args at all, but with that I get no audio

Back_Alley:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
      # 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, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://rtsp:Vict0r123@10.66.66.216:554/av_stream/ch0
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
    snapshots:
      enabled: True
    record:
      enabled: True
NickM-27 commented 1 year ago

Well it makes sense it was capturing nothing because the output args were incorrect. If you follow the args in the docs they work without issue.

If this causes a problem then paste the new logs.

bughattiveyron commented 1 year ago

No logs in shell for the container, but in frigate when i click on a clip for that camera, its black screen with this error

The media could not be loaded, either because the server or network failed or because the format is not supported.

bughattiveyron commented 1 year ago

[2023-01-19 12:10:03] frigate.http ERROR : No recordings found for the requested time range [2023-01-19 12:10:07] frigate.http ERROR : Event does not have recordings: 1674155032.547555-pshr8b [2023-01-19 12:10:16] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. [2023-01-19 12:10:16] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... [2023-01-19 12:10:18] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. [2023-01-19 12:10:18] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2023-01-19 12:10:18] ffmpeg.Back_Alley.detect ERROR : Too many packets buffered for output stream 0:0. [2023-01-19 12:11:49] frigate.http ERROR : No recordings found for the requested time range

NickM-27 commented 1 year ago

Please paste your docker compose file

bughattiveyron commented 1 year ago

docker run -d --name frigate --restart=unless-stopped --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 --device /dev/bus/usb:/dev/bus/usb --shm-size=64m -v /var/lib/docker/volumes/frigate_files/_data:/media/frigate -v /var/lib/docker/volumes/frigate_config/_data/config.yml:/config/config.yml:ro -v /etc/localtime:/etc/localtime:ro -e FRIGATE_RTSP_PASSWORD='secure' -p 5000:5000 -p 1935:1935 blakeblackshear/frigate:stable

NickM-27 commented 1 year ago

you need to pass the timezone as well -v /etc/localtime:/etc/localtime:ro

bughattiveyron commented 1 year ago

what do you mean "pass the timezone"

NickM-27 commented 1 year ago

frigate needs access to the localtime for 0.11 recordings to work correctly, this is fixed in 0.12. For now adding -v /etc/localtime:/etc/localtime:ro will fix this

bughattiveyron commented 1 year ago

its already in there

docker run -d --name frigate --restart=unless-stopped --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 --device /dev/bus/usb:/dev/bus/usb --shm-size=64m -v /var/lib/docker/volumes/frigate_files/_data:/media/frigate -v /var/lib/docker/volumes/frigate_config/_data/config.yml:/config/config.yml:ro **_-v /etc/localtime:/etc/localtime:ro_** -e FRIGATE_RTSP_PASSWORD='secure' -p 5000:5000 -p 1935:1935 blakeblackshear/frigate:stable

NickM-27 commented 1 year ago

oh, my bad. In that case it's most likely an issue that is fixed in 0.12 (currently in beta)

bughattiveyron commented 1 year ago

is there a beta version I can pull down and see?

NickM-27 commented 1 year ago

https://github.com/blakeblackshear/frigate/releases/tag/v0.12.0-beta5

do keep in mind there is a migration process and the DB is not backwards compatible, recommend reading the release notes thoroughly

bughattiveyron commented 1 year ago

for docker run would it be

blakeblackshear/frigate:v0.12.0-beta5

NickM-27 commented 1 year ago

It would be ghcr.io/blakeblackshear/frigate:0.12.0-beta5

bughattiveyron commented 1 year ago

Same issue in version 12, capture happens, snapshot shows fine but "clip" recording is black screen with error

The media could not be loaded, either because the server or network failed or because the format is not supported.

config

  # Required: host name
  host: 10.xx.xx.240
  # 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
  user: liquidmosq
  # Optional: password
  # NOTE: MQTT password can be specified with an environment variables that must begin with 'FRIGATE_'.
  #       e.g. password: '{FRIGATE_MQTT_PASSWORD}'
  password: secure

birdseye:
  # Optional: Enable birdseye view (default: shown below)
  enabled: True
  # Optional: Width of the output resolution (default: shown below)
  width: 1280
  # Optional: Height of the output resolution (default: shown below)
  height: 720
  # 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: 8
  # 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: objects

# Required
cameras:
  # Required: name of the camera
  Front_Garage:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac
        rtmp: -c:v copy -f flv -ar 44100 -c:a aac
      # 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, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://liquid:secure@10.xx.xx.112:554/s0
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
    snapshots:
      enabled: True
    record:
      enabled: True
  Back_Alley:
    # Required: ffmpeg settings for the camera
    ffmpeg:
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac
        rtmp: -c:v copy -f flv -c:a aac
      # 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, which must begin with 'FRIGATE_' and be referenced in {}
        - path: rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0
          # Required: list of roles for this stream. valid values are: detect,record,rtmp
          # NOTICE: In addition to assigning the record, and rtmp roles,
          # they must also be enabled in the camera config.
          roles:
            - detect
            - rtmp
    objects:
      track:
        - person
        - car
        - truck
        - bicycle
        - motorcycle
        - dog
        - cat
    snapshots:
      enabled: True
    record:
      enabled: True`

Logs

`2023-01-19 13:07:24.580692028  [2023-01-19 13:07:24] frigate.app                    INFO    : Starting Frigate (0.12.0-12d51d3)
2023-01-19 13:07:24.613219216  [2023-01-19 13:07:24] peewee_migrate                 INFO    : Starting migrations
2023-01-19 13:07:24.632595067  [2023-01-19 13:07:24] peewee_migrate                 INFO    : There is nothing to migrate
2023-01-19 13:07:24.639037683  [2023-01-19 13:07:24] ws4py                          INFO    : Using epoll
2023-01-19 13:07:24.663401424  [2023-01-19 13:07:24] detector.cpu                   INFO    : Starting detection process: 277
2023-01-19 13:07:24.668284480  [2023-01-19 13:07:24] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-01-19 13:07:24.669942255  [2023-01-19 13:07:24] ws4py                          INFO    : Using epoll
2023-01-19 13:07:24.671301355  [2023-01-19 13:07:24] frigate.app                    INFO    : Output process started: 279
2023-01-19 13:07:24.681025853  [2023-01-19 13:07:24] frigate.app                    INFO    : Camera processor started for Front_Garage: 284
2023-01-19 13:07:24.688151376  [2023-01-19 13:07:24] frigate.app                    INFO    : Camera processor started for Back_Alley: 285
2023-01-19 13:07:24.695426898  [2023-01-19 13:07:24] frigate.app                    INFO    : Capture process started for Front_Garage: 287
2023-01-19 13:07:24.703252756  [2023-01-19 13:07:24] frigate.app                    INFO    : Capture process started for Back_Alley: 288
2023-01-19 13:07:27.119194644  [2023-01-19 13:07:27] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32802]
2023-01-19 13:07:28.100646472  [2023-01-19 13:07:28] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32802]
2023-01-19 13:07:28.310238514  [2023-01-19 13:07:28] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32810]
2023-01-19 13:08:05.876446185  [2023-01-19 13:08:05] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55968]
2023-01-19 13:09:25.976853076  [2023-01-19 13:09:25] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:32810]
2023-01-19 13:09:26.166471393  [2023-01-19 13:09:26] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49404]
2023-01-19 13:09:38.427282953  [2023-01-19 13:09:38] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55968]
2023-01-19 13:10:30.653901746  [2023-01-19 13:10:30] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49404]
2023-01-19 13:10:30.866599946  [2023-01-19 13:10:30] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:60224]
2023-01-19 13:11:20.008263414  [2023-01-19 13:11:20] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:60224]
2023-01-19 13:11:20.204728433  [2023-01-19 13:11:20] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:35460]
2023-01-19 13:11:21.008743606  [2023-01-19 13:11:21] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:35460]
2023-01-19 13:11:21.208640765  [2023-01-19 13:11:21] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55522]
2023-01-19 13:12:04.458718316  [2023-01-19 13:12:04] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55522]
2023-01-19 13:12:04.674567612  [2023-01-19 13:12:04] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:36010]
2023-01-19 13:14:32.160955526  [2023-01-19 13:14:32] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:36010]
2023-01-19 13:14:32.385814978  [2023-01-19 13:14:32] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40914]
2023-01-19 13:15:49.085096033  [2023-01-19 13:15:49] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40914]
2023-01-19 13:15:49.306704588  [2023-01-19 13:15:49] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53886]
2023-01-19 13:15:55.348105454  [2023-01-19 13:15:55] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53886]
2023-01-19 13:15:55.551183058  [2023-01-19 13:15:55] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49642]
2023-01-19 13:16:48.858656451  [2023-01-19 13:16:48] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49642]
2023-01-19 13:16:49.061096519  [2023-01-19 13:16:49] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43204]
2023-01-19 13:20:23.329204393  [2023-01-19 13:20:23] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43204]
2023-01-19 13:20:23.647343400  [2023-01-19 13:20:23] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:34058]
2023-01-19 13:20:38.922102997  [2023-01-19 13:20:38] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56150]
2023-01-19 13:20:50.416086308  [2023-01-19 13:20:50] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:34058]
2023-01-19 13:20:50.645320528  [2023-01-19 13:20:50] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:35846]
2023-01-19 13:21:20.420882029  [2023-01-19 13:21:20] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:35846]
2023-01-19 13:21:20.641211214  [2023-01-19 13:21:20] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55440]
2023-01-19 13:21:27.454476759  [2023-01-19 13:21:27] frigate.http                   ERROR   : No recordings found for the requested time range
2023-01-19 13:21:27.507522636  [2023-01-19 13:21:27] frigate.http                   ERROR   : Event does not have recordings: 1674159524.275214-v12oak
2023-01-19 13:21:37.234475634  [2023-01-19 13:21:37] frigate.http                   ERROR   : Event does not have recordings: 1674159524.275214-v12oak
2023-01-19 13:21:37.276972533  [2023-01-19 13:21:37] frigate.http                   ERROR   : Event does not have recordings: 1674159524.275214-v12oak
2023-01-19 13:21:40.787639766  [2023-01-19 13:21:40] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40878]
2023-01-19 13:21:41.958820023  [2023-01-19 13:21:41] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:40878]
2023-01-19 13:22:58.724938756  [2023-01-19 13:22:58] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55440]
2023-01-19 13:22:58.987468022  [2023-01-19 13:22:58] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59712]
2023-01-19 13:24:53.171747389  [2023-01-19 13:24:53] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:59712]
2023-01-19 13:24:53.474837362  [2023-01-19 13:24:53] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46426]
NickM-27 commented 1 year ago

Are you trying with new clips or existing clips? Also do you see the files being created in the var/lib/docker/volumes/frigate_files/_data/recordings ?

bughattiveyron commented 1 year ago

I wait for new clips to appear

Yes I see files being written to the folder, but only files for the front camera, not the back alley we are troubleshooting. They are 2 different cameras. The front is a unifi g3, the back alley is a sonoff gk-200mp2-b.

bughattiveyron commented 1 year ago
2023-01-19 13:33:37.647489447  [2023-01-19 13:33:37] frigate.http                   ERROR   : No recordings found for the requested time range
2023-01-19 13:33:37.708913636  [2023-01-19 13:33:37] frigate.http                   ERROR   : Event does not have recordings: 1674160385.082651-t35up1
2023-01-19 13:34:43.596833148  [2023-01-19 13:34:43] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:34:43.596998764  [2023-01-19 13:34:43] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:34:44.770100495  [2023-01-19 13:34:44] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:34:44.770454275  [2023-01-19 13:34:44] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:34:44.770926504  [2023-01-19 13:34:44] ffmpeg.Back_Alley.detect       ERROR   : Too many packets buffered for output stream 0:0.
NickM-27 commented 1 year ago

I would let the logs run for a bit and see what they say, seems like there is definitely some issue with the recordings being saved for this camera

bughattiveyron commented 1 year ago

I understand what you are saying, I can tell you if I take out output_args: record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -c:a aac rtmp: -c:v copy -f flv -c:a aac from the config, it will capture and save the recordings just fine, they just have no audio. It seems like with ffmpeg, different configs work with different cameras. I was hoping someone would have tried this camera already but it seems it hasn't really been tested yet. I honestly think its a matter of finding the right tweak for ffmpeg, I just dont have the right knowledge to do so.

NickM-27 commented 1 year ago

Well you are on 0.12, you should be using our new presets, I'd suggest setting

output_args:
  record: preset-record-generic-audio-copy

and see how that works for you

bughattiveyron commented 1 year ago

Seems to be a lot more log data now that I changed it to your suggestion

2023-01-19 13:54:38.812998576  [2023-01-19 13:54:38] frigate.app                    INFO    : Starting Frigate (0.12.0-12d51d3)
2023-01-19 13:54:38.845750910  [2023-01-19 13:54:38] peewee_migrate                 INFO    : Starting migrations
2023-01-19 13:54:38.865986266  [2023-01-19 13:54:38] peewee_migrate                 INFO    : There is nothing to migrate
2023-01-19 13:54:38.871513242  [2023-01-19 13:54:38] ws4py                          INFO    : Using epoll
2023-01-19 13:54:38.891201839  [2023-01-19 13:54:38] detector.cpu                   INFO    : Starting detection process: 276
2023-01-19 13:54:38.895435033  [2023-01-19 13:54:38] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-01-19 13:54:38.897960100  [2023-01-19 13:54:38] frigate.app                    INFO    : Output process started: 278
2023-01-19 13:54:38.900286590  [2023-01-19 13:54:38] ws4py                          INFO    : Using epoll
2023-01-19 13:54:38.909936389  [2023-01-19 13:54:38] frigate.app                    INFO    : Camera processor started for Front_Garage: 282
2023-01-19 13:54:38.918388149  [2023-01-19 13:54:38] frigate.app                    INFO    : Camera processor started for Back_Alley: 284
2023-01-19 13:54:38.926647090  [2023-01-19 13:54:38] frigate.app                    INFO    : Capture process started for Front_Garage: 286
2023-01-19 13:54:38.936502749  [2023-01-19 13:54:38] frigate.app                    INFO    : Capture process started for Back_Alley: 290
2023-01-19 13:54:41.638050075  [2023-01-19 13:54:41] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56184]
2023-01-19 13:54:44.493995095  [2023-01-19 13:54:44] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:54:44.494475976  [2023-01-19 13:54:44] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:54:49.505774419  [2023-01-19 13:54:49] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135449.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55ec7b15c6c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135444.mp4: Invalid data found when processing input\n'
2023-01-19 13:54:49.505781235  [2023-01-19 13:54:49] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135449.mp4
2023-01-19 13:54:58.969483370  [2023-01-19 13:54:58] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:54:58.969777246  [2023-01-19 13:54:58] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:54:58.970112407  [2023-01-19 13:54:58] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x565488addac0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:54:58.970423028  [2023-01-19 13:54:58] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:54:58.970687024  [2023-01-19 13:54:58] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:54:58.970948233  [2023-01-19 13:54:58] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:04.594176734  [2023-01-19 13:55:04] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:04.594523989  [2023-01-19 13:55:04] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:08.691694076  [2023-01-19 13:55:08] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56184]
2023-01-19 13:55:08.939726268  [2023-01-19 13:55:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:41726]
2023-01-19 13:55:09.005591741  [2023-01-19 13:55:09] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:09.005855123  [2023-01-19 13:55:09] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:09.006000440  [2023-01-19 13:55:09] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x561ecdfa1bc0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:09.006326232  [2023-01-19 13:55:09] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:09.006328443  [2023-01-19 13:55:09] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:09.006329877  [2023-01-19 13:55:09] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:09.517223538  [2023-01-19 13:55:09] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135509.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x558d3bfe16c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135504.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:09.517519545  [2023-01-19 13:55:09] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135509.mp4
2023-01-19 13:55:14.588277996  [2023-01-19 13:55:14] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:14.588414606  [2023-01-19 13:55:14] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:19.027621592  [2023-01-19 13:55:19] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:19.028382066  [2023-01-19 13:55:19] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:19.028783619  [2023-01-19 13:55:19] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x558617441a00] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:19.029108664  [2023-01-19 13:55:19] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:19.029426207  [2023-01-19 13:55:19] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:19.029730940  [2023-01-19 13:55:19] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:19.514609279  [2023-01-19 13:55:19] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135519.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55d9e07b86c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135514.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:19.517252617  [2023-01-19 13:55:19] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135519.mp4
2023-01-19 13:55:24.581370816  [2023-01-19 13:55:24] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:24.581533980  [2023-01-19 13:55:24] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:29.038716914  [2023-01-19 13:55:29] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:29.039006212  [2023-01-19 13:55:29] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:29.039369561  [2023-01-19 13:55:29] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55f9a8a1c500] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:29.039668761  [2023-01-19 13:55:29] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:29.039945735  [2023-01-19 13:55:29] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:29.040231085  [2023-01-19 13:55:29] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:29.516997309  [2023-01-19 13:55:29] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135529.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x555db17a26c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135524.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:29.517085164  [2023-01-19 13:55:29] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135529.mp4
2023-01-19 13:55:30.038735714  [2023-01-19 13:55:30] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:56618]
2023-01-19 13:55:34.588758055  [2023-01-19 13:55:34] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:34.589126403  [2023-01-19 13:55:34] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:39.061170281  [2023-01-19 13:55:39] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:39.061542002  [2023-01-19 13:55:39] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:39.061883887  [2023-01-19 13:55:39] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55672b62e1c0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:39.062132116  [2023-01-19 13:55:39] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:39.062471322  [2023-01-19 13:55:39] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:39.062617729  [2023-01-19 13:55:39] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:39.526574083  [2023-01-19 13:55:39] frigate.record                 WARNING : Failed to probe corrupt segment {'cache_path': '/tmp/cache/Front_Garage-20230119135439.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 39)}: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55f2093cf6c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135534.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:39.528798306  [2023-01-19 13:55:39] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Front_Garage-20230119135439.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 39)}
2023-01-19 13:55:44.595167793  [2023-01-19 13:55:44] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:44.595585440  [2023-01-19 13:55:44] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:49.081002131  [2023-01-19 13:55:49] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:49.081242787  [2023-01-19 13:55:49] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:49.081403443  [2023-01-19 13:55:49] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x5611b485e880] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:49.081584329  [2023-01-19 13:55:49] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:49.081745623  [2023-01-19 13:55:49] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:49.081961964  [2023-01-19 13:55:49] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:49.546858831  [2023-01-19 13:55:49] frigate.record                 WARNING : Failed to probe corrupt segment {'cache_path': '/tmp/cache/Front_Garage-20230119135449.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 49)}: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56004ac866c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135544.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:49.547030198  [2023-01-19 13:55:49] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Front_Garage-20230119135449.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 49)}
2023-01-19 13:55:54.580529541  [2023-01-19 13:55:54] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:55:54.581234782  [2023-01-19 13:55:54] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:55:54.904126288  [2023-01-19 13:55:54] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:41726]
2023-01-19 13:55:55.094754599  [2023-01-19 13:55:55] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49274]
2023-01-19 13:55:59.100442940  [2023-01-19 13:55:59] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:55:59.100758047  [2023-01-19 13:55:59] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:55:59.101820140  [2023-01-19 13:55:59] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x559f211f4d00] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:55:59.101828521  [2023-01-19 13:55:59] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:55:59.101832308  [2023-01-19 13:55:59] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:55:59.101835215  [2023-01-19 13:55:59] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:55:59.524987164  [2023-01-19 13:55:59] frigate.record                 WARNING : Failed to probe corrupt segment {'cache_path': '/tmp/cache/Front_Garage-20230119135459.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 59)}: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x558c191586c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135554.mp4: Invalid data found when processing input\n'
2023-01-19 13:55:59.529421441  [2023-01-19 13:55:59] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Front_Garage-20230119135459.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 54, 59)}
2023-01-19 13:56:04.692939272  [2023-01-19 13:56:04] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:04.693096328  [2023-01-19 13:56:04] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:09.118848003  [2023-01-19 13:56:09] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:09.118973450  [2023-01-19 13:56:09] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:09.119059521  [2023-01-19 13:56:09] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55ea727aa8c0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:09.119172338  [2023-01-19 13:56:09] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:09.119190230  [2023-01-19 13:56:09] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:09.119278023  [2023-01-19 13:56:09] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:09.526056234  [2023-01-19 13:56:09] frigate.record                 WARNING : Failed to probe corrupt segment {'cache_path': '/tmp/cache/Front_Garage-20230119135509.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 55, 9)}: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557ef7de76c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135604.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:09.530608029  [2023-01-19 13:56:09] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Front_Garage-20230119135509.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 55, 9)}
2023-01-19 13:56:14.681444115  [2023-01-19 13:56:14] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:14.681504094  [2023-01-19 13:56:14] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:19.131283078  [2023-01-19 13:56:19] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:19.131657412  [2023-01-19 13:56:19] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:19.131888363  [2023-01-19 13:56:19] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55efb8311640] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:19.132192293  [2023-01-19 13:56:19] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:19.132559616  [2023-01-19 13:56:19] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:19.132895777  [2023-01-19 13:56:19] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:19.522160645  [2023-01-19 13:56:19] frigate.record                 WARNING : Failed to probe corrupt segment {'cache_path': '/tmp/cache/Front_Garage-20230119135519.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 55, 19)}: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55c6717e96c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135614.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:19.525247918  [2023-01-19 13:56:19] frigate.record                 WARNING : Discarding a corrupt recording segment: {'cache_path': '/tmp/cache/Front_Garage-20230119135519.mp4', 'start_time': datetime.datetime(2023, 1, 19, 13, 55, 19)}
2023-01-19 13:56:24.682776710  [2023-01-19 13:56:24] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:24.682782613  [2023-01-19 13:56:24] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:29.158931854  [2023-01-19 13:56:29] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:29.158937878  [2023-01-19 13:56:29] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:29.158940121  [2023-01-19 13:56:29] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55c2982f7140] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:29.158942210  [2023-01-19 13:56:29] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:29.158943827  [2023-01-19 13:56:29] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:29.158947184  [2023-01-19 13:56:29] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:29.513978097  [2023-01-19 13:56:29] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135629.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x555b4796e6c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135624.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:29.513985472  [2023-01-19 13:56:29] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135629.mp4
2023-01-19 13:56:34.689968401  [2023-01-19 13:56:34] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:34.689974050  [2023-01-19 13:56:34] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:39.168348703  [2023-01-19 13:56:39] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:39.168655488  [2023-01-19 13:56:39] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:39.168925847  [2023-01-19 13:56:39] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x5626c2dbf800] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:39.169169905  [2023-01-19 13:56:39] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:39.169405365  [2023-01-19 13:56:39] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:39.169623907  [2023-01-19 13:56:39] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:39.515162843  [2023-01-19 13:56:39] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135639.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55cb50c0c6c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135634.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:39.515800191  [2023-01-19 13:56:39] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135639.mp4
2023-01-19 13:56:44.698735912  [2023-01-19 13:56:44] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:44.698743431  [2023-01-19 13:56:44] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:49.184502202  [2023-01-19 13:56:49] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:49.184750179  [2023-01-19 13:56:49] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:49.184874086  [2023-01-19 13:56:49] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x561349b6f800] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:49.185054971  [2023-01-19 13:56:49] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:49.185242913  [2023-01-19 13:56:49] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:49.185423049  [2023-01-19 13:56:49] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:49.524812624  [2023-01-19 13:56:49] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135649.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556ae2e8a6c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135644.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:49.525191139  [2023-01-19 13:56:49] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135649.mp4
2023-01-19 13:56:54.789165744  [2023-01-19 13:56:54] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:56:54.789300041  [2023-01-19 13:56:54] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:56:59.218617652  [2023-01-19 13:56:59] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:56:59.218627309  [2023-01-19 13:56:59] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:56:59.218632252  [2023-01-19 13:56:59] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x563cfcd481c0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:56:59.218636304  [2023-01-19 13:56:59] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:56:59.218639614  [2023-01-19 13:56:59] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:56:59.218642524  [2023-01-19 13:56:59] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:56:59.526897668  [2023-01-19 13:56:59] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135659.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x562c5cb976c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135654.mp4: Invalid data found when processing input\n'
2023-01-19 13:56:59.528740703  [2023-01-19 13:56:59] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135659.mp4
2023-01-19 13:57:04.794317460  [2023-01-19 13:57:04] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 13:57:04.794553848  [2023-01-19 13:57:04] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 13:57:08.679418486  [2023-01-19 13:57:08] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49274]
2023-01-19 13:57:08.875794512  [2023-01-19 13:57:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:41024]
2023-01-19 13:57:09.230899173  [2023-01-19 13:57:09] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 13:57:09.231075183  [2023-01-19 13:57:09] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 13:57:09.231077533  [2023-01-19 13:57:09] ffmpeg.Back_Alley.detect       ERROR   : [mp4 @ 0x55a7ad26e640] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
2023-01-19 13:57:09.231079558  [2023-01-19 13:57:09] ffmpeg.Back_Alley.detect       ERROR   : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
2023-01-19 13:57:09.231150993  [2023-01-19 13:57:09] ffmpeg.Back_Alley.detect       ERROR   : Error initializing output stream 0:1 -- 
2023-01-19 13:57:09.231208839  [2023-01-19 13:57:09] ffmpeg.Back_Alley.detect       ERROR   : 
2023-01-19 13:57:09.526590782  [2023-01-19 13:57:09] frigate.record                 WARNING : Failed to probe corrupt segment Front_Garage-20230119135709.mp4: 0 - b'[mov,mp4,m4a,3gp,3g2,mj2 @ 0x557379a596c0] moov atom not found\n/tmp/cache/Back_Alley-20230119135704.mp4: Invalid data found when processing input\n'
2023-01-19 13:57:09.526910410  [2023-01-19 13:57:09] frigate.record                 WARNING : Discarding a corrupt recording segment: Front_Garage-20230119135709.mp4
NickM-27 commented 1 year ago

Okay, in that case I would suggest moving to the new restream as is should make it work, I would adjust the config by

adding

go2rtc:
  streams:
    Back_Alley:
      - rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0
      - ffmpeg:Back_Alley#audio=aac

and then adjust the config to

  Back_Alley:
    ffmpeg:
      output_args:
        record: preset-record-generic-audio-copy
      inputs:
        - path: rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac
          roles:
            - detect
            - rtmp

this will transcode the audio to aac before frigate consumes it

bughattiveyron commented 1 year ago

So a couple things.

I didnt see before but when I change to your

output_args: record: preset-record-generic-audio-copy

that it completely breaks the stream all together. With this config

` Back_Alley:

Required: ffmpeg settings for the camera

ffmpeg:
  output_args:
    record: preset-record-generic-audio-copy
  # 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, which must begin with 'FRIGATE_' and be referenced in {}
    - path: rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0
      # Required: list of roles for this stream. valid values are: detect,record,rtmp
      # NOTICE: In addition to assigning the record, and rtmp roles,
      # they must also be enabled in the camera config.
      roles:
        - detect
        - rtmp
objects:
  track:
    - person
    - car
    - truck
    - bicycle
    - motorcycle
    - dog
    - cat
snapshots:
  enabled: True
record:
  enabled: True`

On the home page of frigate, that camera has a black box that says no frames have been received, check error logs

Logs

2023-01-19 14:18:33.106700056 [2023-01-19 14:18:33] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:18:33.106709748 [2023-01-19 14:18:33] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:18:33.106714925 [2023-01-19 14:18:33] ffmpeg.Back_Alley.detect ERROR : [mp4 @ 0x55ee1fb035c0] Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container 2023-01-19 14:18:33.107071070 [2023-01-19 14:18:33] ffmpeg.Back_Alley.detect ERROR : Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument 2023-01-19 14:18:33.107478785 [2023-01-19 14:18:33] ffmpeg.Back_Alley.detect ERROR : Error initializing output stream 0:1 -- 2023-01-19 14:18:33.107799706 [2023-01-19 14:18:33] ffmpeg.Back_Alley.detect ERROR :

So trying your last suggestion to restream it wont make much difference

NickM-27 commented 1 year ago

So trying your last suggestion to restream it wont make much difference

that is entirely incorrect. The reason the stream breaks is due to it not being able to handle your cameras pcma audio codec. My restream change fixes this before the stream comes to ffmpeg, which is the whole point.

The output_args: record: preset-record-generic-audio-copy is working exactly as would be expected and it will copy the aac which will work as expected

bughattiveyron commented 1 year ago

ok, so I will try it again then. Where exactly in the config does the go2rtc: go

NickM-27 commented 1 year ago

ok, so I will try it again then. Where exactly in the config does the go2rtc: go

Thanks, it can just go at the bottom of the config

bughattiveyron commented 1 year ago

New config file

`mqtt: host: 10.xx.xx.240 port: 1883 topic_prefix: frigate client_id: frigate user: liquidmosq password: secure

birdseye: enabled: True width: 1280 height: 720 quality: 8 mode: objects

cameras: Front_Garage: ffmpeg: output_args: record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c:v copy -ar 44100 -c:a aac rtmp: -c:v copy -f flv -ar 44100 -c:a aac inputs:

go2rtc: streams: Back_Alley:

Logs

2023-01-19 14:33:21.186782788 [2023-01-19 14:33:21] frigate.app INFO : Starting Frigate (0.12.0-12d51d3) 2023-01-19 14:33:21.216661035 [2023-01-19 14:33:21] peewee_migrate INFO : Starting migrations 2023-01-19 14:33:21.236273596 [2023-01-19 14:33:21] peewee_migrate INFO : There is nothing to migrate 2023-01-19 14:33:21.241337987 [2023-01-19 14:33:21] ws4py INFO : Using epoll 2023-01-19 14:33:21.267089221 [2023-01-19 14:33:21] detector.cpu INFO : Starting detection process: 277 2023-01-19 14:33:21.271721571 [2023-01-19 14:33:21] frigate.detectors WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes. 2023-01-19 14:33:21.273477059 [2023-01-19 14:33:21] frigate.app INFO : Output process started: 279 2023-01-19 14:33:21.276871525 [2023-01-19 14:33:21] ws4py INFO : Using epoll 2023-01-19 14:33:21.281738894 [2023-01-19 14:33:21] frigate.app INFO : Camera processor started for Front_Garage: 283 2023-01-19 14:33:21.292610406 [2023-01-19 14:33:21] frigate.app INFO : Camera processor started for Back_Alley: 285 2023-01-19 14:33:21.301666439 [2023-01-19 14:33:21] frigate.app INFO : Capture process started for Front_Garage: 287 2023-01-19 14:33:21.311479345 [2023-01-19 14:33:21] frigate.app INFO : Capture process started for Back_Alley: 288 2023-01-19 14:33:21.341184764 [2023-01-19 14:33:21] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:33:21.341776877 [2023-01-19 14:33:21] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:33:24.719726674 [2023-01-19 14:33:24] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53864] 2023-01-19 14:33:34.066857283 [2023-01-19 14:33:34] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53864] 2023-01-19 14:33:34.283745864 [2023-01-19 14:33:34] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40340] 2023-01-19 14:33:35.313571436 [2023-01-19 14:33:35] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40340] 2023-01-19 14:33:35.508555373 [2023-01-19 14:33:35] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40352] 2023-01-19 14:33:41.344242343 [2023-01-19 14:33:41] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:33:41.344663999 [2023-01-19 14:33:41] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:33:41.345014263 [2023-01-19 14:33:41] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x565198f9d300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:33:41.345328392 [2023-01-19 14:33:41] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:33:41.398945107 [2023-01-19 14:33:41] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:33:41.399385998 [2023-01-19 14:33:41] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:33:43.056293969 [2023-01-19 14:33:43] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40352] 2023-01-19 14:33:43.263881245 [2023-01-19 14:33:43] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42694] 2023-01-19 14:33:44.000768503 [2023-01-19 14:33:43] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42694] 2023-01-19 14:33:44.198631627 [2023-01-19 14:33:44] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42696] 2023-01-19 14:33:51.236241067 [2023-01-19 14:33:51] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:46830] 2023-01-19 14:33:51.392303695 [2023-01-19 14:33:51] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:33:51.392309621 [2023-01-19 14:33:51] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:33:51.392314728 [2023-01-19 14:33:51] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x55b83d9e2300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:33:51.392317822 [2023-01-19 14:33:51] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:33:51.411828297 [2023-01-19 14:33:51] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:33:51.412237583 [2023-01-19 14:33:51] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:01.412628341 [2023-01-19 14:34:01] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:01.412946264 [2023-01-19 14:34:01] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:01.413255178 [2023-01-19 14:34:01] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x558c83e7f300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:01.413566470 [2023-01-19 14:34:01] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:01.442736878 [2023-01-19 14:34:01] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:01.443084293 [2023-01-19 14:34:01] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:05.361528422 [2023-01-19 14:34:05] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42696] 2023-01-19 14:34:05.567547420 [2023-01-19 14:34:05] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:48162] 2023-01-19 14:34:06.342663410 [2023-01-19 14:34:06] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:48162] 2023-01-19 14:34:06.508963729 [2023-01-19 14:34:06] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:48170] 2023-01-19 14:34:11.434335807 [2023-01-19 14:34:11] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:11.434695779 [2023-01-19 14:34:11] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:11.434971289 [2023-01-19 14:34:11] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x55fc325f9300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:11.435311842 [2023-01-19 14:34:11] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:11.463694021 [2023-01-19 14:34:11] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:11.463920317 [2023-01-19 14:34:11] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:21.453410367 [2023-01-19 14:34:21] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:21.461879713 [2023-01-19 14:34:21] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:21.462282097 [2023-01-19 14:34:21] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x55ace9256300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:21.462626247 [2023-01-19 14:34:21] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:21.482708968 [2023-01-19 14:34:21] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:21.483016483 [2023-01-19 14:34:21] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:31.472106928 [2023-01-19 14:34:31] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:31.472414355 [2023-01-19 14:34:31] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:31.472732350 [2023-01-19 14:34:31] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x56549098b300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:31.472999121 [2023-01-19 14:34:31] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:31.503472021 [2023-01-19 14:34:31] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:31.503811725 [2023-01-19 14:34:31] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:41.491868140 [2023-01-19 14:34:41] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:41.492184309 [2023-01-19 14:34:41] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:41.492491064 [2023-01-19 14:34:41] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x557f4a4c9300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:41.492776266 [2023-01-19 14:34:41] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:41.523790680 [2023-01-19 14:34:41] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:41.524126805 [2023-01-19 14:34:41] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:34:51.513646060 [2023-01-19 14:34:51] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:34:51.519539864 [2023-01-19 14:34:51] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:34:51.519722563 [2023-01-19 14:34:51] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x55ce914ea300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:34:51.519726114 [2023-01-19 14:34:51] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:34:51.531569215 [2023-01-19 14:34:51] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:34:51.531687933 [2023-01-19 14:34:51] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:35:01.525826639 [2023-01-19 14:35:01] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:35:01.526199701 [2023-01-19 14:35:01] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:35:01.526565232 [2023-01-19 14:35:01] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x561e04373300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:35:01.526802726 [2023-01-19 14:35:01] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:35:01.556960944 [2023-01-19 14:35:01] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:35:01.557635271 [2023-01-19 14:35:01] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:35:11.557131012 [2023-01-19 14:35:11] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:35:11.557140736 [2023-01-19 14:35:11] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:35:11.557145372 [2023-01-19 14:35:11] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x55851a331300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:35:11.557149284 [2023-01-19 14:35:11] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:35:11.580666833 [2023-01-19 14:35:11] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:35:11.580673787 [2023-01-19 14:35:11] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:35:21.579099268 [2023-01-19 14:35:21] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:35:21.579109278 [2023-01-19 14:35:21] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:35:21.579114098 [2023-01-19 14:35:21] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x56198cf9b300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:35:21.579118148 [2023-01-19 14:35:21] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:35:21.602971179 [2023-01-19 14:35:21] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:35:21.603156410 [2023-01-19 14:35:21] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:35:31.602158814 [2023-01-19 14:35:31] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:35:31.602165638 [2023-01-19 14:35:31] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:35:31.602168388 [2023-01-19 14:35:31] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x564ab8474300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:35:31.602170795 [2023-01-19 14:35:31] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:35:31.614943839 [2023-01-19 14:35:31] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:35:31.615126586 [2023-01-19 14:35:31] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread... 2023-01-19 14:35:41.609132065 [2023-01-19 14:35:41] watchdog.Back_Alley ERROR : Ffmpeg process crashed unexpectedly for Back_Alley. 2023-01-19 14:35:41.609442209 [2023-01-19 14:35:41] watchdog.Back_Alley ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-01-19 14:35:41.609837238 [2023-01-19 14:35:41] ffmpeg.Back_Alley.detect ERROR : [tcp @ 0x56074c50a300] Connection to tcp://127.0.0.1:554?timeout=5000000 failed: Connection refused 2023-01-19 14:35:41.609844667 [2023-01-19 14:35:41] ffmpeg.Back_Alley.detect ERROR : rtsp://127.0.0.1/Back_Alley?video=copy&audio=aac: Connection refused 2023-01-19 14:35:41.639515338 [2023-01-19 14:35:41] frigate.video ERROR : Back_Alley: Unable to read frames from ffmpeg process. 2023-01-19 14:35:41.639971684 [2023-01-19 14:35:41] frigate.video ERROR : Back_Alley: ffmpeg process is not running. exiting capture thread...

NickM-27 commented 1 year ago

shoot sorry that's my bad, the path should be - path: rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac

bughattiveyron commented 1 year ago

Logs after change

2023-01-19 14:41:59.977047570  [2023-01-19 14:41:59] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:41:59.977424122  [2023-01-19 14:41:59] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:41:59.977749393  [2023-01-19 14:41:59] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
2023-01-19 14:42:05.139379509  [2023-01-19 14:42:05] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 14:42:05.140170680  [2023-01-19 14:42:05] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 14:42:06.988293869  [2023-01-19 14:42:06] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33672]
2023-01-19 14:42:07.197913430  [2023-01-19 14:42:07] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53338]
2023-01-19 14:42:07.929615004  [2023-01-19 14:42:07] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53338]
2023-01-19 14:42:08.116917773  [2023-01-19 14:42:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53354]
2023-01-19 14:42:08.759472413  [2023-01-19 14:42:08] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53354]
2023-01-19 14:42:08.924948844  [2023-01-19 14:42:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53366]
2023-01-19 14:42:10.016542939  [2023-01-19 14:42:10] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:42:10.016736854  [2023-01-19 14:42:10] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:42:10.016739512  [2023-01-19 14:42:10] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
bughattiveyron commented 1 year ago

wait, disregard, I have video, let me give it some time to collect

bughattiveyron commented 1 year ago

So no event has popped up in frigate for the back alley yet, but what I am noticing is that it is saving a recording every 10 seconds in the recording folder since I made the change and restarted frigate. I can say none of those 10 second clips have audio.

NickM-27 commented 1 year ago

can you go to the system page and press the FFPROBE button for this camera and paste the results?

bughattiveyron commented 1 year ago

"[\n {\n \"return_code\": 0,\n \"stderr\": {},\n \"stdout\": {}\n }\n]"

NickM-27 commented 1 year ago

okay that's odd, can you go to http://frigate_ip:5000/live/webrtc and next to the camera press the info button and paste the data here?

bughattiveyron commented 1 year ago
{
  "producers": [
    {
      "type": "RTSP source",
      "url": "rtsp://10.xx.xx.216:554/av_stream/ch0",
      "remote_addr": "10.xx.xx.216:554",
      "user_agent": "go2rtc/0.1-rc.9",
      "medias": [
        "video, sendonly, 96 H264/90000",
        "audio, sendonly, 8 PCMA/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=1",
        "8 PCMA/8000, sinks=1"
      ],
      "recv": 52903939
    },
    {
      "type": "RTSP source",
      "url": "rtsp://localhost:8554/4de5688f70f7e5e6b0d7baa021543986",
      "remote_addr": "127.0.0.1:43434",
      "user_agent": "ffmpeg/go2rtc",
      "medias": [
        "audio, sendonly, 96 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 MPEG4-GENERIC/8000, sinks=1"
      ]
    }
  ],
  "consumers": [
    {
      "type": "RTSP client",
      "url": "rtsp://127.0.0.1:8554/Back_Alley?video=copy\u0026audio=aac",
      "remote_addr": "127.0.0.1:40660",
      "user_agent": "FFmpeg Frigate/0.12.0-12d51d3",
      "medias": [
        "video, recvonly, 96 H264/90000",
        "audio, recvonly, 97 MPEG4-GENERIC/8000"
      ],
      "tracks": [
        "96 H264/90000, sinks=1",
        "97 MPEG4-GENERIC/8000, sinks=1"
      ],
      "send": 52293981
    },
    {
      "type": "RTSP client",
      "url": "rtsp://localhost:8554/Back_Alley?audio",
      "remote_addr": "127.0.0.1:43438",
      "user_agent": "go2rtc/ffmpeg",
      "medias": [
        "audio, recvonly, 96 PCMA/8000"
      ],
      "tracks": [
        "96 PCMA/8000, sinks=1"
      ]
    }
  ]
}
NickM-27 commented 1 year ago

hmm, so it is sending the aac audio as expected. maybe paste the current logs and there will be a hint

bughattiveyron commented 1 year ago
2023-01-19 14:41:39.817290019  [2023-01-19 14:41:39] frigate.app                    INFO    : Starting Frigate (0.12.0-12d51d3)
2023-01-19 14:41:39.848148078  [2023-01-19 14:41:39] peewee_migrate                 INFO    : Starting migrations
2023-01-19 14:41:39.878412695  [2023-01-19 14:41:39] peewee_migrate                 INFO    : There is nothing to migrate
2023-01-19 14:41:39.883582185  [2023-01-19 14:41:39] ws4py                          INFO    : Using epoll
2023-01-19 14:41:39.905856767  [2023-01-19 14:41:39] detector.cpu                   INFO    : Starting detection process: 277
2023-01-19 14:41:39.909982316  [2023-01-19 14:41:39] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-01-19 14:41:39.912168252  [2023-01-19 14:41:39] frigate.app                    INFO    : Output process started: 279
2023-01-19 14:41:39.913783672  [2023-01-19 14:41:39] ws4py                          INFO    : Using epoll
2023-01-19 14:41:39.922090734  [2023-01-19 14:41:39] frigate.app                    INFO    : Camera processor started for Front_Garage: 283
2023-01-19 14:41:39.929339062  [2023-01-19 14:41:39] frigate.app                    INFO    : Camera processor started for Back_Alley: 285
2023-01-19 14:41:39.937498459  [2023-01-19 14:41:39] frigate.app                    INFO    : Capture process started for Front_Garage: 287
2023-01-19 14:41:39.946187754  [2023-01-19 14:41:39] frigate.app                    INFO    : Capture process started for Back_Alley: 288
2023-01-19 14:41:44.179013643  [2023-01-19 14:41:44] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40304]
2023-01-19 14:41:45.087160667  [2023-01-19 14:41:45] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 14:41:45.087669303  [2023-01-19 14:41:45] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 14:41:46.275454167  [2023-01-19 14:41:46] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40304]
2023-01-19 14:41:46.472938400  [2023-01-19 14:41:46] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40308]
2023-01-19 14:41:47.278859031  [2023-01-19 14:41:47] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40308]
2023-01-19 14:41:47.480491049  [2023-01-19 14:41:47] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40324]
2023-01-19 14:41:48.209102564  [2023-01-19 14:41:48] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40324]
2023-01-19 14:41:48.402096225  [2023-01-19 14:41:48] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40336]
2023-01-19 14:41:49.043189973  [2023-01-19 14:41:49] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40336]
2023-01-19 14:41:49.234966403  [2023-01-19 14:41:49] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40348]
2023-01-19 14:41:49.825820856  [2023-01-19 14:41:49] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40348]
2023-01-19 14:41:50.019362254  [2023-01-19 14:41:50] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40350]
2023-01-19 14:41:50.650073774  [2023-01-19 14:41:50] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:40350]
2023-01-19 14:41:50.851285391  [2023-01-19 14:41:50] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33654]
2023-01-19 14:41:51.409201665  [2023-01-19 14:41:51] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33654]
2023-01-19 14:41:51.596061886  [2023-01-19 14:41:51] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33666]
2023-01-19 14:41:52.164306839  [2023-01-19 14:41:52] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33666]
2023-01-19 14:41:52.354652915  [2023-01-19 14:41:52] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33672]
2023-01-19 14:41:59.977047570  [2023-01-19 14:41:59] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:41:59.977424122  [2023-01-19 14:41:59] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:41:59.977749393  [2023-01-19 14:41:59] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
2023-01-19 14:42:05.139379509  [2023-01-19 14:42:05] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 14:42:05.140170680  [2023-01-19 14:42:05] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 14:42:06.988293869  [2023-01-19 14:42:06] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33672]
2023-01-19 14:42:07.197913430  [2023-01-19 14:42:07] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53338]
2023-01-19 14:42:07.929615004  [2023-01-19 14:42:07] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53338]
2023-01-19 14:42:08.116917773  [2023-01-19 14:42:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53354]
2023-01-19 14:42:08.759472413  [2023-01-19 14:42:08] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53354]
2023-01-19 14:42:08.924948844  [2023-01-19 14:42:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53366]
2023-01-19 14:42:10.016542939  [2023-01-19 14:42:10] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:42:10.016736854  [2023-01-19 14:42:10] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:42:10.016739512  [2023-01-19 14:42:10] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
2023-01-19 14:42:15.149596748  [2023-01-19 14:42:15] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 14:42:15.149602803  [2023-01-19 14:42:15] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 14:42:20.041902740  [2023-01-19 14:42:20] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:42:20.041908914  [2023-01-19 14:42:20] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:42:20.041910922  [2023-01-19 14:42:20] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
2023-01-19 14:42:25.166620220  [2023-01-19 14:42:25] frigate.video                  ERROR   : Back_Alley: Unable to read frames from ffmpeg process.
2023-01-19 14:42:25.167163189  [2023-01-19 14:42:25] frigate.video                  ERROR   : Back_Alley: ffmpeg process is not running. exiting capture thread...
2023-01-19 14:42:30.052688316  [2023-01-19 14:42:30] watchdog.Back_Alley            ERROR   : Ffmpeg process crashed unexpectedly for Back_Alley.
2023-01-19 14:42:30.052995191  [2023-01-19 14:42:30] watchdog.Back_Alley            ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
2023-01-19 14:42:30.053313341  [2023-01-19 14:42:30] ffmpeg.Back_Alley.detect       ERROR   : rtsp://127.0.0.1:8554/Back_Alley?video=copy&audio=aac: Invalid data found when processing input
2023-01-19 14:43:08.178950452  [2023-01-19 14:43:08] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53366]
2023-01-19 14:43:08.384919100  [2023-01-19 14:43:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58284]
2023-01-19 14:43:10.281377115  [2023-01-19 14:43:10] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:47912]
2023-01-19 14:43:45.248347132  [2023-01-19 14:43:45] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:47912]
2023-01-19 14:43:45.386801883  [2023-01-19 14:43:45] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:48472]
2023-01-19 14:44:57.850246893  [2023-01-19 14:44:57] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:48472]
2023-01-19 14:45:25.455117523  [2023-01-19 14:45:25] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58284]
2023-01-19 14:45:25.780874449  [2023-01-19 14:45:25] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43638]
2023-01-19 14:46:22.738006715  [2023-01-19 14:46:22] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43638]
2023-01-19 14:46:22.948760338  [2023-01-19 14:46:22] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:39174]
2023-01-19 14:46:23.980820603  [2023-01-19 14:46:23] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:39174]
2023-01-19 14:46:24.181135921  [2023-01-19 14:46:24] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:39184]
2023-01-19 14:46:48.518345863  [2023-01-19 14:46:48] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:39184]
2023-01-19 14:46:48.733022483  [2023-01-19 14:46:48] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53088]
2023-01-19 14:46:49.611131195  [2023-01-19 14:46:49] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53088]
2023-01-19 14:46:49.830950079  [2023-01-19 14:46:49] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53100]
2023-01-19 14:47:27.205564778  [2023-01-19 14:47:27] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:53100]
2023-01-19 14:47:27.451761899  [2023-01-19 14:47:27] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51650]
2023-01-19 14:48:05.562157266  [2023-01-19 14:48:05] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:51650]
2023-01-19 14:48:05.797438772  [2023-01-19 14:48:05] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58012]
2023-01-19 14:48:08.094120922  [2023-01-19 14:48:08] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:53394]
2023-01-19 14:48:08.237338958  [2023-01-19 14:48:08] frigate.output                 WARNING : Unable to copy frame Front_Garage1674164696.399845 to birdseye.
2023-01-19 14:48:09.157770442  [2023-01-19 14:48:09] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:53394]
2023-01-19 14:48:10.711767478  [2023-01-19 14:48:10] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50762]
2023-01-19 14:48:10.841119788  [2023-01-19 14:48:10] frigate.output                 WARNING : Unable to copy frame Back_Alley1674164888.106705 to birdseye.
2023-01-19 14:48:25.631596176  [2023-01-19 14:48:25] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:50762]
2023-01-19 14:48:39.752666548  [2023-01-19 14:48:39] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58012]
2023-01-19 14:48:40.045223193  [2023-01-19 14:48:40] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58492]
2023-01-19 14:49:40.193870388  [2023-01-19 14:49:40] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:58492]
2023-01-19 14:49:40.398587819  [2023-01-19 14:49:40] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50282]
2023-01-19 14:51:55.567194055  [2023-01-19 14:51:55] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:50282]
2023-01-19 14:51:55.807914353  [2023-01-19 14:51:55] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42998]
2023-01-19 14:51:57.328657927  [2023-01-19 14:51:57] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:42998]
2023-01-19 14:51:57.528054015  [2023-01-19 14:51:57] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43008]
2023-01-19 15:02:42.406134699  [2023-01-19 15:02:42] ws4py                          INFO    : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:43008]
2023-01-19 15:02:42.765929710  [2023-01-19 15:02:42] ws4py                          INFO    : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:33378]
bughattiveyron commented 1 year ago

Could this be the issue?

https://github.com/home-assistant/core/issues/46719

It looks like this particular model of camera uses the G.711 (PCM) codec for audio. The stream component does not support PCM codecs as they are not supported by the media containers used in the HLS stream.

NickM-27 commented 1 year ago

that's what we are getting around by having the camera restreamed with aac audio

bughattiveyron commented 1 year ago

I tried to open the rtsp stream directly to the camera from VLC and it has no audio

NickM-27 commented 1 year ago

try changing your go2rtc config to

go2rtc:
  streams:
    Back_Alley:
      - "ffmpeg:rtsp://rtsp:secure@10.xx.xx.216:554/av_stream/ch0#video=copy#audio=aac"

I tried to open the rtsp stream directly to the camera from VLC and it has no audio

what did you use as the URL?