-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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 <[email protected]>
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.
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-24.11
git worktree add -d .worktree/backport-357717-to-release-24.11 origin/release-24.11
cd .worktree/backport-357717-to-release-24.11
git switch --create backport-357717-to-release-24.11
git cherry-pick -x aa0a26280dbc13f7fd02b4b30b1629720dd532b4 2b2a669741df5025854714a9bb4ee61b02aef682 b96c4a67b9b8438039bb109b88cf03e7429dc27d d31bf00e2baf9144de90e24a508b3bec79bbcd26 4abc3dfc2811e49e4f79c874cba7460b0e22fc60 7e33e470df5dcbb9c84d6a08a1128953c4281e17 81001625a7a756dbfc50fbe5ae75d52b26c93e3f a810c07ff275612177aa5aed5bf37ec7658577de 2b56a916ca59813eb73fd12ba42d8c335f21b4ef 7411b8562915f37d5dec7127b89cf34aabcc1424 1c07d92099551535ed7f74d64c87aca4a6c6514b 591ebd39fb053579566ffe15519c71a4e29b0788 |
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.