I want to periodically take pictures using a webcam connected on a Raspberry Pi via fswebcam. It happens that it is unstable and some times it just fails, with no apparently reason.
Below you will see a console session where I repeatedly run the same command to get a picture. I do it 6 times:
- Success
- Fails with the message "VIDIOC_DQBUF: No such device"
- Fails with the message "stat: No such file or directory"
- Fails with the message "VIDIOC_QBUF: No such device"
- Fails with the message "VIDIOC_QBUF: No such device"
Success
pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Adjusting resolution from 384x288 to 640x480. --- Capturing frame... Skipping frame... Capturing 1 frames... Captured 2 frames in 0.04 seconds. --- Processing captured image... Disabling banner. Writing JPEG image to 'deleteme.png'. pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Adjusting resolution from 384x288 to 640x480. --- Capturing frame... Skipping frame... VIDIOC_DQBUF: No such device Capturing 1 frames... VIDIOC_DQBUF: No such device No frames captured. pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... stat: No such file or directory pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Adjusting resolution from 384x288 to 640x480. --- Capturing frame... Skipping frame... Capturing 1 frames... VIDIOC_QBUF: No such device Captured frame in 0.00 seconds. No frames captured. pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Adjusting resolution from 384x288 to 640x480. --- Capturing frame... Skipping frame... VIDIOC_DQBUF: No such device Capturing 1 frames... VIDIOC_DQBUF: No such device No frames captured. pi@rodrigo:~/rodrigo $ /usr/bin/fswebcam -S 1 --no-banner deleteme.png --- Opening /dev/video0... Trying source module v4l2... /dev/video0 opened. No input was specified, using the first. Adjusting resolution from 384x288 to 640x480. --- Capturing frame... Skipping frame... Capturing 1 frames... Captured 2 frames in 0.03 seconds. --- Processing captured image... Disabling banner. Writing JPEG image to 'deleteme.png'. pi@rodrigo:~/rodrigo $
I tried two different cameras I have here. Same result. Any ideas?
Tks for your help!