I'm experimenting with using the Pi for web cam streaming and motion detection, with the motion app. Trying a few different web cameras and combinations with other hardware, I've found one combination that is perfectly stable (see below). However, I'm only getting it to work with a resolution of 352x288. I would like to utilize more of the resolution that the 720p web cam is capable of. I've tried 640x480, 640x360 and 1280x720, but they don't work (motion is unable to initialize the camera). The Pi has 256MB of memory, which should be plenty to support the high resolutions. For instance, motion lists memory usage at 1.8MB for the 1280x720 resolution.

Any tips on how to enable a higher resolution?


  • Logitech C310h USB 2.0 HD Webcam, UVC Camera (046d:081b)
  • 352x288, YUYV palette
  • powered by iPad charger
  • web cam connected to lower USB port
  • nothing connected to upper USB port
  • wired network connected
  • running Motion 3.2.12.
  • OS: 2012-09-18-wheezy-raspbian.img
  • only change to motion.conf: Setting resolution to 352x288

Edit: I have since found that the setup I'm currently using with MJPG-streamer is not completely stable, so there's a chance that the setup described above is not completely stable but just more stable as it uses a lower resolution.

Edit 2 (4/21/13): It has been known for a while that USB is not stable on the Raspberry Pi, causing trouble with many web cameras and wifi dongles. The foundation is actively working on this, and good progress has been made lately. There is an update available via rpi-update that fixes many issues. See the USB Redux thread on the Raspberry Pi forum.

3 Answers 3


Have you tried connecting the webcam to a powered USB hub? Some devices require more current than the Raspberry Pi can provide, and can behave erratically when connected to the built-in USB ports.

  • Thanks for the reply. I didn't have a powered hub to test with, but it seemed unlikely to me that a power issue would cause it to be completely stable at a low resolution and not work at all on a high resolution.
    – Roger Dahl
    Commented Oct 6, 2012 at 16:32

The limit on resolution went away when I switched from motion to MJPG-streamer. MJPG-streamer streams 1280x720 at 5FPS. With 3 computers connected to the stream, the CPU usage is only around 10%. The disadvantage with MJPG-streamer is that it does not have motion detection.

However, this solution is not completely stable. I have to reboot the RPi every few days.


To begin with, I used a logitech c270, motion application. I do not stream the feed over the network, I just dump the images to disk (max resolution is 1280x960).

MJPEG does not work for me so I am stuck with YUVU.

I believe it is very tricky to find the right resolution I had been stuck with 352x288 for quite some time until I discovered that I can also use a 960 x 720 resolution. With this kind of resolution I get about 2 fps. (keeps the need for storage low ;-)).

v4l2-ctl --list-formats-ext : should give you an idea of formats you can use.

The motion file uses max resolution,a mask and takes snapshots every second the motiondect only relies on detection to take pictures .

I created a black pgm for the first to disable motion detection completely and to only take pictures every second.


To run motion I use nohup sudo motion > logfile.txt &

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.