Giter Site home page Giter Site logo

Comments (10)

dannyman avatar dannyman commented on July 24, 2024

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.

fsphil avatar fsphil commented on July 24, 2024

Agreed. Fixed in 1ce8598, returns -1 if the capture fails.

from fswebcam.

dannyman avatar dannyman commented on July 24, 2024

<3 Thanks!

from fswebcam.

Buadhai avatar Buadhai commented on July 24, 2024

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.

fsphil avatar fsphil commented on July 24, 2024

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.

Buadhai avatar Buadhai commented on July 24, 2024

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.

Buadhai avatar Buadhai commented on July 24, 2024

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.

Buadhai avatar Buadhai commented on July 24, 2024

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.

fsphil avatar fsphil commented on July 24, 2024

The config you pasted has a unicode multiplication character in 1920×1080. Try a regular x, 1920x1080.

from fswebcam.

Buadhai avatar Buadhai commented on July 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.