Commit a44829e7 authored by Neil Gershenfeld's avatar Neil Gershenfeld

wip

parent 0f3037bd
to clone: git clone https://gitlab.cba.mit.edu/pub/cams.git
to reinitialize: ./init to reinitialize: ./init
to run: node cams.js to run: node cams.js
...@@ -28,6 +30,7 @@ System -> Administration -> Time and Date -> Keep synchronized with internet ser ...@@ -28,6 +30,7 @@ System -> Administration -> Time and Date -> Keep synchronized with internet ser
can use Logitech C920 HD Webcam can use Logitech C920 HD Webcam
can start cams script on boot with cams.service: can start cams script on boot with cams.service:
edit cams script with port, username, and password
sudo cp cams.service /lib/systemd/system sudo cp cams.service /lib/systemd/system
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl enable cams.service sudo systemctl enable cams.service
......
...@@ -39,7 +39,7 @@ function update() { ...@@ -39,7 +39,7 @@ function update() {
// //
console.log('\ncapture '+name) console.log('\ncapture '+name)
while (true) { while (true) {
execSync('avconv -y -f v4l2 -s '+image_width+'x'+image_height+' -i /dev/video0 -vframes 1 -vf '+video_filter+' image.jpg') execSync('ffmpeg -y -f v4l2 -s '+image_width+'x'+image_height+' -i /dev/video0 -vframes 1 -vf '+video_filter+' image.jpg')
// //
// check that taking image was successful // check that taking image was successful
// //
...@@ -109,7 +109,7 @@ function update() { ...@@ -109,7 +109,7 @@ function update() {
// //
// take initial image // take initial image
// //
execSync('avconv -y -f v4l2 -s '+image_width+'x'+image_height+' -i /dev/video0 -vframes 1 -vf '+video_filter+' image.jpg') execSync('ffmpeg -y -f v4l2 -s '+image_width+'x'+image_height+' -i /dev/video0 -vframes 1 -vf '+video_filter+' image.jpg')
// //
// start update // start update
// //
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment