Is there a way to set the Raspberry Pi camera module to manual gain control? I've looked in the option of raspivid and there seems to be nothing.


From picamera's documentation - the package that provides a pure Python interface to the Raspberry Pi camera module for Python 2.7 (or above) or Python 3.2 (or above):

Exposure mode 'off' is special: this disables the camera’s automatic gain control, fixing the values of digital_gain and analog_gain. Please note that these properties are not directly settable, and default to low values when the camera is first initialized. Therefore it is important to let them settle on higher values before disabling automatic gain control otherwise all frames captured will appear black.



Retrieves the current analog gain of the camera.

as well as


Retrieves the current digital gain of the camera.

indicate that gain settings are not settable by the user. digital_gain and analog_gain can only be used to read the value.

Maybe using the different exposure_modes can help to adjust exposure to different lighting situations.

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.