ereyes01 / fishcam

Live video stream of your aquarium with a raspberry pi and a Logitech c920
GNU General Public License v2.0
25 stars 3 forks source link

I/O Error with the C920.... #7

Open dennishilmar opened 10 years ago

dennishilmar commented 10 years ago

Hi,

I'm using my brand new C920, which worked right out of the box with my Ubuntu machine... I wanted to set it up with motion so I could detect when my roomie crashes my room, but I can't seem to get it working properly. When using fswebcam I'm getting a line of picture in the top and the rest green!? So I looked for other options. I thought this looked like a good project where I could finally use the h264 encoder, but unfortunately I'm getting this output. I can see the cam is turning on, but shortly after the select timeout occurs :'(

pi@dennishilmar ~/Scratch/fishcam/raspberry-pi $ ./video-server 0.0.0.0 4000 Configuring the camera... VIDIOC_S_FMT: failed: Input/output error Frame rate set to 30.000 fps Starting streaming server to 0.0.0.0:4000 Setting pipeline to PAUSED ... Pipeline is PREROLLING ... select timeout Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 22446386 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ...

ereyes01 commented 10 years ago

Your syslog and/or dmesg may contain some more useful info, especially when you unplug/replug your camera into the USB.

The output of the following commands may give you some more info:

v4l2-ctl --set-fmt-video=width=800,height=448,pixelformat=1
v4l2-ctl --set-parm=30

Judging from the output you've posted above, I'd bet that the first command would give you your VIDIOC_S_FMT error:

VIDIOC_S_FMT: failed: Input/output error
ereyes01 commented 10 years ago

Also found a thread that's possibly relevant to your trouble: http://www.raspberrypi.org/forums/viewtopic.php?p=151493

Present in the thread are 2 possible causes of your problem:

The best solution to problem 1 is to just re-image the Pi with the latest version of Raspbian, then configure all the other stuff in the instructions.

Problem 2 is a problem if you've connected the c920 directly to the Pi's USB port. There is a known limitation where the Raspberry Pi's USB port only allows a draw of 140mA (contrary to what the USB spec allows). This amount is less than what the c920 needs to operate.

This post details the current draw issue with the Logitech c920 specifically: http://www.adafruit.com/blog/2012/09/21/raspberry-pi-increasing-the-usb-power-piday-raspberrypi-raspberry_pi/

If this sounds like your configuration, there are 2 possible fixes for this:

If you're still having trouble, I hope this helps you get closer to the solution.

dennishilmar commented 10 years ago

That last one might be the issue.. I'm using an active USB switch so it could only be first issue. I was thinking of getting a new image, but was just too lazy to do it :P I will try it out next week - thanks!