drhitchcock
Posts: 10
Joined: Wed Jan 02, 2013 5:40 am

fswebcam - gd-jpeg: JPEG library reports unrecoverable error

Tue Nov 05, 2013 12:06 am

Howdy Raspbians,

I recently set-up my Raspberry Pi running Raspbian to work as a time-lapse camera taking images of my tomatoe plant :P I followed the instructions here: http://www.makeuseof.com/tag/how-to-cap ... sb-webcam/

It's been working fine for about 4 or 5 days and then after a recent reboot I started getting this error:
gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0xff 0x80
All that appears in the image is a black box.
I've updated all packages and drivers, unplugged any unnecessary peripherals and I have also tried using the web cam via a powered hub. It was working via the same USB hub before I started having problems.

Any help with this would be super!

Cheers,
Dr Hitchcock
Attachments
test.jpeg
test.jpeg (12.12 KiB) Viewed 31830 times

rajbadri
Posts: 11
Joined: Sun Nov 03, 2013 4:29 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Tue Nov 05, 2013 8:37 am

same problem here please help

rajbadri
Posts: 11
Joined: Sun Nov 03, 2013 4:29 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Wed Nov 06, 2013 1:44 am

it seems that the webcam was not recieving enough power. so probably a powered hub would do the trick. I plugged another webcam and it's working fine..

djevrek
Posts: 7
Joined: Tue Jul 09, 2013 11:45 am

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Sat Dec 07, 2013 2:34 pm

Try this command, for my camera i need to change -p parametar its logitech c170 and works only with -p YUYV

Code: Select all

fswebcam -p YUYV -d /dev/video0 -r 640x480 $DIR/$filename

arti0504
Posts: 24
Joined: Wed Jan 30, 2013 8:40 am

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Fri Jan 17, 2014 11:05 pm

Hello,
I have Creative Live! Cam Notebook VF0470, which I have connected to HUB with external power supply. I have also problem. I took picture and I have it black.

This code doesn't work:

Code: Select all

fswebcam -p YUYV -d /dev/video0 -r 640x480 $DIR/$filename
I have message stat: No such file or directory

I have installed also in Raspberry Pi guvcview for webcam grafic configuration. But all the time I have black window. I have installed guvcview in Ubuntu 12.04 and VF0470 work good.

Any help with this would be great!

tisnickske
Posts: 1
Joined: Sat Feb 08, 2014 2:51 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Sat Feb 08, 2014 2:57 pm

Hi,
I got rid of the 'gd-jpeg: JPEG library reports unrecoverable error' by adding a -S 2
This lets fswebcam skip two frames.
Seems that my camera generates faulty frames?

topkings
Posts: 2
Joined: Sun Mar 16, 2014 12:49 am

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Sat Sep 27, 2014 1:16 pm

Code: Select all

sudo fswebcam -d /dev/video0 -r 320x240 -S 2
Fixed

BlueBlood
Posts: 3
Joined: Thu Nov 20, 2014 7:14 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Fri Nov 21, 2014 8:13 am

I had the same problem, I found that it was actually a problem with the module and when i used zbar to scan an image the input came through fine,
Hope this helps

hegylako1594
Posts: 4
Joined: Wed Jan 07, 2015 12:30 pm
Location: Hungary

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Mon Aug 17, 2015 7:33 pm

I have the same problem too. Mjpg-streamer, fswebcam don't run well. I think, it is a encoding problem.

Gary498750
Posts: 1
Joined: Mon Dec 28, 2015 3:04 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Mon Dec 28, 2015 3:18 pm

Hey everyone,
I think I got the solution!
i found the instructions:

Code: Select all

sudo apt-get install libjpeg8-dev

sudo apt-get install imagemagick
and the problem was fixed.

amer
Posts: 1
Joined: Thu Apr 28, 2016 2:06 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Thu Apr 28, 2016 2:15 pm

Is it possible to save 2 image.jpg when running fswebcam? as example, when running fswebcam once, i want image1.jpg and image2.jpg saved in a folder (of course both are the same image).


>>>import os
>>> import datetime
>>> os.system ("sudo fswebcam /var/image1.jpg")
>>>os.system("exit")

jobfreder
Posts: 1
Joined: Mon Sep 19, 2016 7:50 pm

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Mon Sep 19, 2016 8:05 pm

above fswebcam -p YUYV and fswebcam -S 3 kind of worked for initial question, error went away but had saturated (white) picture. Increasing the -S solved the saturation problem, finally using: fswebcam -d /dev/video0 -S 30 -F 5 tst.jpg

GauravMahna
Posts: 2
Joined: Sun Apr 23, 2017 6:05 am

Re: fswebcam - gd-jpeg: JPEG library reports unrecoverable e

Mon Apr 24, 2017 6:47 pm

Below command worked for me :
fswebcam -d /dev/video0 -r 1920x1080 -S 30 -F 5 image10.jpg

Refer Documentation : https://man.cx/fswebcam(1) for more details.

Return to “HATs and other add-ons”