Page 1 of 1

In motioneye how to change the brightness on raspberry pi cam

Posted: Tue Aug 06, 2019 4:03 am
by placidchat
I'm running motion 4.2.2. using motioneye. In the camera configuration i use vid_control_params brightness=280 --- an extreme value -- just to see if the captured images change. I've also tried v4l2-ctl -c brightness=290 on the command line to change the brightness. These commands don't work to change the brightness.

Are there other ways of specifying brightness compensation?

Re: How to change the brightness on raspberry pi cam

Posted: Wed Aug 07, 2019 8:09 am
by placidchat
Changed motion from 4.2.2 to 4.2.1. And that didn't work. Tried triaging commands in motioneye.conf, motion.conf and camera-1.conf.

It seems like changing the camera directive in motion.conf from say

Code: Select all

camera camera-1.conf
to

Code: Select all

camera camera-test.conf
causes motioneye to not start motion at all. Changing the target configuration files to full path also doesn't seem to help. Motioneye starts normally but the log file shows it is using the camera-1.conf file in spite of the new camera configuration. And at the end motion isn't started.

Re: In motioneye how to change the brightness on raspberry pi cam

Posted: Wed Aug 07, 2019 9:54 am
by placidchat
Also, the brightness keyword works if motion is started as is from the command line, but when using meyectl, for some reason, the brightness cannot be altered.

I've altered motionctl.py in

Code: Select all

def start:
to load from the new camera-1.conf file, bypassing the checks on the camera configuration, and motion adjusts the brightness. For some reason, either one of the commands generated in the camera-1.conf permanently sets the brightness on the camera or motioneye filters the camera settings. I'm leaning towards motion having specific configuration settings.

I need to change the brightness to enable night time use. Anyone have any clues?

Re: In motioneye how to change the brightness on raspberry pi cam

Posted: Wed Aug 07, 2019 10:10 am
by placidchat
It seems like using mmalcam_name vc.ril.camera, causes the other options to not work. I've looked for some mmalcam options, does anyone know where to get a comprehensive list?

Re: In motioneye how to change the brightness on raspberry pi cam

Posted: Wed Aug 07, 2019 4:34 pm
by placidchat
So in /opt/vc/include/interface/mmal/mmal_parameters_camera.h there exists an enum with MMAL_PARAMETER_BRIGHTNESS. Looking at conf.c of motion, and config_params, it recommends searching through the raspivid/raspistill documentation.

And it appears the command to use for an mmalcam is

Code: Select all

mmalcam_control_params -br 90
Now, i'm trying

Code: Select all

mmal_control_params -ex night
and that doesn't seem to do what i think it should do, which is to increase the settings on exposure to help in night mode.

Re: In motioneye how to change the brightness on raspberry pi cam

Posted: Thu Aug 08, 2019 5:55 am
by placidchat
Those above commands should be added into the "extra motion options" in the video device panel. You can also change framerate settings directly in the camera-1.conf to set framerates higher than provided by the ui.