README.md 1.2 KB
Newer Older
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
1 2
to clone: git clone https://gitlab.cba.mit.edu/pub/cams.git

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16
to reinitialize: ./init

to run: node cams.js

uses fswebcam for screen capture

uses convert to make thumbnails

uses compare to measure activity

can use uvcdynctrl -f to list resolutions

can use fswebcam --list-controls to list controls

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
17 18
can use sudo guvcview to adjust camera

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
19
can use http-server-with-auth to serve:  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
20 21
http-server-with-auth -p port --username username --password password  
http-server-with-auth -p port --username username --password password --ssl --cert cert.pem --key key.pem  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
22 23
index is at http://this_address:this_port  
last image is at http://this_address:this_port/oldimage.jpg  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
24

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
25
can use Ubuntu MATE on Raspberry Pi 3:  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
26
sudo apt-get install nodejs-legacy npm fswebcam imagemagick guvcview  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
27 28
sudo npm install -g http-server-with-auth  
System -> Administration -> Time and Date -> Keep synchronized with internet servers  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
29

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
30 31
can use Logitech C920 HD Webcam

Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
32
can start cams script on boot with cams.service:  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
33
edit cams script with port, username, and password
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
34 35 36 37
sudo cp cams.service /lib/systemd/system  
sudo systemctl daemon-reload  
sudo systemctl enable cams.service  
sudo systemctl start cams.service  
Neil Gershenfeld's avatar
wip  
Neil Gershenfeld committed
38
journalctl -u cams.service