I'm adjusting some of the PiCamera parameters to make it work well in low light. However, when I preview the camera (in low light) the image starts off looking great and then immediately darkens. These are the steps I take:

from picamera import PiCamera
cam = picamera.PiCamera()
cam.framerate = 4
cam.shutter_speed = 249839  # max shutter speed for a frame rate of 4. 

What's causing the image to go really dark after about a second? Also - if there are better ways to handle low light, would love to hear about those. Thanks.

1 Answer 1


Seems like you have to reset the gain level when continously operating with a high shutter_speed.

The docs:

You can force a longer exposure time with the shutter_speed attribute at which point the scene will become quite washed out (because both the gain and exposure time are now fixed). If you let the gain float again by setting iso back to automatic (0) you should find the gain reduces accordingly and the scene returns more or less to normal.

See the section 6.1.7 Feedback Loops here:


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.