Open-source project
scottlamb/moonfire-nvr avatar
scottlamb/moonfire-nvr

Moonfire NVR: H.264 Camera Recording Without Re-Encoding

Moonfire NVR, a security camera network video recorder

1,757 stars191 forksRustNOASSERTION

At a glance

What is it?
Moonfire NVR is a Rust-based network video recorder for IP cameras that provide H.264-over-RTSP streams. It stores encoded video on spinning disk, metadata in SQLite3, and can create MP4 files for selected time ranges without decoding frames.
Who is it for?
Adopt Moonfire NVR when your cameras provide H.264-over-RTSP and you want efficient local retention with flexible MP4 exports, especially on a Raspberry Pi or similar low-power machine. Do not choose it if you need built-in motion detection, TLS without an external proxy, a web-based configuration interface, or stable pre-1.0 storage compatibility.
Can I use it commercially?
Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
Is it still maintained?
Yes. The repository last received commits 19 days ago.
What is it written in?
Mainly Rust, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why Moonfire NVR Exists

Moonfire NVR addresses a specific gap between a security camera's existing encoded stream and a conventional recording workflow. Many IP cameras can already produce H.264 video, so a recorder does not need to decode frames, analyze them, or encode them again. Moonfire records those streams directly, which reduces the processing required on the recorder. The README states that it handles six 1080p/30fps streams on a Raspberry Pi 2 while using less than 10 percent of the machine's total CPU. This makes the project relevant to users running several cameras on inexpensive local hardware rather than a workstation with dedicated media processing.

The intended audience is a technically capable user who is willing to work with camera streams, local storage, configuration files, and command-line administration. It is not presented as a consumer appliance with a guided setup flow. Configuration is console-based, and the README explicitly points to guides for installation, building, security, troubleshooting, and the configuration file. The project is also aimed at preserving long camera histories on local disks. The README describes retaining both main and sub streams as a possible storage strategy, with the sub stream intended to be more suitable for remote viewing or computer vision because it may use lower resolution, compression quality, or frame rate.

Moonfire NVR's Recording and Export Path

Moonfire's storage design separates video from its supporting data. H.264 frames are saved into a directory on spinning disk. Other data goes into a SQLite3 database on flash. This division is central to the architecture: the video directory receives the camera's encoded data, while the database records the information needed to locate, organize, and export that data.

When a user selects a time range, Moonfire can construct an `.mp4` file on the fly. The README does not describe this as a conversion through an intermediate decoded stream. Instead, the project's stated design is to avoid decoding, analysis, and re-encoding. That distinction matters for CPU use and for preserving the camera's encoded representation. It also means Moonfire is not a general transcoding NVR. The README does not state that it accepts cameras using a codec other than H.264, nor does it describe automatic adaptation for cameras that provide Motion JPEG or another format.

The repository contains a `server/` directory, a `ui/` directory, and reference material for a JSON API and configuration file. That layout indicates separate server and interface components. The web interface currently consists primarily of a filterable list of video segments with trimming to arbitrary time ranges. There is no scrub bar, while a live view is described as experimental.

Camera Streams and Storage Choices

Moonfire is built around cameras that already provide encoded H.264 streams over RTSP. The README specifically points to cameras with a main stream and a sub stream. Main streams are described as full-sized, while sub streams may have lower resolution, compression quality, or frame rate. This gives an operator a choice between higher-detail recording and a smaller stream for remote access or future analytics.

The project does not decode video, which is why the chosen stream format has practical significance. If a camera's RTSP output is not compatible with the H.264-oriented recorder, the README does not offer a path through software transcoding. That makes camera validation a deployment requirement rather than a later optimization. The README links to the project wiki for hardware recommendations and notes on several camera models, but it does not specify individual camera compatibility rules.

Storage is also a deliberate part of the design. Video frames go to spinning disk, while SQLite3 data goes to flash. The project does not claim that SQLite3 is the video store, nor does it describe cloud storage as part of the core recorder. Users who expect remote, multi-site retention, or a managed service should not infer those capabilities from the local disk and database layout. The README does not document a cloud upload workflow.

The Web Interface Is Deliberately Small

Moonfire's current interface is basic by the project's own description. The documented web interface presents a filterable list of video segments and supports trimming a segment to arbitrary time ranges. It does not yet have a scrub bar. A live view exists, but the README labels it experimental. That combination suggests a tool centered on recorded segments and export selection rather than a complete surveillance console.

The interface does not replace camera administration or initial configuration. Moonfire has no web-based configuration UI, and configuration is handled through a console. Users who need operator accounts, polished playback controls, event timelines, or a browser-based setup wizard should check whether those features are important to their workflow. The README does not document user management, mobile applications, event notifications, or a complete playback timeline. It also does not mention motion detection as a current feature.

The UI source is under `ui/`, and the README links to `guide/developing-ui.md` for interface development. The JSON API is documented in `ref/api.md`, so automation can be considered where the documented API supports it. However, the README does not provide the API's endpoints or an example showing how to build an external console. It would be unsafe to treat the API as an unconstrained integration interface without reading `ref/api.md`.

Installation, Building, and First Use

The repository identifies the installation guide at `guide/install.md` and the source-building guide at `guide/build.md`. It also links to `guide/troubleshooting.md` for setup problems. The README does not include the actual package manager commands, service definitions, compiler versions, or configuration file content from those guides, so this article does not reproduce an invented installation procedure.

A first deployment must begin with the repository's own guides and reference files. The README identifies `ref/config.md` as the configuration file reference. It also links to `guide/secure.md` for securing Moonfire and exposing it to the Internet. Those documents are the appropriate places to verify the required runtime, service setup, credentials, network exposure, and camera stream parameters.

The first real use follows from the documented architecture: configure access to a camera's H.264-over-RTSP stream, start Moonfire using the procedure in `guide/install.md` or `guide/build.md`, allow recorded segments to accumulate, then select a time range in the web interface and trim it to an on-the-fly `.mp4`. The README does not give exact RTSP URLs, configuration keys, service names, or ports. It specifically states that a proxy server is needed for HTTPS/TLS, with details in `guide/secure.md`.

Moonfire NVR Limits, Security, and Upgrades

The most immediate limitation is feature coverage. Moonfire has no motion detection, no built-in HTTPS/TLS support, and no web-based configuration interface. Its web controls lack a scrub bar, and the live view is experimental. These are not minor setup details. They define which operational problems Moonfire solves and which it leaves to another component or another product.

The security boundary is equally explicit. The README says Internet exposure requires a proxy server and points to `guide/secure.md`. That means a deployment should not be treated as a complete public-facing secure video system based on the recorder alone. Authentication behavior, proxy configuration, and network controls are not described in the README, so they require confirmation in that guide.

Moonfire is pre-1.0, and the README says there are no compatibility guarantees. Configuration and storage formats may change between versions. An upgrade procedure exists at `guide/schema.md`, but the README warns that it is not simple. Operators should inspect that procedure and the release notes before upgrading a system with existing recordings. The project is not archived, and the last push was on 2026-10-04. The recent release history includes v0.7.33 on 2026-10-04, v0.7.32 on 2026-08-15, and v0.7.31 on 2026-03-13. The README identifies the licence as GPL-3.0-or-later with a GPL-3.0-linking-exception for OpenSSL. Licence obligations should be checked in `LICENSE.txt` for the actual distribution and modification context.

Moonfire NVR Compared with Transcoding Recorders

Moonfire's defining difference from a conventional transcoding NVR is that it expects the camera to provide H.264 and preserves that stream without decoding, analyzing, or re-encoding it. A recorder that decodes every camera frame and encodes it into a common output format can accept more varied inputs and apply transformations, but it requires substantially more media processing. Moonfire instead directs the camera's existing encoding work upstream and spends its own resources on recording and retrieval.

That approach fits cameras with useful main and sub streams and a local spinning disk. It does not fit a workflow whose primary requirement is codec normalization, motion detection, or a feature-rich browser console. A cloud-oriented video service may also be a closer fit when remote access and managed retention matter more than local ownership. The README does not document a direct comparison table or benchmark against those alternatives, so the relevant distinction is architectural: Moonfire is a low-processing local recorder for compatible H.264-over-RTSP cameras, not an all-format media processing platform.

Editorial conclusion

Adopt Moonfire NVR when your cameras provide H.264-over-RTSP and you want efficient local retention with flexible MP4 exports, especially on a Raspberry Pi or similar low-power machine. Do not choose it if you need built-in motion detection, TLS without an external proxy, a web-based configuration interface, or stable pre-1.0 storage compatibility. Check `guide/install.md`, `guide/build.md`, `ref/config.md`, and the camera compatibility notes in the repository wiki before deployment.

Frequently asked questions

Does Moonfire NVR decode or re-encode camera video?

No. The README states that Moonfire does not decode, analyze, or re-encode video frames, which is why it can use little CPU when recording compatible H.264 streams.

Can Moonfire NVR create MP4 files for a selected time range?

Yes. The documented interface can trim video segments to arbitrary time ranges, and the recorder can construct `.mp4` files on the fly.

Does Moonfire NVR support motion detection and HTTPS?

No motion detection is documented as a current feature. HTTPS/TLS is also unsupported by Moonfire itself, so the README directs users to a proxy server for secure Internet exposure.

Official sources

  1. Issues
  2. README
  3. Releases
  4. scottlamb/moonfire-nvr on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/scottlamb-moonfire-nvr.svg)](https://hysenlabs.com/projects/scottlamb-moonfire-nvr)

Was this useful?