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

[HW Accel Support]: Green screen only when using HW Acceleration #4116

Closed
ARowbot opened this issue Oct 18, 2022 · 9 comments
Closed

[HW Accel Support]: Green screen only when using HW Acceleration #4116

ARowbot opened this issue Oct 18, 2022 · 9 comments
Labels
duplicate This issue or pull request already exists support triage

Comments

@ARowbot
Copy link

ARowbot commented Oct 18, 2022

Describe the problem you are having

Fully functioning Frigate until I try and use Hardware Acceleration on the raspberry pi 4. At this point I then get green screen on any camera that I try to use the HW Accel. Protection mode is disabled on Frigate (Full Access). I believe I have enabled GPU memory on the Pi to 512 in config.txt but this was the first time I had SSH into the root so not sure how to check it has dedicated this memory properly.

Version

0.11.1-2EADA21

Frigate config file

mqtt:
  host: core-mosquitto
  user: [User]
  password: [Pass]

detectors:
  coral:
    type: edgetpu
    device: usb

cameras:
  Kitchen_Cam:
    ffmpeg:
      inputs:
        - path: rtsp://[User]:[Pass]@192.168.0.55/live0
          roles:
            - detect
            - record
            - rtmp
      hwaccel_args: 
        - -c:v 
        - h264_v4l2m2m
  Entertainment_Room_Cam:
    ffmpeg:
      inputs:
        - path: rtsp://[User]:[Pass]@192.168.0.56/live0
          roles:
            - detect
            - record
            - rtmp
      hwaccel_args:
        - -c:v
        - h264_v4l2m2m
  Lounge_Cam:
    ffmpeg:
      inputs:
        - path: rtsp://[User]:[Pass]@192.168.0.77/live0
          roles:
            - detect
            - record
            - rtmp
      hwaccel_args: -c:v h264_v4l2m2m

objects:
  track:
    - person
    - dog
    #- cell phone

record:
  enabled: true

snapshots:
  enabled: true

rtmp:
  enabled: false

docker-compose file or Docker CLI command

N/A?

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-18 15:38:29] frigate.app                    INFO    : Starting Frigate (0.11.1-2eada21)
[2022-10-18 15:38:29] frigate.app                    INFO    : Creating directory: /tmp/cache
Starting migrations
[2022-10-18 15:38:29] peewee_migrate                 INFO    : Starting migrations
There is nothing to migrate
[2022-10-18 15:38:29] peewee_migrate                 INFO    : There is nothing to migrate
[2022-10-18 15:38:29] detector.coral                 INFO    : Starting detection process: 216
[2022-10-18 15:38:29] frigate.app                    INFO    : Output process started: 217
[2022-10-18 15:38:29] frigate.edgetpu                INFO    : Attempting to load TPU as usb
[2022-10-18 15:38:29] frigate.app                    INFO    : Camera processor started for Kitchen_Cam: 220
[2022-10-18 15:38:29] ws4py                          INFO    : Using epoll
[2022-10-18 15:38:29] frigate.app                    INFO    : Camera processor started for Entertainment_Room_Cam: 224
[2022-10-18 15:38:29] frigate.app                    INFO    : Camera processor started for Lounge_Cam: 226
[2022-10-18 15:38:29] frigate.app                    INFO    : Capture process started for Kitchen_Cam: 227
[2022-10-18 15:38:29] frigate.app                    INFO    : Capture process started for Entertainment_Room_Cam: 230
[2022-10-18 15:38:29] frigate.app                    INFO    : Capture process started for Lounge_Cam: 231
[2022-10-18 15:38:32] frigate.edgetpu                INFO    : TPU found
[2022-10-18 15:38:32] ws4py                          INFO    : Using epoll
[2022-10-18 15:38:49] watchdog.Lounge_Cam            INFO    : No frames received from Lounge_Cam in 20 seconds. Exiting ffmpeg...
[2022-10-18 15:38:49] watchdog.Lounge_Cam            INFO    : Waiting for ffmpeg to exit gracefully...
[2022-10-18 15:38:49] watchdog.Entertainment_Room_Cam INFO    : No frames received from Entertainment_Room_Cam in 20 seconds. Exiting ffmpeg...
[2022-10-18 15:38:49] watchdog.Entertainment_Room_Cam INFO    : Waiting for ffmpeg to exit gracefully...
[2022-10-18 15:38:49] watchdog.Kitchen_Cam           INFO    : No frames received from Kitchen_Cam in 20 seconds. Exiting ffmpeg...
[2022-10-18 15:38:49] watchdog.Kitchen_Cam           INFO    : Waiting for ffmpeg to exit gracefully...
[2022-10-18 15:39:19] watchdog.Lounge_Cam            INFO    : FFmpeg didnt exit. Force killing...
[2022-10-18 15:39:19] watchdog.Entertainment_Room_Cam INFO    : FFmpeg didnt exit. Force killing...
[2022-10-18 15:39:19] frigate.video                  ERROR   : Lounge_Cam: Unable to read frames from ffmpeg process.
[2022-10-18 15:39:19] frigate.video                  ERROR   : Lounge_Cam: Unable to read frames from ffmpeg process.
[2022-10-18 15:39:19] frigate.video                  ERROR   : Lounge_Cam: ffmpeg process is not running. exiting capture thread...
[2022-10-18 15:39:19] frigate.video                  ERROR   : Entertainment_Room_Cam: Unable to read frames from ffmpeg process.
[2022-10-18 15:39:19] frigate.video                  ERROR   : Entertainment_Room_Cam: ffmpeg process is not running. exiting capture thread...
[2022-10-18 15:39:19] watchdog.Kitchen_Cam           INFO    : FFmpeg didnt exit. Force killing...
[2022-10-18 15:39:19] frigate.video                  ERROR   : Kitchen_Cam: Unable to read frames from ffmpeg process.
[2022-10-18 15:39:19] frigate.video                  ERROR   : Kitchen_Cam: ffmpeg process is not running. exiting capture thread...
[2022-10-18 15:39:22] frigate.record                 WARNING : Discarding a corrupt recording segment: Lounge_Cam-20221018153830.mp4
[2022-10-18 15:39:22] frigate.record                 WARNING : Discarding a corrupt recording segment: Lounge_Cam-20221018153830.mp4
[2022-10-18 15:39:23] frigate.record                 WARNING : Discarding a corrupt recording segment: Lounge_Cam-20221018153830.mp4

