-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
frigate: coral tpu support, audio model, nvidia ffmpeg hwaccel, other fixes #357717
Conversation
6af35a5
to
e574b20
Compare
d3d85e5
to
475a6c3
Compare
3fe3fe9
to
8cadbe5
Compare
8cadbe5
to
5967901
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nginx changes seem good to me. The gasket/edgetpu changes LGTM.
Can't comment on tensorflow/model/label or nvidia changes.
I haven't tested this PR but on my system I need the following for the PCIe Coral to work as described here users.groups.apex = {};
services.udev.extraRules = ''
SUBSYSTEM=="apex", MODE="0660", GROUP="apex"
'';
systemd.services.frigate.serviceConfig.SupplementaryGroups = "apex"; |
fe5a57f
to
3dcfff1
Compare
Okay, renamed the edgetpu module to @JManch Thanks for the pointer, I've integrated those changes. |
Sorry, I had originally commented on the wrong issue (#188719). @mweinelt I am happy to give this a try. It is pretty much exactly the fix I have been looking for! I have a flakes based system with a nixpkgs input pointed at nixpkgs-unstable. How would you suggest is the best way for me to try out your PR and report back? Do I need to somehow disable the existing nixpkgs frigate module? |
3e0eed6
to
7352b7b
Compare
This looks pretty good! I'll see if I can give it a try later today. It looks like it should be able to replace what I have already. https://github.com/GoogleBot42/nix-config/blob/eb6a50664cb3efbecde19cb9316a682cf64e983d/machines/storage/s0/frigate.nix#L143 |
7352b7b
to
0bb1e3e
Compare
Just tested my PCIe Coral with this PR and can confirm it works as expected! |
0bb1e3e
to
44fe653
Compare
Just as an extra small fix could this be replaced with something like: ExecStartPre = pkgs.writeShellScript "frigate-clear-cache" ''
rm -f /var/cache/frigate/*.mp4
''; Currently I get |
c6368d7
to
28b036f
Compare
Last call everyone! If you have further feedback, send it now. The plan is to merge this later tonight (in ~6 hours). |
Provides a small wrapper to enable support for Coral USB and PCIe devices.
Shell expansions apparently do not work correctly in systemd command lines. Co-Authored-By: Joshua Manchester <JManch@protonmail.com>
The `render` group is required to acces the graphic cards decoding, encoding and transcoding capabilities. It is required for using fancy `ffmpeg.hwaccel-args` values, like `preset-vaapi`.
In my testing this helped steer VA-API towards the correct card and also made it show GPU statistics in performance monitoring.
28b036f
to
591ebd3
Compare
@frederictobiasc I have been trying to test this with my coral USB and frigate but to no avail. Would it be possible for you to share the relevant parts of the configuration you used to test this PR? |
Actually, a reboot seemed to fix the issue and now it properly detects the usb tpu it seems. I am still new to frigate so not totally able to test the detection functionality itself yet, but this was a huge step! Thanks so much @mweinelt !!! |
Successfully created backport PR for |
Hey everyone, feel free to join #homeautomation:nixos.org on Matrix to stay connected. We talk a lot about Home Assistant, Frigate as well as Zigbee, Matter and Z-Wave in there. |
With NixOS#354952, the regular ffmpeg-headless should now have all the deps required for frigate to make use of hardware acceleration on all hardware. This is progress towards NixOS#271863 This reverts commit 7e33e47. This may be surprising as it's quite soon after 7e33e47 was merged but we decided in NixOS#357717 (comment) to merge it quickly to unbreak master and backport to 24.11. Non-full ffmpeg can be pursued in master using a simple revert which is where we are now.
Supersedes: #332689
Closes: #320512, #344114
cc @nagisa
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.