Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
cams
Commits
44ec2070
Commit
44ec2070
authored
Jan 02, 2018
by
Neil Gershenfeld
Browse files
wip
parent
33e3dd7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
cams1.js
View file @
44ec2070
...
...
@@ -38,13 +38,16 @@ function update() {
// take new image
//
console
.
log
(
'
\n
capture
'
+
name
)
try
{
var
ret
=
execSync
(
'
ffmpeg -y -f v4l2 -s
'
+
image_width
+
'
x
'
+
image_height
+
'
-i /dev/video0 -vframes 1 -vf
'
+
video_filter
+
'
image.jpg
'
)
}
catch
(
err
)
{
console
.
log
(
"
err
"
)
var
success
=
true
do
{
try
{
execSync
(
'
ffmpeg -y -f v4l2 -s
'
+
image_width
+
'
x
'
+
image_height
+
'
-i /dev/video0 -vframes 1 -vf
'
+
video_filter
+
'
image.jpg
'
)
}
catch
(
err
)
{
success
=
false
}
}
console
.
log
(
"
ret
"
+
ret
)
while
(
success
!=
true
)
//
// remove prior images
//
...
...
Write
Preview
Supports
Markdown
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