Dedicated RPI Camera Monitor

From ZoneMinder Wiki
Revision as of 00:21, 23 August 2018 by Snake (talk | contribs) (→‎Start)
Jump to navigationJump to search

Following the similar Dedicated_SBC_Camera_Monitor guide, I'll do the same thing with a Raspberry Pi model 3, and Devuan Ascii, this time (migrated from Debian Stretch Lite)

This guide is considered an addendum to the above guide, so please be familiar (at least read through it) first. You will be going back to that guide, at certain points, to follow those steps. I will not repeat them here. There is no need.

Start

First, image the Debian Stretch Lite to your SD card.

Boot up and enable ssh (service ssh start), change your password (passwd pi), and apt-get update && apt-get dist-upgrade If you later want to use ffmpeg and hwaccel to view streams, you will want to install ffmpeg now from the official rpi repos (more details further down).

Now we will migrate following these instructions [1] but first read the next paragraph.

Before installing sysvinit-core I created an /etc/network/interfaces file with the following:

auto eth0
iface eth0 inet dhcp

Before rebooting, after apt-get install sysvinit-core, make sure /etc/inittab exists, and has startup data. I've had issues where, when migrating a VPS to devuan Jessie, inittab did not exist, and the VPS would fail to boot.

Continue with the ascii migration guide.

At the end, go to /etc/apt/sources.list.d/ and remove the raspberry pi link there.

Sidenote: This particular arm OS is armhf (arm with hardware float peripheral included). There is also armel, and arm64 (arm with software float, and arm 64 bit respectively) that is available for debian on the pi. The devuan sd card image for rpi3, if used from the devuan mirrors, is arm64. This is an important distinction in the case that you might want to use this platform for something else. Some apt packages and external software that is available for armhf, are not supported (officially supported) as well in arm64, and possibly vice versa. The main raspberry pi 3 images are armhf, so from that, most software is compatible with armhf.


I will try install firefox-esr here. NOTE: it's truly best to use VLC or mplayer with the hwaccel codecs, and directly view the RTSP stream of the camera, but I happen to be using this for viewing an internet stream in this use case scenario. For those interested in using VLC or mplayer direct with hwaccel codecs, please see this thread [2].

Continue following the Dedicated SBC guide, where you install htop, tcpdump, and git clone the repos for dwm and st. make and install dwm and st

apt-get remove nfs-common rpcbind avahi-daemon

continue following that guide .xinitrc for your new user will be

#!/bin/bash
export DISPLAY=:0 &
xset s off &
xset -dpms &
/usr/bin/firefox &
exec dwm

And follow the rest of the guide. If everything goes well (as it did for me) you will be able to reboot and see firefox and dwm startup.

Notes

Note: Firefox starts in workspace 9, so you might have to change over to it in dwm upon boot. You can remove all workspaces except for #1, and then ff will boot by default on the first. I tested video (though not sound) and was able to watch one without any skipping. Those who use ffmpeg and hwaccel may have even better results.