HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
scottlamb
moonfire-nvr
Rust2016–2025
scottlamb / moonfire-nvr

moonfire-nvr

Moonfire NVR, a security camera network video recorder

2Distinct people
32Mentions
0Explicit recommenders
1.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Moonfire NVR, a security camera network video recorder

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 10:01:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year32 dated mentions

Observed mentions: 2016-12-27 05:52:55 UTC to 2025-10-24 16:37:24 UTC.

02462016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC101
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC505
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC606
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC606
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC505
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

6 sources
I don't know who needs this kind of precision, especially on a Pi. But there's often a need to improve on the Pi's sucky out-of-the-box time experience. It doesn't have a battery-backed real-time clock. After a power outage, it will boot with time that's hours behind and then step the clock after the network becomes available. So a nice middle ground is to buy a separate RTC and attach it via the I2C GPIO pins. The modules are ~$10 including shipping. I wrote up the software setup recently here: https://github.com/scottlamb/moonfire-nvr/wiki/System-setup#...
In The Raspberry Pi as a Stratum-1 NTP Server (2012)
Yes, I have a Pi4 booting off a SSD on a USB-SATA bridge. No SD card installed. This graduated from beta about a year ago. [1] Btw, since you brought up USB: disable UAS [2] when using cheap USB-SATA bridges! UAS is regularly recommended for performance reasons, but I've gotten block-level errors (eg those below) and filesystem corruption with UAS multiple times and never with UAS disabled. I've seen enough similar reports on the Internet to think it's better to just disable UAS. Sep 22 17:26:01 nuc kernel: sd 4:0:0:1: [sdb] tag#2 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT Sep 22 17:26:01 nuc kernel: sd 4:0:0:1: [sdb] tag#2 CDB: Write(16) 8a 00 00 00 00 01 4d b4 c4 00 00 00 03 b0 00 00 The Linux kernel has explicitly disabled UAS for some of these chipsets, but clearly not all of the offending ones. I'm not sure what you'
Read the rest
d have to do to be confident your chipset is safe. I just don't think it's worth it. [1] https://github.com/raspberrypi/documentation/commit/bfef967d... [2] https://github.com/scottlamb/moonfire-nvr/wiki/System-setup#...
In Raspberry Pi OS now has SATA support built-in
You probably want to mount a weather-resistant camera outside. You could buy an eg Reolink security camera for this fairly cheaply. [1] Then you can stream the video to a Raspberry Pi 4 + Coral USB accelerator, an nVidia Jetson nano, or the like and do analysis there. [Edit: oh, I missed that the Vizy has an outdoor enclosure available. Still, it's extra $60 and is huge/ugly. The off-the-shelf IP camera + separate computer for analysis should be cheaper and IMHO better.] I'm working on a Free Software security camera NVR system. [2] I have a pretty solid core recording engine now and am just thinking about what the API for on-NVR analytics plugins should look like. I'm imagining a Python API where you write some coroutine that can iterate through decoded video frames (either live or backlogged) and make calls to your favorite ML framewor
Read the rest
ks; add events, object detection tracks, and other metadata to the database; instruct that MQTT messages be sent; etc. If you're interested in using this kind of thing, I'd love to talk more. [1] I used to recommend Dahua or Hikvision, but it seems they're actively supporting the Uyghur genocide via custom software, eg <https://www.latimes.com/business/technology/story/2021-02-09...>. I won't be buying any more cameras from them; I'm sure my boycott will devastate their business and cause them to reconsider their position immediately. As far as I know, Reolink is uninvolved, despite also being a Chinese company. [2] https://github.com/scottlamb/moonfire-nvr
In Vizy, an AI Camera for the Pi
I use it in a network video recorder. https://github.com/scottlamb/moonfire-nvr/blob/master/design... Data in a flat file would be much less efficient, and a SQL server (eg PostgreSQL) would be more for the administrator to deal with. SQLite's a nice sweet spot. I've thought about using a key/value database (either a BTree one like SQLite uses under the hood or a LSM one like RocksDB). It'd be faster and less total code. But SQLite's too convenient to give up. The SQL interface is nice for debugging in particular. And it's already plenty fast enough, so my time's better spent adding some glaring missing features and better UI.
In Cross-Database Queries in SQLite
failure [1] is still state-of-the-art, even though it's deprecated. It will get you backtraces (if RUST_BACKTRACE=1 is set), which nothing else will. I'm waiting until there are stable built-in backtraces [2] to switch to something else. I recently tweaked my application's failure reporting [3] to go from this embarrassing thing: E0211 073750.559 main moonfire_nvr] Sys(EROFS) to the more useful: E0211 111025.109 main moonfire_nvr] Exiting due to error: Failed to open dir /home/slamb/mymount/sample caused by: Unable to open meta file caused by: EROFS: Read-only file system (set environment variable RUST_BACKTRACE=1 to see backtraces) I should have thought long ago to advertise setting RUST_BACKTRACE=1 right in the error message, but better late than never. [1] https://crates.io/crates/failure [2] https://github.com/r
Read the rest
In Where Everything Went Wrong: Error Handling and Error Messages in Rust (2020)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.