I'm trying to use the Pi camera (NoIR version) to record a video in relatively low light. Under these conditions, sometimes the automatic exposure control goes into oscillations: the video gets overly bright, then very dark, then bright, then dark again, etc. The effect is extreme and makes the video unusable.
Why does this happen and how can I prevent this?
More details:
When recording a still image, everything seems to work fine. I use the option --exposure verylong, set exposure compensation using the -ev option to correct for over/under exposure, and make sure that the timeout (-t) is long enough to allow for a long shutter speed. Then I get good and consistent results.
Now I'm trying to record video under the same conditions. To allow for a long enough shutter speed, I set the framerate to -fps 2 (the documented minimum). I leave the other settings at default, except for --exposure. If I don't use the --exposure option, the picture will be too dark, essentially black, as the light level drops. If I set it to --exposure verylong, then exposure control will often go into oscillations: it brightens up, overshoots, overexposes, then darkens too much, then keeps repeating this. If I set it to --exposure night, then I get good results in some lighting conditions, but as the light level drops, it starts oscillating again.
My scene is dim but relatively evenly lit (i.e. relatively low contrast). It's not the typical very high contrast night scene with visible light sources in the frame.
Update: Are exposure decisions (and metering) done by a software component? Is it at all possible to modify this piece of software, and if yes, how much effort would it take (I guess it's very low level code)?
