https://github.com/danielearwicker/picam
A very low-tech thing for taking/storing pictures from usb cameras
https://github.com/danielearwicker/picam
Last synced: about 2 months ago
JSON representation
A very low-tech thing for taking/storing pictures from usb cameras
- Host: GitHub
- URL: https://github.com/danielearwicker/picam
- Owner: danielearwicker
- License: mit
- Created: 2017-07-21T18:04:00.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-30T11:29:55.000Z (over 8 years ago)
- Last Synced: 2025-10-06T23:34:19.512Z (8 months ago)
- Language: TypeScript
- Size: 234 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PiCam
A very low-tech thing for taking/storing pictures from usb cameras
The server and client parts are largely separate projects.
Currently it assumes you have a USB camera plugged into your Pi and so it has the device name:
/dev/video0
The UI currently sucks.
## Prerequisites
You need Node on your Pi and [this is a very thorough guide](http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/) to get you to that point.
I prefer Raspian Lite to leave as much space as possible for images. Get a good (Samsung) 128 GB
micro SD card. Put Raspian Lite on it, boot it up and run `raspi-config`. Change the `pi` password
and switch on SSH. Finally get Wifi working by editing this config file:
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
And add:
network={
ssid="YourNetworkName"
psk="YourPassword"
}
If you need the IP address of your Pi, run `ifconfig` and look at the `wlan0` section of the output.
You also need ffmpeg. Again [this guide is very simple](https://github.com/tgogos/rpi_ffmpeg) - you can
basically paste that script into a file and run it.
## Client
In `client`, do:
npm install
npx webpack
(If you have an old version of Node, you'll need to `npm install -g npx`.)
The server statically servers the client bundle.
## Server
In `server`, do:
npm install
npx tsc
Now you can fire up the server temporarily with:
node built/server/index.js
And look at `http://:3030`.
To get it running properly (i.e. as a daemon that starts automatically)
use [forever-service](https://github.com/zapty/forever-service):
sudo npm install -g forever
sudo npm install -g forever-service
cd built/server
sudo forever-service install PiCam --script index.js
You can now start it with:
sudo service PiCam start
Or just restart your Pi.