frigate: [HW Accel Support]: hwaccel not working on raspi/hassos with latest beta
Describe the problem you are having
Does not support hwaccel_args
with a raspberry pi 4 using latest version of HassOS. Works fine if hwaccel is not used.
Tried both of the following:
hwaccel_args: -c:v h264_v4l2m2m
hwaccel_args: preset-rpi-64-h264
Version
0.12.0-beta9
Frigate config file
detectors:
coral:
type: edgetpu
device: usb
# num_threads: 3
ffmpeg:
# hwaccel_args: -c:v h264_v4l2m2m
hwaccel_args: preset-rpi-64-h264
mqtt:
# Required: host name
host: ha.localdomain
# Optional: port (default: shown below)
port: 1883
# Optional: topic prefix (default: shown below)
# WARNING: must be unique if you are running multiple instances
topic_prefix: frigate
# Optional: client id (default: shown below)
# WARNING: must be unique if you are running multiple instances
client_id: frigate
# Optional: user
user: cameras
# Optional: password
# NOTE: Environment variables that begin with 'FRIGATE_' may be referenced in {}.
# eg. password: '{FRIGATE_MQTT_PASSWORD}'
password: ###########
# Optional: interval in seconds for publishing stats (default: shown below)
stats_interval: 60
objects:
track:
- person
- bicycle
- dog
- cat
record:
enabled: True
## Minutes
expire_interval: 60
retain:
days: 2
mode: all
events:
# Optional: Number of seconds before the event to include (default: shown below)
pre_capture: 5
# Optional: Number of seconds after the event to include (default: shown below)
post_capture: 5
# Optional: Objects to save recordings for. (default: all tracked objects)
objects:
- person
- bicycle
- dog
- cat
# Optional: Restrict recordings to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Retention settings for recordings of events
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Mode for retention. (default: shown below)
# all - save all recording segments for events regardless of activity
# motion - save all recordings segments for events with any detected motion
# active_objects - save all recording segments for event with active/moving objects
#
# NOTE: If the retain mode for the camera is more restrictive than the mode configured
# here, the segments will already be gone by the time this mode is applied.
# For example, if the camera retain mode is "motion", the segments without motion are
# never stored, so setting the mode to "all" here won't bring them back.
mode: motion
# Optional: Per object retention days
objects:
person: 30
birdseye:
enabled: True
mode: continuous
cameras:
gate:
ffmpeg:
# hwaccel_args: -c:v h264_v4l2m2m
inputs:
- path: rtsp://######:#######@10.0.0.15/11
roles:
- detect
- rtmp
snapshots:
# Optional: Enable writing jpg snapshot to /media/frigate/clips (default: shown below)
# This value can be set via MQTT and will be updated in startup based on retained value
enabled: True
# Optional: print a timestamp on the snapshots (default: shown below)
timestamp: False
# Optional: draw bounding box on the snapshots (default: shown below)
bounding_box: False
# Optional: crop the snapshot (default: shown below)
crop: False
# # Optional: height to resize the snapshot to (default: original size)
# height: 175
# Optional: Restrict snapshots to objects that entered any of the listed zones (default: no required zones)
required_zones: []
# Optional: Camera override for retention settings (default: global values)
retain:
# Required: Default retention days (default: shown below)
default: 10
# Optional: Per object retention days
objects:
person: 15
docker-compose file or Docker CLI command
Unsure how to determine this - it is started as a Home Assistant add-on.
Relevant log output
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
s6-rc: info: service go2rtc-healthcheck successfully started
2023-03-09 01:24:27.824332658 [INFO] Preparing go2rtc config...
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
2023-03-09 01:24:27.849920712 [INFO] Starting Frigate...
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
2023-03-09 01:24:27.921009327 [INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
2023-03-09 01:24:28.193189598 [INFO] Got IP address from supervisor: 10.0.0.234
2023-03-09 01:24:28.450634351 [INFO] Got WebRTC port from supervisor: 8555
2023-03-09 01:24:30.054898590 [INFO] Starting go2rtc...
2023-03-09 01:24:30.298191155 17:24:30.297 INF go2rtc version 1.2.0 linux/arm64
2023-03-09 01:24:30.300422983 17:24:30.300 INF [api] listen addr=:1984
2023-03-09 01:24:30.302560663 17:24:30.302 INF [rtsp] listen addr=:8554
2023-03-09 01:24:30.304715491 17:24:30.304 INF [srtp] listen addr=:8443
2023-03-09 01:24:30.306943873 17:24:30.306 INF [webrtc] listen addr=:8555
2023-03-09 01:24:34.298680920 [2023-03-08 17:24:34] frigate.app INFO : Starting Frigate (0.12.0-e8d8cc4)
2023-03-09 01:24:34.396001930 [2023-03-08 17:24:34] frigate.app INFO : Creating directory: /tmp/cache
2023-03-09 01:24:34.404568915 [2023-03-08 17:24:34] peewee_migrate INFO : Starting migrations
2023-03-09 01:24:34.428230781 [2023-03-08 17:24:34] peewee_migrate INFO : There is nothing to migrate
2023-03-09 01:24:34.490037511 [2023-03-08 17:24:34] detector.coral INFO : Starting detection process: 300
2023-03-09 01:24:34.500309941 [2023-03-08 17:24:34] frigate.app INFO : Output process started: 301
2023-03-09 01:24:34.510795833 [2023-03-08 17:24:34] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2023-03-09 01:24:37.849342377 [INFO] Starting go2rtc healthcheck service...
2023-03-09 01:24:39.807502673 172.30.32.2 - - [08/Mar/2023:17:24:39 -0800] "GET // HTTP/1.1" 200 6700 "https://ha.xxxx.com/ccab4aaf_frigate-fa-beta" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:39.926790361 172.30.32.2 - - [08/Mar/2023:17:24:39 -0800] "GET /api/config HTTP/1.1" 200 5108 "https://ha.xxxx.com/api/hassio_ingress/odoiQJme8b3gubu8rjrLnfq7NRE-OaEl_fl_e7EgUK8//" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:40.295059071 172.30.32.2 - - [08/Mar/2023:17:24:40 -0800] "GET //api/gate/latest.jpg?h=322 HTTP/1.1" 200 8305 "https://ha.xxxx.com/api/hassio_ingress/odoiQJme8b3gubu8rjrLnfq7NRE-OaEl_fl_e7EgUK8//" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:41.618899485 [2023-03-08 17:24:34] frigate.app INFO : Camera processor started for gate: 304
2023-03-09 01:24:41.618913707 [2023-03-08 17:24:34] frigate.app INFO : Capture process started for gate: 307
2023-03-09 01:24:41.643410553 [2023-03-08 17:24:41] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2023-03-09 01:24:44.821354271 172.30.32.2 - - [08/Mar/2023:17:24:44 -0800] "GET /api/config HTTP/1.1" 200 5108 "https://ha.xxxx.com/api/hassio_ingress/odoiQJme8b3gubu8rjrLnfq7NRE-OaEl_fl_e7EgUK8//" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:45.076250185 172.30.32.2 - - [08/Mar/2023:17:24:45 -0800] "GET /api/logs/frigate HTTP/1.1" 200 418 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:45.088512447 172.30.32.2 - - [08/Mar/2023:17:24:45 -0800] "GET /api/logs/go2rtc HTTP/1.1" 200 340 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:45.093942751 172.30.32.2 - - [08/Mar/2023:17:24:45 -0800] "GET /api/logs/nginx HTTP/1.1" 200 437 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:54.416736511 172.30.32.2 - - [08/Mar/2023:17:24:54 -0800] "GET /api/config HTTP/1.1" 200 5108 "https://ha.xxxx.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:54.514738514 172.30.32.2 - - [08/Mar/2023:17:24:54 -0800] "GET /api/logs/go2rtc HTTP/1.1" 200 340 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:54.532593521 172.30.32.2 - - [08/Mar/2023:17:24:54 -0800] "GET /api/logs/frigate HTTP/1.1" 200 418 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:54.542240056 172.30.32.2 - - [08/Mar/2023:17:24:54 -0800] "GET /api/logs/nginx HTTP/1.1" 200 519 "https://ha.xxxx.com/logs" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:24:59.129447646 172.30.32.2 - - [08/Mar/2023:17:24:59 -0800] "GET /ws HTTP/1.1" 101 37 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0" "10.0.0.100, 10.0.0.1, 172.30.32.1"
2023-03-09 01:25:00.926116178 [2023-03-08 17:25:00] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:00.926148900 [2023-03-08 17:25:00] frigate.video ERROR : gate: ffmpeg process is not running. exiting capture thread...
2023-03-09 01:25:04.641845371 [2023-03-08 17:25:04] watchdog.gate ERROR : Ffmpeg process crashed unexpectedly for gate.
2023-03-09 01:25:04.646166007 [2023-03-08 17:25:04] watchdog.gate ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-03-09 01:25:04.646186229 [2023-03-08 17:25:04] ffmpeg.gate.detect ERROR : Guessed Channel Layout for Input Stream #0.1 : mono
2023-03-09 01:25:04.646210488 [2023-03-08 17:25:04] ffmpeg.gate.detect ERROR : [segment @ 0x55cabc7dd0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
2023-03-09 01:25:26.449576030 [2023-03-08 17:25:26] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:26.449590659 [2023-03-08 17:25:26] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:26.449594585 [2023-03-08 17:25:26] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:26.454030299 [2023-03-08 17:25:26] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:26.461852936 [2023-03-08 17:25:26] frigate.video ERROR : gate: Unable to read frames from ffmpeg process.
2023-03-09 01:25:26.461868788 [2023-03-08 17:25:26] frigate.video ERROR : gate: ffmpeg process is not running. exiting capture thread...
FFprobe output from your camera
Input #0, rtsp, from 'rtsp://####:####@10.0.0.15/11':
Metadata:
title : 10
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuvj420p(pc, bt470bg/bt470bg/bt709, progressive), 1920x1080, 20 fps, 20 tbr, 90k tbn, 180k tbc
Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s
Operating system
HassOS
Install method
HassOS Addon
Network connection
Wired
Camera make and model
ieGeek/IPCAM 1080p outdoor security camera, C6F0SgZ3N0P9L2
Any other information that may be helpful
uname -a
:
Linux a0d7b954-ssh 5.15.84-v8 #1 SMP PREEMPT Tue Jan 24 22:21:20 UTC 2023 aarch64 Linux
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24 (6 by maintainers)
@elgorro you have put the hwaccel preset in the wrong place then and it does not recognize it