FFprobe output from your camera

Unsure??

Operating system

HassOS

Install method

HassOS Addon

Network connection

Mixed

Camera make and model

Eufy Indoor Cam Pan&Tilt

Any other information that may be helpful

No response

@NickM-27 NickM-27 added the duplicate This issue or pull request already exists label Oct 18, 2022
@NickM-27
Copy link
Collaborator

Likely duplicate of #3780

@jamesawebb
Copy link

FWIW, I'm getting similar behaviour on amd64 hardware. I had pegged my release to the (working):stable-amd64 release which predates the current (broken for me) multi-arch :stable builds by ~7mo. There is a marked difference in ffmpeg versions between these:

:stable-amd64:
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04)

:stable:
ffmpeg version n5.1-2-g915ef932a3-20220731 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.1.0 (crosstool-NG 1.25.0.55_3defb7b)

I don't know if this helps, but figured more data points is probably useful.

@NickM-27
Copy link
Collaborator

@jamesawebb please make your own issue, this is a specific issue known on the RPi and amd64 is entirely unrelated / isn't affected by this.

@jamesawebb
Copy link

Understood. These are just data points for interested parties just in case the issue isn't limited to RPi.

@NickM-27
Copy link
Collaborator

NickM-27 commented Oct 19, 2022

Understood. These are just data points for interested parties just in case the issue isn't limited to RPi.

The issue has been confirmed by the RPi ffmpeg devs as an incompatibility with the new RPi kernel version, so it is exclusive to the RPi.

I recommend creating your own issue and answering the questions because without those data points there's 100s of reasons why hwaccel could be giving you trouble

@jamesawebb
Copy link

Gotcha. I didn't parse "likely duplicate" as an "issue confirmed by RPI ffmpeg devs". I'll open a separate issue as you suggest.

@Salvora
Copy link

Salvora commented Oct 22, 2022

Same issue here:
Raspberry Pi4 with Raspberry Pİ OS
Linux rpi 5.15.61-v8+ #1579 SMP PREEMPT Fri Aug 26 11:16:44 BST 2022 aarch64 GNU/Linux
frigate 0.11.1-2EADA21

@NickM-27
Copy link
Collaborator

@Salvora see #3780

@NickM-27
Copy link
Collaborator

closing this as duplicate

@NickM-27 NickM-27 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists support triage
Projects
None yet
Development

No branches or pull requests

4 participants