Can somebody please provide guidance to me (and the rest of us here) on how to install and configure a Coral Edge TPU (usb) running on a Fedora (40) box?
I’ve just strung 4 Reolink POE cameras. They’re all functioning brilliantly. For example, I can access them via my browser by entering each camera’s reserved IP address. I can also view their output when running VLC by entering:
rtsp://(ip_address)/Preview_01_main
I’m also able to access the cameras in Home Assistant using “picture-glance” Lovelace cards. Yet in Frigate, I cannot pick-up the feeds.
Yes, @tykeal, I have it running in a container. I believe that my installation problem is quite fundamental as the Edge TPU Runtime isn’t native on Fedora. Hence, I can’t install it. Indeed, there are instructions to build it on other systems but as, embarrasingly, this is beyond my feeble mind, I’m stuck.
What would be ideal is a hand-holding “cookbook recipe” describing the necessary steps to get this built and running on a Fedora box. I’m hoping that there might be somebody here who has jumped through these hoops already
I’m running Frigate as a container under podman on Fedora 40 right now with a USB Coral. There wasn’t anything I had to install in Fedora itself to get it pass through to the container assuming you’re using the. If you’re using a PCIe Coral, then yes, you’re going to have to deal with drivers and I unfortunately can’t help there since I’m not using that configuration.
I just had to make sure that the composition file I’m using had the following statement int:
I’ve added the code into my yaml.config but I was thrown an error message in the frigate config editor (no such error appears after I had initially entered the line in VS Code).
" Property services is not allowed.yaml-schema: FrigateConfig(0)
No quick fixes available"
services:
devices:
- /dev/bus/usb:/dev/bus/usb
detectors:
#cpu1:
# type: cpu
#cpu2:
# type: cpu
coral:
type: edgetpu
device: usb
Sorry, I’ve got a docker-compose.yaml file that I use for starting my container by way of podman-compose and then have the container configured as a podman service.
Assuming you’re using podman, you just need to dnf install podman-compose to do this. If you’re using docker itself, well the file is valid for it as well, but I’ve got no clue how to add the container as a system service as an aside you can’t use both podman and docker on the same system, they will fight for certain resources.
NOTE: I have not upgraded to frigate .14 yet and IIRC from reading some of the upgrade notes that will change how the config file needs to be brought in. I believe it just needs to be converted to rw instead of ro like I currently have it.
Here’s what I’ve got for my composition file which lives at /etc/containers/compose/frigate
---
version: "3.9"
services:
frigate:
container_name: frigate_container
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:0.13.2
# image: blakeblackshear/frigate:<specify_version_tag>
shm_size: "64mb" # update for your cameras based on calculation above
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# device_ids: ['0']
# count: 1
# capabilities: [gpu]
# yamllint disable rule:line-length
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
# # - /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
# - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
# yamllint enable rule:line-length
volumes:
- /etc/localtime:/etc/localtime:ro
# - /etc/containers/compose/frigate/config/:/config/
- storage:/media/frigate
- config:/config/
- /etc/containers/compose/frigate/config/frigate.yaml:/config/config.yml:ro
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
- "1984:1984" # go2rtc
- "1935:1935" # RTMP feeds
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC feed tcp
- "8555:8555/udp" # WebRTC feed udp
environment:
FRIGATE_RTSP_PASSWORD: "REDACTED"
volumes:
storage:
config:
My frigate_container.service systemd file look like this and it lives at /etc/systemd/system
[Unit]
Description=Podman container-frigate_container.service
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
RemainAfterExit=true
WorkingDirectory=/etc/containers/compose/frigate
ExecStart=/bin/podman-compose up -d --remove-orphans
ExecStop=/bin/podman-compose down
Type=oneshot
[Install]
WantedBy=multi-user.target
Ah yes, of course, it goes into docker-compose.yaml!
Coincidentally, I already had it there. This is unfortunate as I was hoping that being able to run with the Coral TPU would finally have frigate operating properly for me. Yeah, there seems to be a deeper problem here…
Although my cameras output everywhere else including
picture-entity lovelace cards
rstsp output in VLC
on the go2rtc browser GUI
I cannot get any feed into the frigate browser gui (yet my cameras appear there and I’m able to edit the config within).
I’ll now try to muddle my way through the error logs…
Nope. No joy. Although there are a number of what appear to be glaring errors, they’ve not helped me to track down the root issue
The most troubling are the ones which state: “… ffmpeg process is not running. exiting capture thread… …No route to host… …Unable to read frames from ffmpeg process…” (Yes, ffmpeg is installed!).
Hoping that I’m not pushing my luck, here are the error logs as well as my config files for a kind soul’s viewing pleasure…
2024-10-24 19:01:41.116360062 [2024-10-24 19:01:41] ffmpeg.sideback-rlc-833a.detect ERROR : [tcp @ 0x55b00f4ed180] Connection to tcp://10.57.8.58:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:41.116462879 [2024-10-24 19:01:41] ffmpeg.sideback-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.58:554/h264Preview_01_main: No route to host
2024-10-24 19:01:41.127567355 [2024-10-24 19:01:41] frigate.video ERROR : sideback-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:01:41.127755835 [2024-10-24 19:01:41] frigate.video ERROR : sideback-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:41.156172810 [2024-10-24 19:01:41] watchdog.doorbell ERROR : Ffmpeg process crashed unexpectedly for doorbell.
2024-10-24 19:01:41.156392284 [2024-10-24 19:01:41] watchdog.doorbell ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:41.156413120 [2024-10-24 19:01:41] ffmpeg.doorbell.detect ERROR : [tcp @ 0x55d0fba45180] Connection to tcp://10.57.8.56:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:41.156558714 [2024-10-24 19:01:41] ffmpeg.doorbell.detect ERROR : rtsp://*:*@10.57.8.56:554/h264Preview_01_main: No route to host
2024-10-24 19:01:41.172573690 [2024-10-24 19:01:41] frigate.video ERROR : doorbell: Unable to read frames from ffmpeg process.
2024-10-24 19:01:41.172737744 [2024-10-24 19:01:41] frigate.video ERROR : doorbell: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:41.180484299 [2024-10-24 19:01:41] watchdog.back-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for back-rlc-833a.
2024-10-24 19:01:41.180633767 [2024-10-24 19:01:41] watchdog.back-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:41.180728934 [2024-10-24 19:01:41] ffmpeg.back-rlc-833a.detect ERROR : [tcp @ 0x55eacce5d180] Connection to tcp://10.57.8.57:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:41.180859696 [2024-10-24 19:01:41] ffmpeg.back-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.57:554/h264Preview_01_main: No route to host
2024-10-24 19:01:41.195633969 [2024-10-24 19:01:41] frigate.video ERROR : back-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:01:41.195741986 [2024-10-24 19:01:41] frigate.video ERROR : back-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:51.110038794 [2024-10-24 19:01:51] watchdog.front-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for front-rlc-833a.
2024-10-24 19:01:51.110328357 [2024-10-24 19:01:51] watchdog.front-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:51.110350870 [2024-10-24 19:01:51] ffmpeg.front-rlc-833a.detect ERROR : [tcp @ 0x560ab54ab180] Connection to tcp://10.57.8.59:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:51.110502463 [2024-10-24 19:01:51] ffmpeg.front-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.59:554/h264Preview_01_main: No route to host
2024-10-24 19:01:51.123232324 [2024-10-24 19:01:51] watchdog.sideback-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for sideback-rlc-833a.
2024-10-24 19:01:51.125097589 [2024-10-24 19:01:51] watchdog.sideback-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:51.125112010 [2024-10-24 19:01:51] ffmpeg.sideback-rlc-833a.detect ERROR : [tcp @ 0x55fe6ddf6180] Connection to tcp://10.57.8.58:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:51.125114863 [2024-10-24 19:01:51] ffmpeg.sideback-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.58:554/h264Preview_01_main: No route to host
2024-10-24 19:01:51.130949034 [2024-10-24 19:01:51] frigate.video ERROR : front-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:01:51.131225004 [2024-10-24 19:01:51] frigate.video ERROR : front-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:51.143490698 [2024-10-24 19:01:51] frigate.video ERROR : sideback-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:01:51.143620540 [2024-10-24 19:01:51] frigate.video ERROR : sideback-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:51.174478512 [2024-10-24 19:01:51] watchdog.doorbell ERROR : Ffmpeg process crashed unexpectedly for doorbell.
2024-10-24 19:01:51.174484248 [2024-10-24 19:01:51] watchdog.doorbell ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:51.174841050 [2024-10-24 19:01:51] ffmpeg.doorbell.detect ERROR : [tcp @ 0x55c1c8a24180] Connection to tcp://10.57.8.56:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:51.174844726 [2024-10-24 19:01:51] ffmpeg.doorbell.detect ERROR : rtsp://*:*@10.57.8.56:554/h264Preview_01_main: No route to host
2024-10-24 19:01:51.185440497 [2024-10-24 19:01:51] frigate.video ERROR : doorbell: Unable to read frames from ffmpeg process.
2024-10-24 19:01:51.185611522 [2024-10-24 19:01:51] frigate.video ERROR : doorbell: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:01:51.193351923 [2024-10-24 19:01:51] watchdog.back-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for back-rlc-833a.
2024-10-24 19:01:51.193357247 [2024-10-24 19:01:51] watchdog.back-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:01:51.193359688 [2024-10-24 19:01:51] ffmpeg.back-rlc-833a.detect ERROR : [tcp @ 0x55905628a180] Connection to tcp://10.57.8.57:554?timeout=5000000 failed: No route to host
2024-10-24 19:01:51.193361582 [2024-10-24 19:01:51] ffmpeg.back-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.57:554/h264Preview_01_main: No route to host
2024-10-24 19:01:51.209225276 [2024-10-24 19:01:51] frigate.video ERROR : back-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:01:51.209396273 [2024-10-24 19:01:51] frigate.video ERROR : back-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:02:01.126055528 [2024-10-24 19:02:01] watchdog.front-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for front-rlc-833a.
2024-10-24 19:02:01.126063412 [2024-10-24 19:02:01] watchdog.front-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:02:01.126067715 [2024-10-24 19:02:01] ffmpeg.front-rlc-833a.detect ERROR : [tcp @ 0x558eeda2f180] Connection to tcp://10.57.8.59:554?timeout=5000000 failed: No route to host
2024-10-24 19:02:01.126071313 [2024-10-24 19:02:01] ffmpeg.front-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.59:554/h264Preview_01_main: No route to host
2024-10-24 19:02:01.139238651 [2024-10-24 19:02:01] watchdog.sideback-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for sideback-rlc-833a.
2024-10-24 19:02:01.139245699 [2024-10-24 19:02:01] watchdog.sideback-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:02:01.139249120 [2024-10-24 19:02:01] ffmpeg.sideback-rlc-833a.detect ERROR : [tcp @ 0x55ba44efb180] Connection to tcp://10.57.8.58:554?timeout=5000000 failed: No route to host
2024-10-24 19:02:01.139252185 [2024-10-24 19:02:01] ffmpeg.sideback-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.58:554/h264Preview_01_main: No route to host
2024-10-24 19:02:01.145208502 [2024-10-24 19:02:01] frigate.video ERROR : front-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:02:01.145213758 [2024-10-24 19:02:01] frigate.video ERROR : front-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:02:01.157930483 [2024-10-24 19:02:01] frigate.video ERROR : sideback-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:02:01.158091737 [2024-10-24 19:02:01] frigate.video ERROR : sideback-rlc-833a: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:02:01.181322319 [2024-10-24 19:02:01] watchdog.doorbell ERROR : Ffmpeg process crashed unexpectedly for doorbell.
2024-10-24 19:02:01.181453960 [2024-10-24 19:02:01] watchdog.doorbell ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:02:01.181609484 [2024-10-24 19:02:01] ffmpeg.doorbell.detect ERROR : [tcp @ 0x560a644d7180] Connection to tcp://10.57.8.56:554?timeout=5000000 failed: No route to host
2024-10-24 19:02:01.181731049 [2024-10-24 19:02:01] ffmpeg.doorbell.detect ERROR : rtsp://*:*@10.57.8.56:554/h264Preview_01_main: No route to host
2024-10-24 19:02:01.197296480 [2024-10-24 19:02:01] frigate.video ERROR : doorbell: Unable to read frames from ffmpeg process.
2024-10-24 19:02:01.197480326 [2024-10-24 19:02:01] frigate.video ERROR : doorbell: ffmpeg process is not running. exiting capture thread...
2024-10-24 19:02:01.205292050 [2024-10-24 19:02:01] watchdog.back-rlc-833a ERROR : Ffmpeg process crashed unexpectedly for back-rlc-833a.
2024-10-24 19:02:01.205502883 [2024-10-24 19:02:01] watchdog.back-rlc-833a ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2024-10-24 19:02:01.205519470 [2024-10-24 19:02:01] ffmpeg.back-rlc-833a.detect ERROR : [tcp @ 0x564eaf7e5180] Connection to tcp://10.57.8.57:554?timeout=5000000 failed: No route to host
2024-10-24 19:02:01.205682583 [2024-10-24 19:02:01] ffmpeg.back-rlc-833a.detect ERROR : rtsp://*:*@10.57.8.57:554/h264Preview_01_main: No route to host
2024-10-24 19:02:01.220648216 [2024-10-24 19:02:01] frigate.video ERROR : back-rlc-833a: Unable to read frames from ffmpeg process.
2024-10-24 19:02:01.220770168 [2024-10-24 19:02:01] frigate.video ERROR : back-rlc-833a: ffmpeg process is not running. exiting capture thread...
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "256mb" # update for your cameras based on calculation above
devices:
- /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
# - /dev/apex_0:/dev/apex_0 # Passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
# - /dev/video11:/dev/video11 # For Raspberry Pi 4B
# - /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/homeassistant/config/frigate.yaml:/config/config.yaml
- /mnt/hvSSD/Frigate:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_PASSWORD: !secret /homeasistant/config/secrets.yaml/frigate_password
Your logs tell me that it’s not able to connect to any of the cameras. Are you sure that the information for your cameras at 10.57.8.57 and 10.57.8.59 are correct?
Yup, @tykeal, that’s what they tell me as well. However, I’ve no idea why since these IP addresses clearly result in outputs by various other means including Lovelace cards, go2RTC browser gui, Reolink browser gui, Reolink app and VLC.
It’s got me flumoxed. And, unfortunately, at a standstill.
Since my problem seems to be much more fundamantal than having thought that my Coral TPU hadn’t been installed properly, I’m creating a new issue in which I hope that somebody can point me in the right direction to get a basic config running.
This issue is sorted, @tykeal. Thanks for your input. Whereas the IP addresses were indeed correct, my container wasn’t speaking to its outside world. I had to change the network setting from Default (bridged) to host.