Comments (10)
Cron workaround:
fswebcam -q -d /dev/video1 -r 1920x1080 /home/djh/Dropbox/webcam/\%Y\%m\%d/\%H\%M.png ; test -f /home/djh/Dropbox/webcam/`date +\%Y\%m\%d/\%H\%M`.png || fswebcam -q -d /dev/video0 -r 1920x1080 /home/djh/Dropbox/webcam/\%Y\%m\%d/\%H\%M.png
from fswebcam.
Agreed. Fixed in 1ce8598, returns -1 if the capture fails.
from fswebcam.
<3 Thanks!
from fswebcam.
I still get zero even on an error:
pi@rasp2:~/webcam $ fswebcam --version
fswebcam 20140113
pi@rasp2:~/webcam $ fswebcam -d /dev/video4 test.jpg
--- Opening /dev/video4...
stat: No such file or directory
pi@rasp2:~/webcam $ echo $?
0
from fswebcam.
I haven't made a release since that change was made, if you compile from source it should work. I'll make a new release shortly.
from fswebcam.
I don't really know how to compile from source. I tried and got this error:
configure: error: GD graphics library not found
So, I tried to install the GD graphics library, but I have no idea what it's called:
pi@rasp2:~/fswebcam-master $ sudo apt install GD
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package GD
pi@rasp2:~/fswebcam-master $ sudo apt install libgd
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgd
pi@rasp2:~/fswebcam-master $ sudo apt install libgd2-noxpm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libgd2-noxpm-dev
If you'd just give me a little hint as to the name of the package I need to install I'd be grateful.
from fswebcam.
Never mind, I got it. This one worked: sudo apt install libgd-dev
pi@rasp2:~/webcam $ fswebcam --version
fswebcam 20140113
pi@rasp2:~/webcam $ fswebcam -d /dev/video4 text.jpg
--- Opening /dev/video4...
stat: No such file or directory
pi@rasp2:~/webcam $ echo $?
255
from fswebcam.
Except, I still have a problem:
Here's my config file:
config file for fswebcam
device /dev/video0
input 0
resolution 1920×1080
no-banner
## jpeg 90
## delay 5
skip 200
frames 3
## background
save /home/pi/webcam/webcam.jpg
If I run that with the version of fswebcam that I installed with apt, it produces an image that is 1920x1280:
pi@rasp2:~/webcam $ /usr/bin/fswebcam -c fswebcam.conf
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
Adjusting resolution from 1920x-1 to 1920x1080.
But, if I run the fswebcam that I compiled it says:
pi@rasp2:~/webcam $ /usr/bin/fswebcambak -c fswebcam.conf
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
Adjusting resolution from 1920x1 to 320x240.
So it inexplicably changes the resolution to 320x240.
What am I doing wrong here?
from fswebcam.
The config you pasted has a unicode multiplication character in 1920×1080. Try a regular x, 1920x1080.
from fswebcam.
Yes, thank-you. That worked.
I don't understand why the config file worked with one version of fswebcam but not the other.
In any event, I learned a lot today and for that I am grateful.
from fswebcam.
Related Issues (20)
- Raw pixel HOT 1
- Random behaviour. Ignores parameters? HOT 2
- Re-get image on error
- Attempting to set non-existent control silently fails HOT 1
- When in --loop mode add option to run command after each frame is captured. HOT 1
- Cameras that lie about their properties
- "Error Querying Menu" when setting value
- Add ability to exit the loop after a specified number of iterations (--count ?)
- Release HOT 5
- Floating point vs Integer Math
- Write png with compression level 9 is pretty slow
- subsecond looping?
- gzip option `--best` not universal; use `-9` instead
- More astro features
- Running multiple cameras on raspberry HOT 2
- Read continuous frames from camera
- [suggestion] Capture directly to clipboard HOT 1
- "Opening /dev/video0... stat: No such file or directory" after taken 10 Pictures HOT 1
- A use after free bug in src_v41_set_read.c HOT 2
- Raspberry pi camera module error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fswebcam.