Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cams
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pub
cams
Commits
a44829e7
Commit
a44829e7
authored
Jan 02, 2018
by
Neil Gershenfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wip
parent
0f3037bd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
README.md
README.md
+3
-0
cams1.js
cams1.js
+2
-2
No files found.
README.md
View file @
a44829e7
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
...
...
cams1.js
View file @
a44829e7
...
@@ -39,7 +39,7 @@ function update() {
...
@@ -39,7 +39,7 @@ function update() {
//
//
console
.
log
(
'
\n
capture
'
+
name
)
console
.
log
(
'
\n
capture
'
+
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
//
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment