Esp32-cam with frigate configuration error

hello all,
new to HA, and i tried to connect my esp32-cam to frigate.
i have the esp32 - cam connected to HA via ESPhome, and i can see the feed in my web.
but when i try to connect the frigate addon, i get a green screen in frigate and this error:

[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-03-23 21:03:29] frigate.app INFO : Starting Frigate (0.11.1-2eada21)
[2023-03-23 21:03:29] frigate.app INFO : Creating directory: /tmp/cache
Starting migrations
[2023-03-23 21:03:29] peewee_migrate INFO : Starting migrations
There is nothing to migrate
[2023-03-23 21:03:29] peewee_migrate INFO : There is nothing to migrate
[2023-03-23 21:03:29] detector.cpu1 INFO : Starting detection process: 216
[2023-03-23 21:03:29] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-03-23 21:03:29] frigate.app INFO : Output process started: 219
[2023-03-23 21:03:29] detector.cpu2 INFO : Starting detection process: 218
[2023-03-23 21:03:29] frigate.app INFO : Camera processor started for esp32-cam: 222
[2023-03-23 21:03:29] ws4py INFO : Using epoll
[2023-03-23 21:03:29] frigate.edgetpu WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2023-03-23 21:03:29] frigate.app INFO : Capture process started for esp32-cam: 225
[2023-03-23 21:03:30] frigate.video ERROR : esp32-cam: Unable to read frames from ffmpeg process.
[2023-03-23 21:03:30] frigate.video ERROR : esp32-cam: ffmpeg process is not running. exiting capture thread…
[2023-03-23 21:03:30] ws4py INFO : Using epoll
[2023-03-23 21:03:50] watchdog.esp32-cam ERROR : Ffmpeg process crashed unexpectedly for esp32-cam.
[2023-03-23 21:03:50] watchdog.esp32-cam ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
[2023-03-23 21:03:50] ffmpeg.esp32-cam.detect ERROR : rtsp://192.168.40.108:8080/: Invalid data found when processing input

this is my frigate configuration:

mqtt:
  host: IP_NUMBER
  user: mqtt
  password: mqtt

detectors:
  cpu1:
    type: cpu
  cpu2:
    type: cpu

cameras:
  esp32-cam: # <------ Name the camera
    ffmpeg:
      global_args: -hide_banner -loglevel warning
      inputs:
        - path: rtsp://IP_NUMBER:8080/ # <----- Update for your camera
          roles:
            - detect
            - rtmp
    rtmp:
      enabled: False
    detect:
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution

anyone know what might be the issue ?

it is very unlikely that your ESP cam has rtsp (usually it is http), and even then it is mjpeg which means the default input_args won’t work. Camera Specific Configurations | Frigate

i found this, now it working.

1 Like

Could you post your working configuration as a resolution to this thread?