Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.11.0 Frigate not working !do u know why?[Config Support]: #4008

Closed
yuhuanfan opened this issue Oct 4, 2022 · 13 comments
Closed

0.11.0 Frigate not working !do u know why?[Config Support]: #4008

yuhuanfan opened this issue Oct 4, 2022 · 13 comments

Comments

@yuhuanfan
Copy link

yuhuanfan commented Oct 4, 2022

Describe the problem you are having

0.11.0 not working do u know why? green screen~~~~
raspberry pi2
Home Assistant 2022.9.7
Supervisor 2022.09.1
Operating System 9.0
前端版本: 20220907.2 - latest

Version

0.11

Frigate config file

mqtt:
  host: 192.168.10.157
  port: 1883
  user: yuhuanfan
  password: *********
  topic_prefix: frigate
  client_id: frigate
  stats_interval: 60

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

detectors:
  cpu1:
    type: cpu
    num_threads: 3

cameras:
  camera_1:
    ffmpeg:
      hwaccel_args: -c:v h264_v4l2m2m
      input_args: -avoid_negative_ts auto -fflags nobuffer+genpts+discardcorrupt -flags low_delay -rtsp_transport tcp -use_wallclock_as_timestamps 1 -timeout 2000000
      inputs:
        - path: rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream
          roles:
            - record
            - rtmp
            - detect
      output_args:
        record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy
    rtmp:
      enabled: True

    record:
      enabled: True
      expire_interval: 60
      retain:
        days: 7
        mode: motion
      events:
        pre_capture: 5
        post_capture: 5

    objects:
      track:
        - person
    
    timestamp_style:
      position: "bl"
      format: "%H:%M:%S"
      color:
        red: 255
        green: 255
        blue: 255
      thickness: 5
      effect: "shadow"
    
    motion:
      threshold: 25
      mask:
        - 1222,675,1226,699,913,699,914,676
        - 496,180,335,720,301,720,212,550,116,288,66,21,116,0,490,0
        - 1280,720,986,720,941,586,998,360,1049,0,1280,0
        - 724,55,709,47,706,0,725,0
      improve_contrast: True

Relevant log output

[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.
[2022-10-04 19:47:19] frigate.app                    INFO    : Starting Frigate (0.11.0-3846a13)
[2022-10-04 19:47:20] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-10-04 19:47:20] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-10-04 19:47:20] peewee_migrate                 INFO    : There is nothing to migrate
[2022-10-04 19:47:20] frigate.app                    INFO    : Output process started: 212
[2022-10-04 19:47:20] detector.cpu1                  INFO    : Starting detection process: 211
[2022-10-04 19:47:20] frigate.app                    INFO    : Camera processor started for camera_1: 215
[2022-10-04 19:47:20] frigate.edgetpu                WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
[2022-10-04 19:47:20] ws4py                          INFO    : Using epoll
[2022-10-04 19:47:20] frigate.app                    INFO    : Capture process started for camera_1: 218
[2022-10-04 19:47:22] ws4py                          INFO    : Using epoll
[2022-10-04 19:47:22] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:47:22] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...
[2022-10-04 19:47:40] watchdog.camera_1              ERROR   : Ffmpeg process crashed unexpectedly for camera_1.
[2022-10-04 19:47:40] watchdog.camera_1              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-10-04 19:47:40] ffmpeg.camera_1.detect         ERROR   : [rtsp @ 0x6a7080] Unable to open RTSP for listening
[2022-10-04 19:47:40] ffmpeg.camera_1.detect         ERROR   : rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream: Cannot assign requested address
[2022-10-04 19:47:42] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:47:42] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...
[2022-10-04 19:47:50] watchdog.camera_1              ERROR   : Ffmpeg process crashed unexpectedly for camera_1.
[2022-10-04 19:47:50] watchdog.camera_1              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-10-04 19:47:50] ffmpeg.camera_1.detect         ERROR   : [rtsp @ 0x902080] Unable to open RTSP for listening
[2022-10-04 19:47:50] ffmpeg.camera_1.detect         ERROR   : rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream: Cannot assign requested address
[2022-10-04 19:47:52] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:47:52] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:47:52] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...
[2022-10-04 19:48:00] watchdog.camera_1              ERROR   : Ffmpeg process crashed unexpectedly for camera_1.
[2022-10-04 19:48:00] watchdog.camera_1              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-10-04 19:48:00] ffmpeg.camera_1.detect         ERROR   : [rtsp @ 0x1e33080] Unable to open RTSP for listening
[2022-10-04 19:48:00] ffmpeg.camera_1.detect         ERROR   : rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream: Cannot assign requested address
[2022-10-04 19:48:02] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:48:02] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...
[2022-10-04 19:48:10] watchdog.camera_1              ERROR   : Ffmpeg process crashed unexpectedly for camera_1.
[2022-10-04 19:48:10] watchdog.camera_1              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-10-04 19:48:10] ffmpeg.camera_1.detect         ERROR   : [rtsp @ 0x1dfc080] Unable to open RTSP for listening
[2022-10-04 19:48:10] ffmpeg.camera_1.detect         ERROR   : rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream: Cannot assign requested address
[2022-10-04 19:48:12] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:48:12] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...
[2022-10-04 19:48:21] watchdog.camera_1              ERROR   : Ffmpeg process crashed unexpectedly for camera_1.
[2022-10-04 19:48:21] watchdog.camera_1              ERROR   : The following ffmpeg logs include the last 100 lines prior to exit.
[2022-10-04 19:48:21] ffmpeg.camera_1.detect         ERROR   : [rtsp @ 0x54f080] Unable to open RTSP for listening
[2022-10-04 19:48:21] ffmpeg.camera_1.detect         ERROR   : rtsp://admin:VCOUTM@192.168.10.86:554/h264/ch1/main/av_stream: Cannot assign requested address
[2022-10-04 19:48:22] frigate.video                  ERROR   : camera_1: Unable to read frames from ffmpeg process.
[2022-10-04 19:48:22] frigate.video                  ERROR   : camera_1: ffmpeg process is not running. exiting capture thread...

