Fregata.app - Native macOS Port of Frigate NVR accelerated by Apple Silicon

Hi All,

I've been a Home Assistant user since 2016 (before HAOS even existed!). HA runs every part of my home and much of my life.

I've also been a fan and avid user of the excellent privacy-first local Frigate NVR (https://frigate.video if you're unfamiliar) that integrated perfectly with HA for tons of automations like turning on lights when people arrive (instead of dumb motion detectors), videoing wildlife, porch package notifications, knowing if the gate or garage door was left open via AI video classification, and tons more. Being able to automate your home based on what your cameras see has been a game changer.

For the last year or so I've been running Frigate as a docker container on my Mac Mini. While this setup worked, and was kind of energy efficient, CPU usage was high and it felt like I was leaving a LOT of the performance and benefits of Apple Silicon on the table.

As many of you know, Docker on Mac runs containers inside of a Linux VM, blocking container access to the Apple Neural Engine (ANE), GPU, and the hardware media decoding/encoding Media Engine. As well as adding VM overhead, this prevents Frigate running on docker from using any of that hardware for things like AI object detection, hardware accelerated video stream decoding/encoding, Frigate's AI Enrichments, and more.

Enter Fregata (Fregata is the scientific genus that frigatebirds belong to).

Fregata ports the runtime Frigate needs (think process supervisor, RAM disk management, environment variables, inter-process communication, shared memory, etc) that is normally provided by Docker into a native Mac .app, signed and notarized by Apple.

Additionally we added and maintain a Apple Core ML AI object detector written in Rust that uses the ANE and hardware-accelerated frame cropping, plus hundreds of other Frigate optimizations and tweaks specific to macOS.

Fregata is the runtime that RUNS a macOS-customized version of Frigate. We'll keep Fregata up to date with upstream Frigate releases.

All Frigate features work as usual (including Frigate+) and the full HA integration we all know and love, just massively accelerated by Apple Silicon.

The result is AI object detection inference times of 1-2ms on the ANE, stream decode/encode accelerated by Apple's Media Engine, GPU-accelerated Frigate enrichments, very minimal CPU usage, and the extreme energy efficiency of the Mac Mini (or any Apple Silicon Mac you have laying around).

We just exited Beta and published our first GA release (based on Frigate 0.17.1). The normal 30-day free trial has been extended through Oct 31 (5 months). After that, there is a $10 license fee to continue so my company can continue development and keep up with Frigate releases. We want it to be a product people can depend on, instead of a hobby.

Just for the HA community: If you can't afford a license, get in touch here via DM and we'll gladly help you out.

You can check it out at Fregata.app

Any and all user feedback is very welcome and happy to answer any questions you have. If you're a Mac user that runs Frigate, we think you'll be very pleased with Fregata, it's the fastest way to run Frigate with energy efficiency.

I really appreciate the bold part giving it a fair feeling - great work thanks for posting

Have just migrated from Frigate via docker to Fregata on my mac mini. I choose to begin from scratch and found the setup quite straight forward. Much easier than the docker setup, for me at least.

I ran into an issue setting my config folder on the NAS instead of the local drive and I am very happy with the support I received from the developer to help me sort through the issue. This will be taken into consideration for future installs.

So far performance has been great and I am very happy with the result. Also meant I could remove docker from my mac mini.

This is worth a look if you're running frigate on a mac.

Thank you for the extended trial. It will be very helpful to be able to gauge whether this is more useful and real-world performant versus Docker over a longer period of time. I hope one day you and blakeblackshear are able to unify your work together.

You’re very welcome @xilex. If you have any questions, need help, or just have suggestions on how we can improve, please reach out! You should see an immediate and extreme performance increase with Fregata over using Frigate in Docker.

We did speak with Blake before starting this project and he expressed that while he thought what we were building was very interesting, they had no plans to stop using Docker for Frigate nor create native versions for any platform.

Hi! Any chance the offer is still available? I’d love to try Fregata on my setup if you still have a spare license. Thanks!

