I'm making a timelapse video with a Raspberry Pi and a Microsoft Lifecam HD-5000 webcam. Everything is working great except that I have to reset the camera every morning or I end up with totally white images. I think the light sensor gets stuck open overnight.

My image grabbing script runs every two minutes and uses fswebcam to take the pic. I'm using luvcview to reset the camera in the morning, which isn't very elegant because it's not a command-line tool. It works, but I was wondering if there is a cleaner way. I've also tried using sudo rmmod uvcvideo and then sudo modprobe uvcvideo but that didn't work.

Any ideas?

  • You could try uvcdynctrl. Not sure if it can reset the camera, but it can save and load controls to/from a file.
    – M Noit
    Nov 20, 2013 at 11:46
  • man luvcview to see options.
    – Wilf
    Nov 22, 2013 at 16:09

2 Answers 2


OK, so here's what I figured out:

When I open Luvcview in first thing in the morning, the image is very overexposed for a few seconds, then corrects itself. Apparently opening the stream kicks off the camera's native autofocus and autoexposure features. After some digging, I discovered that fswebcam can grab an image averaged across a number of frames.

So, I waited until mid-morning when it was bright outside, and manually took the first image of the day with one frame. Very overexposed. Tried again with 5 frames, and it looks great. Back to one frame, still looks great.

SUMMARY: The video stream from the camera has to run for longer than a single frame for it to reset itself. I will run the first grab of every hour with a 5-frame exposure to keep the images looking good as the light changes throughout the day.


I had this issue and I used two options from fswebcam, one that takes pictures after a delay and one that skips a certain number of frames. This is the stem of the command (then I add some date dependent file name)

fswebcam -d /dev/video0 -r 2560x1440 -S 10 -F 10 -D 1 

Check the manual for -S and -D and play a bit with them. See what works for you.

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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