Frigate stats

No response

Operating system

Debian

Install method

HassOS Addon

Coral version

CPU (no coral)

Any other information that may be helpful

No response

@yuhuanfan yuhuanfan changed the title [Config Support]: 0.11.0 not working do u know why?[Config Support]: Oct 4, 2022
@yuhuanfan yuhuanfan changed the title 0.11.0 not working do u know why?[Config Support]: 0.11.0 Frigate not working !do u know why?[Config Support]: Oct 4, 2022
@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 4, 2022

This is probably related to #3780

@simon-tietze
Copy link

In my case (on arm32 on a Pi4) this is caused by the Dockerfile installing ffmpeg 4.x (the Dockerfile seems to only pull a 5.x build on arm64).
However, the cmdline generated by frigate changed from -stimeout to -timeout which causes ffmpeg 4.x to fail with Cannot assign requested address
I do not understand the scope of changing from ffmpeg 4.x to 5.x, so I do not now if just somehow stopping frigate from putting -timeout into the cmdline would be a solution.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 4, 2022

In my case (on arm32 on a Pi4) this is caused by the Dockerfile installing ffmpeg 4.x (the Dockerfile seems to only pull a 5.x build on arm64). However, the cmdline generated by frigate changed from -stimeout to -timeout which causes ffmpeg 4.x to fail with Cannot assign requested address I do not understand the scope of changing from ffmpeg 4.x to 5.x, so I do not now if just somehow stopping frigate from putting -timeout into the cmdline would be a solution.

Interesting, if that is the case then you just set the input_args manually in the frigate config and use -stimeout.

@yezzer
Copy link

yezzer commented Oct 4, 2022

Interesting, if that is the case then you just set the input_args manually in the frigate config and use -stimeout.

FYI anyone else searching, I was having the green camera issue on arm32 RPi4, found this post and added input_args: -stimeout 10 - and I can now see my camera.

@simon-tietze
Copy link

Interesting, if that is the case then you just set the input_args manually in the frigate config and use -stimeout.

FYI anyone else searching, I was having the green camera issue on arm32 RPi4, found this post and added input_args: -stimeout 10 - and I can now see my camera.

Thanks, worked perfectly for me!

@KonTiki1957
Copy link

Hi to everyone, I'm facing the same issue and would like to try your workaround but where exactly do I have to put input_args: -stimeout 10 in the frigate configuration file (evtl. infos about the indentation would be appreciated). Sorry for my limited knowledge

@NickM-27
Copy link
Sponsor Collaborator

Hi to everyone, I'm facing the same issue and would like to try your workaround but where exactly do I have to put input_args: -stimeout 10 in the frigate configuration file (evtl. infos about the indentation would be appreciated). Sorry for my limited knowledge

ffmpeg:
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -rtsp_transport tcp -stimeout 5000000 -use_wallclock_as_timestamps 1

@KonTiki1957
Copy link

@NickM-27 many many thanks for your fast reply, apparently it now works as it used to, so far as I understand those settings are necessary when using a 32 bit OS but are not necessary with a 64 bit OS, is that correct. I now take the chance to ask you where am I suppose to understand why this is that way and where to learn something introductory to this complicated ffmpeg world. Moreover does this update have any adverse response when using a coral usb accelerator? Again thank you.

@NickM-27
Copy link
Sponsor Collaborator

@KonTiki1957 it's because 32bit arm uses a different (older) ffmpeg version compared to other archs as the BtBn build we are using doesn't support 32 bit. In general 32 bit support is wavering for Frigate and we recommend updating to 64bit

@hackneyb
Copy link

I have this issue .. basically hwaccel never worked, since I only added a camera to Frigate on HAOS last month.
Updated everything, configured camera, looked for advanced settings in Frigate (like hwaccel_args), and got the green camera stream and ffmpeg crashes in the log. Works fine without hwaccel and the CPU usage is not terrible. But going to 4 cameras soon, which will likely exhaust the CPU.

arm64 RPi4
Home Assistant OS 9.3
Home Assistance Core 2022.11.3
Linux kernel 5.15.61-v8 aarch64
Frigate Home Assistant Add-on version 0.11.1

Issue: green stream from a H264 camera with Frigate hwaccel_args: -c:v h264_v4l2m2m
No effect on the issue: input_args: -stimeout 10

@NickM-27
Copy link
Sponsor Collaborator

@hackneyb see #3780 the latest rpi kernel caused an issue with ffmpeg

@hackneyb
Copy link

hackneyb commented Nov 19, 2022

@hackneyb see #3780 the latest rpi kernel caused an issue with ffmpeg

Yes, reading it - but I have a habit of opening all the relevant links before finishing to read the main thread :) thanks for the super quick reply @NickM-27 btw!

@github-actions
Copy link

github-actions bot commented Jan 1, 2023

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

@github-actions github-actions bot added the stale label Jan 1, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants