LazyNVR: a different approach in hosting IP webcams (codeberg.org)
from Shimitar@downonthestreet.eu to selfhosted@lemmy.world on 21 May 07:38
https://downonthestreet.eu/post/663452

Hi all! i finally come around publishing a small side project i am running at my home for the last few years. This past month i have revamped it by rewriting the C++ backend and improving the web UI (single page HTML+CSS+AlpineJS) for a broader public.

LazyNVR is a different take on hosting webcams and centralizing access to them. Instead of working on the cameras feed, which is CPU/GPU heavy and doesn’t scale much, it relies on cameras on-board capabilities to detect motion and upload recorded videos to your own server.

If you own IP cameras from brands like Dahua, Reolink and many others, you can leverage their on board motion detection capabilities and off-load your server computational power using LazyNVR.

I have some 15 cameras and tools like Frigate or MotionEye just kill my server CPU, but all my cameras can detect motions and automatically record a video and upload it to my server using different protocols (like FTP, sftp, and such). So LazyNVR was born.

The server is written in C++ and basically detect incoming videos, recode (without re-encoding) them to an MP4 web streammable format, and store them well sorted. It will also keep your incoming folders clean and purge stored videos when they are too old. The server will also fetch and refresh still live images from the cameras.

The client is a WEB GUI, actually a single HTML file with CSS and some AlpineJS, which will show the still live images and the list of all the recorded videos letting you download or view them directly.

I am running over 15 cameras from my RaspPi with basically 0% CPU overhead.

I have published LazyNVR on Codeberg (here codeberg.org/LazyNVR/lazynvr-sources) because well, i think it’s better than GitHub. And there is also a pretty lazy web site on www.lazynvr.it (which mostly redirect to Codeberg).

Currently there are docker images for AMD64 and ARM64, but it’s pretty easy to compile directly, with the provided instructions in the Codeberg Wiki.

Please, feel free to try it!

Mandatory AI disclaimer: i don’t use AI for coding. Zero code (C++ or Javscript) has been written by or with AI support in this project. I have used AI extensively for the CSS stuff that i hate, but reviewed and mostly edited it anyway. I have also used AI for research and to write the dockerfile faster, since i am no docker expert. I have personally written the dockerfile anyway, and personally tested as well. The logo has been created with AI, probably it shows.

#selfhosted

threaded - newest

irmadlad@lemmy.world on 21 May 08:31 next collapse

Mandatory AI disclaimer

At least you are upfront about it, and I certainly do appreciate the honesty.

Shimitar@downonthestreet.eu on 21 May 10:18 collapse

AI is pretty useful tool if used properly. But given how much it’s abused with slop and vibe coding, I prefer to be upfront.

Overall AI is a revamped stack exchange search on steroids. But you really cannot trust even the smallest snippet of code it writes

irmadlad@lemmy.world on 21 May 13:05 collapse

AI is pretty useful tool if used properly

It is, however we desperately need some heavy governmental regulation as much as I rail against over regulation. If AI entities are not willing to police themselves, then government should step in.

Shimitar@downonthestreet.eu on 21 May 13:21 collapse

Yes there will be regulations and laws on AI and it’s use, it’s a matter of time. Technology usually comes first, and it’s regulations come afterward…

It’s too soon at this time. And I have absolutely no hope that companies are capable to regulate themselves.

gingerman@piefed.ca on 21 May 08:35 next collapse

This looks like a great fit for my setup. I’ll be testing it out over the weekend

Shimitar@downonthestreet.eu on 21 May 10:19 collapse

Keep me posted. Open tickets on codeberg, pm me… Whatever … So far it’s been running solid on my home, bit that’s mostly it, I need feedback! And improvement suggestions.

ReedReads@lemmy.zip on 21 May 08:43 next collapse

This is a great project. Read the docs. You mention Authelia a couple of times as a viable auth method. It would be nice if you gave an example of, say, a Traefik + Authelia config with LazyNVR (I’m assuming you don’t support Authelia’s OIDC implementation).

I’m definitely going to try this out. Thanks for sharing!

Shimitar@downonthestreet.eu on 21 May 10:22 collapse

I don’t use traefik, but if you can suggest a setup I will gladly post it on the wiki… I use nginx and I have posted my setup as reverse proxy.

As for authelia, I can post my setup for that s well. No OIDC, just a simple nginx link to authelia to input password and username. Maybe you can open a ticket on codeberg so I don’t forget?

DevoidWisdom@sh.itjust.works on 21 May 08:47 next collapse

Omg! This might just be the thing I didnt know I needed.

Ya. Good job on the Ai disclosure.

*edit. I’ll be installing this later today after reading the github.

Shimitar@downonthestreet.eu on 21 May 10:22 collapse

Cool! Keep me posted … Via codeberg itself or pm me here, or this thread whatever works for you

I want feedback!

[deleted] on 21 May 09:13 next collapse

.

eodur@piefed.social on 21 May 09:18 next collapse

Sounds like this could pretty easily be run alongside Frigate for testing. I’ll have to check it out!

Shimitar@downonthestreet.eu on 21 May 10:24 collapse

Yes indeed if your camera have motion detection embedded, it will work.

I tested frigate but after two cameras or so my small server CPU was hammered. This solution works for my 15 cameras with almost zero CPU impact.

I assume frigate can do a much better motion detection and filtering tough.

Decronym@lemmy.decronym.xyz on 21 May 10:30 next collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
HTTP Hypertext Transfer Protocol, the Web
IP Internet Protocol
PoE Power over Ethernet
nginx Popular HTTP server

2 acronyms in this thread; the most compressed thread commented on today has 8 acronyms.

[Thread #305 for this comm, first seen 21st May 2026, 17:30] [FAQ] [Full list] [Contact] [Source code]

amateurcrastinator@lemmy.world on 21 May 14:08 next collapse

It does not look it will work with my cameras… I have the imou bullet something cheap. Only way to view the recordings is with the app I think… Same with tapo ones. Frigate manages to handle them but as you say it comes with a high price

Shimitar@downonthestreet.eu on 21 May 21:49 collapse

Never had imou or tapo. But if they provide at least an url for live stills you can athe very least display them in the web GUI bot not collect recordings…

tobz619@lemmy.world on 21 May 15:45 next collapse

Couldn’t have come at a better time for me! Great work and thank you :)

non_burglar@lemmy.world on 21 May 16:55 next collapse

Most cameras do not do the heavy lifting of face/person detection on hardware, they send the streams to some cloud for processing. Just be aware of that.

Shimitar@downonthestreet.eu on 21 May 21:52 collapse

Not the ones I have … Maybe they are just too old (3-6 years) but they live separated from internet. So I am pretty sure of that.

Well, they probably don’t do face detection at all actually …

scrchngwsl@feddit.uk on 22 May 02:54 collapse

So if i want to set up my Eufy camera for use with this, it would need to be able to upload to a remote network drive or FTP folder? I’m pretty sure mine does on-device motion detection, which then records the footage to an sdcard in the device. I’m not sure I can get it to write to FTP though. Will have a play around.

Either way this is a good solution. I used to use frigate and I actually bought a Coral TPU unit to offload the motion detection. This massively reduced CPU usage, but it is still adds a noticeable (~3-8w) increase to total power consumption. It would be nice to use the on-board capabilities of the hardware itself.

Shimitar@downonthestreet.eu on 22 May 03:43 collapse

Yes this is exactly the point behind LazyNVR… reduce power usage of the server, and CPU, since the load can already be supported by the camera itself.

If the camera can only record on local storage, you can still use LazyNVR but you would need to manually dump the SD card content to the server… Ftp or any other network transfer is much more practical tough