Hi @Regalo,

Fregata trial is free until Oct 31. Give it a shot for the next 3 months and if you decide you want to keep using it just reach out as that date approaches and we’ll help out!

Thank you very much for developing Fregata and making it available! I discovered it today and have already set up my first camera, enabled license plate recognition and connected it to Home Assistant. It is really impressive how easily Frigate can now run natively on a Mac without Docker. The performance on Apple Silicon is also excellent so far.

I’m still testing and configuring everything, but my first impression is very positive. Great work, and thank you for offering such a long trial period!

Happy you’re enjoying it @Graaler! More performance improvements are coming soon, especially to the LPR pipeline that you’re using.

I’ve always had issues running Frigate on Windows(Nvidia RTX 3060) + Docker. Now I can use my Mac Mini. Testing so far is great. Performance is much better than my old setup.

Glad it’s working much better for your @ajbastien! If you use LPR/Semantic Search/Facial Recognition, even more huge performance improvements are coming to those in v0.17.2.5 and v0.18.0-beta3

Hey just checked out the app and it’s great!

I’m using it to proxy my ONVIF cameras to UniFi protect and using its mqtt bridge to generate events and send it as part of the ONVIF signals so it’s kind of like a AI Port from Ubiquiti. Working surprisingly well!

That’s a unique use case and setup @davidyang. Glad it’s working well for you! Let us know if you need anything.

It initially looked quite intimidating but the UI was quite intuitive once I started using it. Im currently trying to integrate with HA. So far, impressed with how easy it was to install and onboard the initial cameras, also got the license plate and face recognition to work asap. My mac runs cool despite having multiple cameras linked to it.

Hoping for a longer trial period :smiley: Trying to figure out HA soon and also implement some sort of smart notification.

Shoot us a DM!

I was never able to get Frigate detections working as a HA Plugin. I’ll give this a try with a spare MacBook I have. Anyone run it on a MacBook? Can they lid be closed?

Tons of users run Fregata on Macbook Pros, Airs, there are even 3 users running it on Macbook Neos.

You’ll just need to make sure you set the macOS settings to not sleep on lid close, or use a free app like Amphetamine to force the Mac to stay awake.

How much CPU or RAM usage would it take on my daughter’s M1 iMac.? Was thinking about sneaking this on to hers and let it run in the background. She doesn’t do anything really other than YouTube and Netflix on it. 16 GB memory M1 1tb drive. 4 4k cameras.

RAM is normally the bottleneck before CPU is with Fregata (if you want to use AI Enrichment features), so it’s good the machine has 16GB of RAM instead of 8GB. Fregata is highly optimized to use Apple’s Media Engine, Neural Engine, and GPU to keep CPU (and electricity!) usage as light as possible.

An M1 can run everything Fregata has to offer (again, as long as you have enough RAM free) and CPU usage will remain minimal.

I’m looking at a base M4 test machine with 6 cameras at 1520P each, almost every feature turned on and it’s currently using 5.2% of the machine’s CPU. An M1 will be higher than that since it’s CPU is slower, but it will be NOTHING like running a virtual machine, docker containers, etc.

For 4 cameras at 4K and the base feature set, if you can spare less than 10% CPU and 2-3 GB of RAM on the M1 that should be plenty. If you turn on some of the AI features (facial recognition, license plate recognition, semantic search), be prepared to use more RAM as the models for those features are kept in memory.

Please report back if you give it a try, we don’t have an M1 in our test fleet so my estimates are based on discussions with other users.

Is it possible to use MagicDNS/Tailscale to access Fregata on mobile networks? I have Nginx Proxy Manager working with SSL internally but once I leave my house, I can’t connect to Fregata. I have Tailscale connected on my phone and the Mac running Fregata.

I have MagicDNS and HTTPS enabled in Tailscale. Then run tailscale serve --set-path / https://localhost:8971 on the Mac running Fregata.