Skip to content

Commit

Permalink
update cctv blog
Browse files Browse the repository at this point in the history
  • Loading branch information
Banshee1221 committed Mar 18, 2024
1 parent 8208b39 commit f23833f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
53 changes: 48 additions & 5 deletions content/posts/2024-03-17-pi-zero2-cctv/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,64 @@ TocOpen: true
draft: true
---

Not too long ago I set up a few IP cameras around the house. As I work mostly from home, I wanted a non-proprietary way to monitor the feeds while I'm in my study. This blog details my solution leveraging a Raspberry Pi Zero 2 W and an old monitor I had lying around.
Not too long ago I set up a few IP cameras around the house. As I work mostly from home, I wanted a non-proprietary and cost effective way to monitor four video feeds at any time while I'm in my study.

download https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/
This blog details the solution I came up with, which leverages a Raspberry Pi Zero 2 W and an old monitor I had lying around.

```
# Hardware Requirements

![Hardware Requirements](./requirements.jpg)

- A Raspberry Pi Zero 2 (W if you want to do it wirelessly).
- (**Optional**) A USB OTG cable if you're not using WiFi.
- (**Optional**) A USB to Ethernet adapter if you're not using WiFi.
- (**Optional, but highly recommended!**) A heatsink and enclosure for the Pi.
- A mini HDMI to HDMI breakout for the Pi.
- A power supply for the Pi.
- A microSD card reader/writer for burning the Pi image.
- An old HDMI-compatible computer monitor, either one laying around or getting a cheap one on the second-hand market.
- An HDMI cable.

It's probably easiest to just buy a bundle for the Pi Zero 2, which normally includes most of the stuff neede on the Pi side.

# Software Requirements

The only requirement before getting started is to download an older, archived 32-bit version of Raspberry Pi OS based on Debian 10 (Buster). The last released build is hosted here: https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-05-28/.

The reason for this is that I leverage a tool for displaying the camera feeds which relies on an older video player called `omxplayer`. `omxplayer` supports the hardware acceleration on Pis, but is deprecated on newer versions of RaspiOS. While `vlc` can do hardware acceleration in newer RaspiOS versions, I've found that `omxplayer` has slightly better latency when streaming the feeds.

# Setting it Up

## Flash the MicroSD Card

On a desktop/laptop, prepare the microSD card for the Pi.

## Get Displaycameras

Once the Pi has powered up and has been logged into via SSH, run the following commands to install the software:

```shell
sudo su
cd /tmp
apt update

# Install dependencies for displaycameras
apt install git omxplayer fbi vim -y

# Download the source code for displaycameras
git clone https://github.com/Anonymousdog/displaycameras.git
cd displaycameras

# Install displaycameras
chmod +x install.sh
./install.sh
```
gpu split 128

edit the screen size to 720p
When prompted about setting up the GPU split, enter `128` and hit enter.

## Configure the Pi

I had some issues with runnin
```
framebuffer_width=1280
framebuffer_height=720
Expand All @@ -47,6 +89,7 @@ hdmi_mode=85
reboot
```

## Configure displaycameras
uncomment blanking in displaycameras.conf

```
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f23833f

Please sign in to comment.