From charlesreid1

Motivation

I'm done trying to get this cheap-o Pi camera, with the clumsy ribbon cable, to try and work. The whole design, all of it reeks of cheaply-manufactured hardware incapable of anything but the most inane projects. (Hence the plethora of "how to photograph your cat" videos, and nothing more interesting or heavy-duty.)

The Hardware

I ordered a USB camera (1080 P, 2 MP?) from Amazon:

USBCamera1.jpg

USBCamera2.jpg

Setup/Usage

The camera didn't come with instructions, but controlling it was insanely easy [1]:

$ apt-get install fswebcam
$ fswebcam image.jpg
$ python -m SimpleHTTPServer 8000

Then point browser to 192.168.0.111:8000, and voila, the image is there and ready:

MyFirstUSBWebcamPhoto.jpg

Better Pictures

For best quality, use:

fswebcam -r 1280x720 --no-banner image.jpg

this results in a better image resolution without the obnoxious timestamp banner:

USBWebcamPhoto2.jpg

Motion program for camera stream

You can also stream from your camera using the motion program.

$ apt-get install motion

Now modify the motion config file to allow for webcam streaming:

$ sudo vim /etc/motion/motion.conf

change these lines:

<pre>
stream_localhost on
webcontrol_localhost on

to this line:

stream_localhost off
webcontrol_localhost off

Flags