Enabling HW Video Accel on RPi 4b + Coral TPU #3677
-
I have been struggling to get hw video decode running on my RPi4b (8GB) + Coral Frigate setup... I read all the threads I could find, but have not been able to get things to work... Would cherish any guidance... Background
mqtt:
host: 192.168.100.234
port: 1883
topic_prefix: frigate
client_id: frigate
user: USER
password: PW
stats_interval: 60
detectors:
coral:
type: edgetpu
device: usb
cameras:
garage_front:
ffmpeg:
hwaccel_args:
- -c:v
- h264_v4l2m2m
inputs: # subtype =01 Main, 0 sub
- path: rtsp://XXXXXXXX@192.168.100.119:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
- rtmp
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: 640 # <---- update for your camera's resolution
height: 480 # <---- update for your camera's resolution
fps: 10
garage_back:
ffmpeg:
# hwaccel_args:
# - -c:v
# - h264_v4l2m2m
inputs: # subtype =01 Main, 0 sub
- path: rtsp://XXXXXXXX@192.168.100.145:554/cam/realmonitor?channel=1&subtype=0
roles:
- detect
- rtmp
rtmp:
enabled: False # <-- RTMP should be disabled if your stream is not H264
detect:
width: 640 # <---- update for your camera's resolution
height: 480 # <---- update for your camera's resolution
fps: 10
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 17 replies
-
Have you not updated the amount of gpu memory in the boot config? The logs are calling out the issue:
|
Beta Was this translation helpful? Give feedback.
-
I think just realized the issue, your config is using subtype 0 which is the main stream of amcrest not the substream. The main streams are too high resolution for the pi to decode |
Beta Was this translation helpful? Give feedback.
-
Whats the camera device? Are u sure you have a proper h264 stream (check with vlc or else and post a screenshot)? |
Beta Was this translation helpful? Give feedback.
-
What OS are you running? DietPi? |
Beta Was this translation helpful? Give feedback.
-
Possibly related #847 |
Beta Was this translation helpful? Give feedback.
-
I upgraded to HA 2022.8.7 and my error messages changed... HW accelerated decode is still not working, but I do get different error messages (see below)... I have not changed my frigate.yml from what I posted above, just upgraded HA... [2022-08-25 20:15:16] frigate.app INFO : Output process started: 217 |
Beta Was this translation helpful? Give feedback.
-
Update: After trying lots of different options, and searching the web, I have not found a reliable working description/configuration of anyone using hardware video decode from a RPi4 while running HAOS, and Frigate. So... I decided to buy a refurbished $200 Intel Gen 7 SFF (small form factor) PC and install HAOS on that, and use that for my Home Assistant + Frigate platform. I followed the Frigate docs and now have video decode running on the Intel CPU. I really wanted to RPI4 to work, but I have moved on. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to do something very similar on a 2GB Pi4 (64bit, docker, no HASS) and also can't get hardware accelerated decoding to work. Is the consensus that it's not possible? Perhaps this should be added to the documentation. |
Beta Was this translation helpful? Give feedback.
Update: After trying lots of different options, and searching the web, I have not found a reliable working description/configuration of anyone using hardware video decode from a RPi4 while running HAOS, and Frigate.
So... I decided to buy a refurbished $200 Intel Gen 7 SFF (small form factor) PC and install HAOS on that, and use that for my Home Assistant + Frigate platform. I followed the Frigate docs and now have video decode running on the Intel CPU. I really wanted to RPI4 to work, but I have moved on.