construction site surveilance: some updates
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 40 KiB |
@@ -58,9 +58,10 @@ There are two codec choices, mostly:
|
|||||||
found in Wikipedia][14], it was used by 91% of video industry developers as
|
found in Wikipedia][14], it was used by 91% of video industry developers as
|
||||||
of September 2019. Every screen-equipped device that I tried can play it.
|
of September 2019. Every screen-equipped device that I tried can play it.
|
||||||
- *H.265* (a.k.a. _HEVC_) is a royalty- and patent-ridden codec which offers
|
- *H.265* (a.k.a. _HEVC_) is a royalty- and patent-ridden codec which offers
|
||||||
25-50% [better compression ratios][15]. In my experience, the compression
|
25-50% [better compression ratios][15] than H.264. In my experience, the
|
||||||
ratio was over 50%. It is amazing for transfer, un-playable on everything
|
compression ratio was over 50% better than H.264. It is amazing for transfer,
|
||||||
I've tried except Google Chrome browser on Android[^1].
|
un-playable on everything I've tried except Google Chrome browser on
|
||||||
|
Android[^1].
|
||||||
- *AV1* seems to be anecdotally on-par with H.265 and is not patent-ridden.
|
- *AV1* seems to be anecdotally on-par with H.265 and is not patent-ridden.
|
||||||
Camera cannot stream it, but lack of patent problems implies, it should be
|
Camera cannot stream it, but lack of patent problems implies, it should be
|
||||||
good for recordings. However:
|
good for recordings. However:
|
||||||
@@ -82,6 +83,11 @@ There are a few variables you may want to check:
|
|||||||
remotely. I picked one with PTZ, but more out of curiosity than necessity.
|
remotely. I picked one with PTZ, but more out of curiosity than necessity.
|
||||||
Turns out, ONVIF (the "open" protocol to control PTZ cameras) is very poorly
|
Turns out, ONVIF (the "open" protocol to control PTZ cameras) is very poorly
|
||||||
supported, or not at all, with the NVRs I've tried.
|
supported, or not at all, with the NVRs I've tried.
|
||||||
|
- Later edit: PTZ is great during construction. I can zoom into a road if I
|
||||||
|
am expecting transport (and want to check, say, if it is not destroying
|
||||||
|
everything around), I can zoom into a particular area of the house if I
|
||||||
|
want to. Great choice for the first camera. Probably not for the second one
|
||||||
|
— it will get boring with time.
|
||||||
- Resolution versus visibility in low light. [ipcamtalk.com][2] has decent
|
- Resolution versus visibility in low light. [ipcamtalk.com][2] has decent
|
||||||
recommendations, start there.
|
recommendations, start there.
|
||||||
- Do your research in the [website][2], there are some great tips. I wish I had
|
- Do your research in the [website][2], there are some great tips. I wish I had
|
||||||
@@ -100,7 +106,7 @@ two options for an NVR:
|
|||||||
experience is "it is what it is". I.e. camera manufacturers may or may not be
|
experience is "it is what it is". I.e. camera manufacturers may or may not be
|
||||||
the best NVR UX designers, especially when it comes to viewing the recordings
|
the best NVR UX designers, especially when it comes to viewing the recordings
|
||||||
or live stream remotely. However, they will for sure create the best Camera ⇔
|
or live stream remotely. However, they will for sure create the best Camera ⇔
|
||||||
NVR integration.
|
NVR integration. Most hassle-free, least control.
|
||||||
- Open source NVRs, which you can install to your existing home server. I
|
- Open source NVRs, which you can install to your existing home server. I
|
||||||
considered [frigate][3], [Moonfire NVR][4] and [ZoneMinder][5]. Since I use a
|
considered [frigate][3], [Moonfire NVR][4] and [ZoneMinder][5]. Since I use a
|
||||||
[home server]({{< ref "log/2023/nixos-subjective" >}}), I am self-hosting my
|
[home server]({{< ref "log/2023/nixos-subjective" >}}), I am self-hosting my
|
||||||
@@ -114,11 +120,11 @@ detection, not even "in theory". I have relatively powerful hardware in the
|
|||||||
closet and want object detection for it.
|
closet and want object detection for it.
|
||||||
|
|
||||||
Moonfire NVR's interface is ncurses-based, similar to how Linux kernel is
|
Moonfire NVR's interface is ncurses-based, similar to how Linux kernel is
|
||||||
configured. In opinion, for end-user product, one either offers file-based
|
configured. In my opinion, for end-user product, one either offers file-based
|
||||||
configuration, or web-based configuration directly in the browser. Many
|
configuration, or web-based configuration directly in the browser. Many
|
||||||
projects do both (e.g. home-assistant, frigate). This is the first ncurses-based
|
projects do both (e.g. home-assistant, frigate). This is the first
|
||||||
configuration for a consumer product. Which makes me wonder what their audience
|
ncurses-based configuration for a consumer product. Which makes me wonder what
|
||||||
is.
|
their audience is.
|
||||||
|
|
||||||
|
|
||||||
{{<img src="_/2025/construction-site-surveillance/moonfire-config.png"
|
{{<img src="_/2025/construction-site-surveillance/moonfire-config.png"
|
||||||
@@ -126,7 +132,7 @@ is.
|
|||||||
hint="graph"
|
hint="graph"
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
Once configured, the recordings are printed as a timestamped list. Which is
|
Once configured, the recordings are listed as a timestamped list. Which is
|
||||||
good if you know the time upfront, but is not great for discovery.
|
good if you know the time upfront, but is not great for discovery.
|
||||||
|
|
||||||
{{<img src="_/2025/construction-site-surveillance/moonfire-nvr.png"
|
{{<img src="_/2025/construction-site-surveillance/moonfire-nvr.png"
|
||||||
@@ -134,6 +140,9 @@ good if you know the time upfront, but is not great for discovery.
|
|||||||
hint="graph"
|
hint="graph"
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
|
I didn't go with Moonfire, because it is does not offer a good UX for
|
||||||
|
discovering videos, and I much prefer file-based configuration.
|
||||||
|
|
||||||
## Setting up Frigate
|
## Setting up Frigate
|
||||||
|
|
||||||
*Frigate* seems to be what the kids use these days. Documentation is extensive,
|
*Frigate* seems to be what the kids use these days. Documentation is extensive,
|
||||||
@@ -142,10 +151,10 @@ It took a few evenings to get it to work, and it works.
|
|||||||
|
|
||||||
A few tips before you get started:
|
A few tips before you get started:
|
||||||
|
|
||||||
- for object detection you will need hardware support. Look at [recommended
|
- For object detection you will need hardware support. Look at [recommended
|
||||||
hardware][6]. I went with Google Coral, but I've heard good things about
|
hardware][6]. I went with Google Coral, but I've heard good things about
|
||||||
OpenVINO too.
|
OpenVINO too.
|
||||||
- start with go2rtc from the get-go. I had to re-configure all the Frigate
|
- Start with go2rtc from the get-go. I had to re-configure all the Frigate
|
||||||
streams, which was way more annoying than it's worth if you start with
|
streams, which was way more annoying than it's worth if you start with
|
||||||
go2rtc. Saved a lot of bandwidth, too. More on that later.
|
go2rtc. Saved a lot of bandwidth, too. More on that later.
|
||||||
|
|
||||||
@@ -173,13 +182,18 @@ cameras take ~21-24GiB/day.
|
|||||||
|
|
||||||
Every 5 minutes a separate process captures a full-resolution picture of both
|
Every 5 minutes a separate process captures a full-resolution picture of both
|
||||||
cameras: `5376x1520` and `2560x1440`. I have a bunch of timelapses already! If
|
cameras: `5376x1520` and `2560x1440`. I have a bunch of timelapses already! If
|
||||||
we meet in person, I will happily show.
|
we meet in person, I will happily show them.
|
||||||
|
|
||||||
{{<img src="_/2025/construction-site-surveillance/grafana-traffic.png"
|
{{<img src="_/2025/construction-site-surveillance/grafana-traffic.png"
|
||||||
alt="Grafana dashboard showing ~2Mb/s downlink and ~100Kb/s uplink over tailscale0 interface"
|
alt="Grafana dashboard showing ~2Mb/s downlink and ~100Kb/s uplink over tailscale0 interface"
|
||||||
hint="graph"
|
hint="graph"
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
|
{{<img src="_/2025/construction-site-surveillance/router-traffic-stats.png"
|
||||||
|
alt="4G router traffic showing a constant 1.15GB/h uplink"
|
||||||
|
hint="graph"
|
||||||
|
>}}
|
||||||
|
|
||||||
Using exactly the same parameters (resolution, fps), but with h.264, the
|
Using exactly the same parameters (resolution, fps), but with h.264, the
|
||||||
bandwidth grows to 11 Mb/s. Which may not sound like a lot with today's fiber
|
bandwidth grows to 11 Mb/s. Which may not sound like a lot with today's fiber
|
||||||
everywhere, but is considerable on a 4G connection.
|
everywhere, but is considerable on a 4G connection.
|
||||||
@@ -219,4 +233,4 @@ corners, but, in my opinion, in the end it's worth it.
|
|||||||
[14]: https://go.bitmovin.com/hubfs/Bitmovin-Video-Developer-Report-2018.pdf
|
[14]: https://go.bitmovin.com/hubfs/Bitmovin-Video-Developer-Report-2018.pdf
|
||||||
[15]: https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding
|
[15]: https://en.wikipedia.org/wiki/High_Efficiency_Video_Coding
|
||||||
|
|
||||||
[^1]: or vlc. Thanks to the French who make a point about not caring about royalties
|
[^1]: Or vlc. Thanks to the French who make a point about not caring about royalties.
|
||||||
|
|||||||
Reference in New Issue
Block a user