gwh0923
Posts: 13
Joined: Tue Feb 03, 2015 1:02 am

Using logitech web cam C170

Wed Feb 11, 2015 12:03 am

I have a logitech webcam model c170 connected.
I am running Raspbian on a B+
I installed the fswebcam app.

When I run the command it reports Not a JPEG file:

see below
------------------------------------------------------------------
pifswebcam -r 1280x720 image02.jpg
Trying source module v4l2...
/dev/video0 opened
.No input was specified, using the first.
Adjusting resolution from 1280x720 to 1024x768.
--- Capturing frame...
gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with
0x39 0x81
Captured frame in 0.00 seconds.
--- Processing captured image...
Writing JPEG image to 'image02.jpg'
-------------------------------------------------------------------------
image02.jpg is just a blank black image.

I have tried several different resolution (-r) settings, makes no difference.

Is there some kind of initialization I need for the webcam?

Any suggestions as to what is causing this.

User avatar
AndyD
Posts: 2334
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: Using logitech web cam C170

Wed Feb 11, 2015 12:29 am

I had a similar problem with my webcam. I needed to skip a few frames before capturing. try

Code: Select all

fswebcam -r 1280x720 -S 20 image02.jpg

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Using logitech web cam C170

Wed Feb 11, 2015 12:31 am

I think I got this when I used a long USB extender and it couldn't read from the webcam. Try a powered hub it if that doesn't work, use a different camera.
There are 10 types of people: those who understand binary and those who don't.

gwh0923
Posts: 13
Joined: Tue Feb 03, 2015 1:02 am

Re: Using logitech web cam C170

Wed Feb 11, 2015 12:49 am

Thanks, after I skipped 20 frame everything is running great

All subsequent reads are fine without the skipped frames.

Looks Like I just needed that to initialize the webcam.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Using logitech web cam C170

Wed Feb 11, 2015 12:57 am

gwh0923 wrote:Thanks, after I skipped 20 frame everything is running great

All subsequent reads are fine without the skipped frames.

Looks Like I just needed that to initialize the webcam.

Do you know how to address multiple webcams?

You can address multiple cams providing you can power them correctly by inputting the address they are at.
/dev/video0 etc.
man fswebcam to find out the option to pass it in.
There are 10 types of people: those who understand binary and those who don't.

gwh0923
Posts: 13
Joined: Tue Feb 03, 2015 1:02 am

Re: Using logitech web cam C170

Wed Feb 11, 2015 1:41 am

I am trying to use the higher resolution of the camera.

Can fswebcam capture a still image instead of a frame from the video mode.

The video mode is max resolution of 1024 X 768 but the still mode to up to 5MP.

I have looked through the man file with no luck.

Return to “Graphics, sound and multimedia”